Is the compilation instructions accurate for 64-bit Windows?
Moderator: Moderator
Re: Is the compilation instructions accurate for 64-bit Wind
Sounds like you're getting closer, Rectifier. I am wondering, though, what steps you took to install the SDL library (nevermind the "other" SDL_* libs such as SDL_mixer and SDL_image). Did you get 1.3 from here:
http://www.libsdl.org/hg.php
and build it yourself, or are you using something different?
http://www.libsdl.org/hg.php
and build it yourself, or are you using something different?
Re: Is the compilation instructions accurate for 64-bit Wind
Now that you mention it, I do not recall whatsoever where I got sdl, so I grabbed the source and built it.
Its version 1.2.14, do I need 1.3?
Still seeing the same error output in msys.
Its version 1.2.14, do I need 1.3?
Still seeing the same error output in msys.
Re: Is the compilation instructions accurate for 64-bit Wind
Yup, you need version 1.3.
Re: Is the compilation instructions accurate for 64-bit Wind
Okay I built sdl 1.3.6050, and now I get this in the output.
Code: Select all
==== Building TEngine (debug) ====
Running pre-build commands
windres ../src/windows/icon.rc -O coff -o ../src/windows/icon.res
core_lua.c
<command-line>:0:0: warning: "TENGINE_HOME_PATH" redefined [enabled by default]
<command-line>:0:0: note: this is the location of the previous definition
../src/core_lua.c: In function 'lua_key_set_clipboard':
../src/core_lua.c:216:14: warning: initialization discards 'const' qualifier from pointer target type [enabled by default]
display_sdl.c
<command-line>:0:0: warning: "TENGINE_HOME_PATH" redefined [enabled by default]
<command-line>:0:0: note: this is the location of the previous definition
dmnd_square.c
<command-line>:0:0: warning: "TENGINE_HOME_PATH" redefined [enabled by default]
<command-line>:0:0: note: this is the location of the previous definition
fov.c
<command-line>:0:0: warning: "TENGINE_HOME_PATH" redefined [enabled by default]
<command-line>:0:0: note: this is the location of the previous definition
getself.c
<command-line>:0:0: warning: "TENGINE_HOME_PATH" redefined [enabled by default]
<command-line>:0:0: note: this is the location of the previous definition
glew.c
<command-line>:0:0: warning: "TENGINE_HOME_PATH" redefined [enabled by default]
<command-line>:0:0: note: this is the location of the previous definition
main.c
<command-line>:0:0: warning: "TENGINE_HOME_PATH" redefined [enabled by default]
<command-line>:0:0: note: this is the location of the previous definition
In file included from ../src/main.c:40:0:
../src/music.h:29:19: fatal error: AL/al.h: No such file or directory
compilation terminated.
make[1]: *** [../obj/Debug/TEngine/main.o] Error 1
make: *** [TEngine] Error 2
Re: Is the compilation instructions accurate for 64-bit Wind
Sounds like you have SDL working, and now you need the OpenAL library, or libal, or whatever it's called.
On Debian the package name is libopenal-dev, and the package documentation says it came from http://kcat.strangesoft.net/openal.html . Hope that helps.
On Debian the package name is libopenal-dev, and the package documentation says it came from http://kcat.strangesoft.net/openal.html . Hope that helps.
Re: Is the compilation instructions accurate for 64-bit Wind
Added the open-al files, the .dll to my win's system folders like the instructions pointed out and the .h files to /c/mingw/include/al/
Tried linking premade4.lua straight to the openal folder I made, but it yelled at me so I made the folder and moved them.
This is where I'm at now...does not seem to like one of the sdl files.
Tried linking premade4.lua straight to the openal folder I made, but it yelled at me so I made the folder and moved them.
This is where I'm at now...does not seem to like one of the sdl files.
Code: Select all
==== Building TEngine (debug) ====
Running pre-build commands
windres ../src/windows/icon.rc -O coff -o ../src/windows/icon.res
main.c
<command-line>:0:0: warning: "TENGINE_HOME_PATH" redefined [enabled by default]
<command-line>:0:0: note: this is the location of the previous definition
../src/main.c:75:32: warning: initialization makes integer from pointer without a cast [enabled by default]
../src/main.c:76:33: warning: initialization makes integer from pointer without a cast [enabled by default]
../src/main.c: In function 'setupRealtime':
../src/main.c:653:21: warning: assignment makes integer from pointer without a cast [enabled by default]
map.c
<command-line>:0:0: warning: "TENGINE_HOME_PATH" redefined [enabled by default]
<command-line>:0:0: note: this is the location of the previous definition
../src/map.c: In function 'map_set_grid':
../src/map.c:779:23: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
music.c
<command-line>:0:0: warning: "TENGINE_HOME_PATH" redefined [enabled by default]
<command-line>:0:0: note: this is the location of the previous definition
../src/music.c: In function 'loadsoundLua':
../src/music.c:278:3: warning: passing argument 2 of 'SDL_CreateThread' from incompatible pointer type [enabled by default]
c:/MinGW/sdl13/include/SDL_thread.h:145:1: note: expected 'const char *' but argument is of type 'struct Sound *'
../src/music.c:278:3: error: too few arguments to function 'SDL_CreateThread'
c:/MinGW/sdl13/include/SDL_thread.h:145:1: note: declared here
make[1]: *** [../obj/Debug/TEngine/music.o] Error 1
make: *** [TEngine] Error 2
Re: Is the compilation instructions accurate for 64-bit Wind
Great! You are almost there. DarkGod is currently using an older version of sdl-1.3 (from three-ish months ago), so you'll need to make a simple change three different places (in "music.c", "particles.c", and "profile.c"):
http://forums.te4.org/viewtopic.php?f=4 ... 10&start=7
In short, you need to change code like:to
http://forums.te4.org/viewtopic.php?f=4 ... 10&start=7
In short, you need to change code like:
Code: Select all
thread = SDL_CreateThread(thread_particles, pt);
Code: Select all
const char *name = "Particles";
thread = SDL_CreateThread(thread_particles, name, pt);
Re: Is the compilation instructions accurate for 64-bit Wind
Did what was mentioned in those threads, the error output changed slightly, but yeah...
Code: Select all
==== Building TEngine (debug) ====
Running pre-build commands
windres ../src/windows/icon.rc -O coff -o ../src/windows/icon.res
music.c
<command-line>:0:0: warning: "TENGINE_HOME_PATH" redefined [enabled by default]
<command-line>:0:0: note: this is the location of the previous definition
../src/music.c: In function 'loadsoundLua':
../src/music.c:278:5: warning: passing argument 2 of 'SDL_CreateThread' from incompatible pointer type [enabled by default]
c:/MinGW/sdl13/include/SDL_thread.h:145:1: note: expected 'const char *' but argument is of type 'struct Sound *'
../src/music.c:278:5: error: too few arguments to function 'SDL_CreateThread'
c:/MinGW/sdl13/include/SDL_thread.h:145:1: note: declared here
../src/music.c:280:3: warning: passing argument 2 of 'SDL_CreateThread' from incompatible pointer type [enabled by default]
c:/MinGW/sdl13/include/SDL_thread.h:145:1: note: expected 'const char *' but argument is of type 'struct Sound *'
../src/music.c:280:3: error: too few arguments to function 'SDL_CreateThread'
c:/MinGW/sdl13/include/SDL_thread.h:145:1: note: declared here
make[1]: *** [../obj/Debug/TEngine/music.o] Error 1
make: *** [TEngine] Error 2
Re: Is the compilation instructions accurate for 64-bit Wind
Are you sure you applied the code changes correctly? I just updated to the most recent SDL to verify it still works, and it does for me.
The issue is that "SDL_CreateThread" now requires three parameters, whereas it used to only have two. What used to be the second parameter is now the third. The compilation error you posted would happen if the second parameter is still the second parameter. So, please double-check the following changes:
profile.c, line 210-1:
music.c, line 278-9:
particles.c, line 893-4:
Good luck! If it still doesn't work and you think it should, then do "make clean" then "make".
The issue is that "SDL_CreateThread" now requires three parameters, whereas it used to only have two. What used to be the second parameter is now the third. The compilation error you posted would happen if the second parameter is still the second parameter. So, please double-check the following changes:
profile.c, line 210-1:
Code: Select all
const char *name = "Profile";
thread = SDL_CreateThread(thread_profile, name, profile);
Code: Select all
const char *name = "Sound";
sound->loaderThread = SDL_CreateThread(streamingLoader, name, sound);
Code: Select all
const char *name = "Particles";
thread = SDL_CreateThread(thread_particles, name, pt);
Re: Is the compilation instructions accurate for 64-bit Wind
Fixed the last problem but nao I get dis 

Code: Select all
Linking TEngine
c:/mingw/bin/../lib/gcc/mingw32/4.6.1/../../../../mingw32/bin/ld.exe: cannot find -lSDLmain
c:/mingw/bin/../lib/gcc/mingw32/4.6.1/../../../../mingw32/bin/ld.exe: cannot find -lopenal32
c:/mingw/bin/../lib/gcc/mingw32/4.6.1/../../../../mingw32/bin/ld.exe: cannot find -lvorbisfile
c:/mingw/bin/../lib/gcc/mingw32/4.6.1/../../../../mingw32/bin/ld.exe: cannot find -lpng12
collect2: ld returned 1 exit status
make[1]: *** [../bin/Debug/t-engine.exe] Error 1
make: *** [TEngine] Error 2
Re: Is the compilation instructions accurate for 64-bit Wind
Cool, so you compiled. You're getting very close. Now the linker doesn't know where to find the libraries (*.dll's). Double check your paths, and make sure the *dll's are where the paths say they are. I haven't compiled ToME in Windows before, so I doubt I can be much more help.
Re: Is the compilation instructions accurate for 64-bit Wind
Okay so I've looked at the mingw website and figured out where it looks for the libraries, but what exactly does that jargon mean?
Are these supposed to be .a, .h, or .dll ?
If they are supposed to be .dll the filenames don't exactly match...
Based on the contents of one of the folders they seem to be .a files.
Code: Select all
-lSDLmain
-lopenal32
-lvorbisfile
-lpng12
If they are supposed to be .dll the filenames don't exactly match...
Based on the contents of one of the folders they seem to be .a files.
Re: Is the compilation instructions accurate for 64-bit Wind
That the linker is trying to link against these library objects, which can be *.dll or *.a (or *.so in linux).Rectifier wrote:Okay so I've looked at the mingw website and figured out where it looks for the libraries, but what exactly does that jargon mean?Code: Select all
-lSDLmain -lopenal32 -lvorbisfile -lpng12
So, in your premake4.lua file, "libdirs {" should include the locations where the necessary library objects are located (such as "libSDL.dll" or something similar). You can also check the file "build/TEngine.make" and look at the "LIBS = " line to see if it includes the location for the libraries (such as via "-L/c/mingw/lib").
Re: Is the compilation instructions accurate for 64-bit Wind
Moved the various .a files into mingw/lib, where I know is the place msys/gcc looks at.
Okay then. Had to compile libogg and libvorbis to continue, and I got this error over a hundred times where the (.text+) thing changed the hex number.
Which of course leads to:
This is why trying to program on windows suuuuucks.
Okay then. Had to compile libogg and libvorbis to continue, and I got this error over a hundred times where the (.text+) thing changed the hex number.
Code: Select all
c:/MinGW/lib/libvorbisfile.a(vorbisfile.o):vorbisfile.c:(.text+0x2c1c): undefined reference to `vorbis_synthesis_halfrate_p'
Which of course leads to:
Code: Select all
collect2: ld returned 1 exit status
make[1]: *** [../bin/Debug/t-engine.exe] Error 1
make: *** [TEngine] Error 2
Re: Is the compilation instructions accurate for 64-bit Wind
If I understand correctly, you tried to compile ogg and vorbis but encountered errors, right? I think somebody else who has experience in building ToME in Windows should probably try to help you now. My suggestion would be to find pre-built library objects of ogg and vorbis, which shouldn't be too terribly difficult to find.