NO

Author Topic: 32 bits <-> 64 bits SDL. dll problem on win7 64 bit  (Read 7407 times)

Ran

  • Guest
32 bits <-> 64 bits SDL. dll problem on win7 64 bit
« on: September 10, 2013, 09:11:25 am »
Hello all,
I made a program with my 32 bits computer. SDL + Opengl.
I did send it to someonen with a 64 bits computer.
Yes, it didn't work, the 32 bit dll problem from SDL.
Question: Are there any graph api usable with no dll's ?
Or will I have to program with native windows ?

Greetings,
Fred
« Last Edit: September 16, 2013, 10:45:05 am by Ran »

Offline jj2007

  • Member
  • *
  • Posts: 471
Re: 32 bits <-> 64 bits dll problem
« Reply #1 on: September 10, 2013, 01:41:20 pm »
"It didn't work" - what does that mean? Crashes (what kind of)? Error messages?

32-bit DLLs cannot be used in 64-bit executables, but 32-bit executables work fine on Win64. So what's the problem? Be more specific...

Ran

  • Guest
Re: 32 bits <-> 64 bits dll problem
« Reply #2 on: September 10, 2013, 03:26:00 pm »
Well, I cannot see what happening on the 64 bits machine because I do not have a 64 bits.
I only know that it did not work. There was no crash.
So I'm trying to find a solution to run my program on his computer by searching for another way
(another api) who has no dll's (I do not think that I can use the 64 bit dll from SDL on my 32 bits machine).
So, the runtime dll's are a problem and I'm looking for an api with no dll's or with a static runtime lib.

Greetings,
Fred 

Ran

  • Guest
Re: 32 bits <-> 64 bits dll problem
« Reply #3 on: September 11, 2013, 07:23:57 am »
Then I did send the SDL.dll 64 bits to the person with the 64 bits Win7 computer and even this didn't work because he had a
expection error starting the program.
So SDL does not work on 64 bits machines at all.
I did try to run my 32 bits program with the SDL.dll(64 bit) on my 32 bits computer and that doesn't work.
Question: Can we program anything for a 64 bits computer on our 32 bits computers ??????

Gr,
Fred

Offline frankie

  • Global Moderator
  • Member
  • *****
  • Posts: 1612
Re: 32 bits <-> 64 bits dll problem
« Reply #4 on: September 11, 2013, 09:13:49 am »
You cannot run mixed 32-64bits executables and dll's. Not even static libs.
You can run an executable compiled for 32 bits under a windows 64bits OS, but not the reverse.
I'm not sure that is your problem the fact that your 32 bits program doesn't run on the 64 bits machine. Probably the problem is on the 64bit machine (the DLL is correctly installed?)
The best solution is to recompile your sources with 64 bits compiler.

And yes you can compile on a system programs for different systems, processors and even OS's. This is called Cross-Compiling, and PellesC is a cross compiler for 32 and 64 bits, but unfortunately this possibility is available only with the 64 bits version of PellesC.... >:(

Last there should be around some preliminary static library versions of SDL. A solution can be to try to link with the static library to get a single executable to avoid to deal with the DLL.
« Last Edit: September 11, 2013, 09:17:47 am by frankie »

Ran

  • Guest
Re: 32 bits <-> 64 bits dll problem
« Reply #5 on: September 11, 2013, 09:19:37 am »
Yes I was afraid for that. With my 32 bits computer I cannot make 64 bits progs.

Fred

Offline TimoVJL

  • Global Moderator
  • Member
  • *****
  • Posts: 1642
Re: 32 bits <-> 64 bits dll problem
« Reply #6 on: September 11, 2013, 01:54:17 pm »
Yes I was afraid for that. With my 32 bits computer I cannot make 64 bits progs.

Fred
If you copy 64-bit libraries to PellesC 32-bit, you can compile and link 64-bit programs.
Just 32bit poide doesn't support 64 bit development.

PS: Why your friend can't use 32-bit application with 32-bit SDL.dll in same folder ?
Quote
So SDL does not work on 64 bits machines at all.
64-bit Win 7 works with 64-bit SDL with 64-bit application.
May the source be with you

Offline jj2007

  • Member
  • *
  • Posts: 471
Re: 32 bits <-> 64 bits dll problem
« Reply #7 on: September 11, 2013, 08:34:07 pm »
Your 32-bit application with a 32-bit DLL or static lib should work perfectly on a 64-bit Win7 or Win8 computer. If that is not the case, zip it and post it here - with Olly, it shouldn't be particularly difficult to see where the crash happens, and why.

Ran

  • Guest
Re: 32 bits <-> 64 bits dll problem
« Reply #8 on: September 12, 2013, 10:37:48 am »
Well, I have an acer aspire and I removed win7 32 bits yesterday and did put win7 64 bits.
I thought my processor was not ok with 64 bits but when I looked at it it could run 64 bits programs.
So, now I run win7 64 bits.
Ok.....
I downloaded SDL.dll 64 bits and put Pelle's C 64 bits on my computer.
Pell's C works ok.
Then tried to run my program and got an error indeed: The application was unable to start correctly error 0xc000007b
Got something to do with runtime (dll ????) probably yes ?????
So on 32 bits no ploblems what so ever, 64 bits -> error.
I did try as a test to run a simple Opengl NeHe nr.2 program on Pelle's C = no problem...... = native windows programming !!!!! ?????
Gr and thanks,

Fred

Offline TimoVJL

  • Global Moderator
  • Member
  • *****
  • Posts: 1642
Re: 32 bits <-> 64 bits dll problem
« Reply #9 on: September 12, 2013, 01:40:18 pm »
error 0xc000007b = STATUS_INVALID_IMAGE_FORMAT
Check your program with this: Dependency Walker 2.2
May the source be with you

Ran

  • Guest
Re: 32 bits <-> 64 bits dll problem
« Reply #10 on: September 12, 2013, 02:48:59 pm »
Thanks, I will try that !!!!

Fred

Ran

  • Guest
Re: 32 bits <-> 64 bits dll problem
« Reply #11 on: September 15, 2013, 03:31:00 pm »
Must say that I wanted something that starts without problems what so ever and so I searched to find an ututily.
The only thing that works without problems is: Glut.
http://www.smorgasbordet.com/pellesc/sample_hilltuts.htm
But glut.lib is not needed, only glut32.lib.
And here the glut32.dll works in windows 32 bit and 64 bit.
Glut is of course not the best tool.... but glfw nor SDL is working....without any problems !!!!
Greetings,
Fred

 

Ran

  • Guest
Re: 32 bits <-> 64 bits dll problem
« Reply #12 on: September 16, 2013, 10:43:47 am »
Hello,

I found an answer to the SDL problem, it is simple:
Only use the SDL.dll 1.2.12 when in win 7 64 bit mode.
It works.....
Do not use the 1.2.14 SDL.dll, it gives you a 0xc000007b exception error.
Greetings,
Fred 

Offline TimoVJL

  • Global Moderator
  • Member
  • *****
  • Posts: 1642
Re: 32 bits <-> 64 bits dll problem
« Reply #13 on: September 16, 2013, 01:40:53 pm »
...
Only use the SDL.dll 1.2.12 when in win 7 64 bit mode.
...
do you mean 1.2.15 ?
That devel package comes with  64-bit version dll/lib.

EDIT: 32/64-bit test project.
« Last Edit: September 17, 2013, 05:29:35 am by timovjl »
May the source be with you

Ran

  • Guest
Re: 32 bits <-> 64 bits SDL. dll problem on win7 64 bit
« Reply #14 on: September 16, 2013, 07:54:52 pm »
Hey timovjl,

No, I mean 1.2.12 for sure.
I used the 64 bit dll from 1.2.15 and it didn't work.
And how does I know that I have to use 1.2.12, well because the game "Battle for Wesnoth"
is made with SDL and the people who used the new SDL.dll' s stated that it didn't work
and that people had to use an earlier dll.
I have nothing to do with Wesnoth but that is how I found how to use SDL with WIN7 64 bit.
Look at:
http://forums.wesnoth.org/viewtopic.php?f=4&t=36959
I was very glad with this info.
Greetings,
Fred
« Last Edit: September 16, 2013, 07:57:53 pm by Ran »