UFO:Alien Invasion

Development => Coding => Topic started by: kain on November 14, 2006, 07:59:42 pm

Title: Compiler of choice
Post by: kain on November 14, 2006, 07:59:42 pm
What compiler does the official release candidate get compiled with? I have not had any success with visual studio 2005, and I can't compile SVN with dev-cpp (only the RC5 compiles with devcpp... good sign). I am trying code::blocks now, but I am curious to know what the official windows binaries are compiled with.

Great game so far! Thanks!

Edit: I just tried codeblocks, and it doesn't work either... not sure where to go from here. :( I would love to contribute to this project, but I can't seem to get it compiled.
Title: Re: Compiler of choice
Post by: kain on November 14, 2006, 08:09:11 pm
What libraries do I need to install for codeblocks to work? I like the looks of this IDE a lot, but the wiki doesn't say which libraries to install. I'm going to try to go off of the dev-cpp list.
Title: Compiler of choice
Post by: Mattn on November 14, 2006, 08:11:29 pm
i use dev-cpp to compile it - but we recently introduced openal-support - and the windows support is not completed atm. just remove the snd_openal.c, qal.c snd qal_win.c from dev-cpp project files to bulid without openal - "should" work
Title: Compiler of choice
Post by: kain on November 14, 2006, 08:13:34 pm
Quote from: "Mattn"
i use dev-cpp to compile it - but we recently introduced openal-support - and the windows support is not completed atm. just remove the snd_openal.c, qal.c snd qal_win.c from dev-cpp project files to bulid without openal - "should" work


ok so I should be able to update svn and it will compile with the dev-cpp projects now?

Edit: I just reread what you said. I thought you said that you just removed the files, but I have to remove them. Gotcha. Thanks!
Title: Compiler of choice
Post by: kain on November 14, 2006, 08:17:41 pm
I did notice that qal files were the ones I was having problems with... I hope it works. Currently waiting for the SVN to download again since I wiped it before.
Title: Compiler of choice
Post by: kain on November 14, 2006, 08:36:14 pm
Quote from: "Mattn"
i use dev-cpp to compile it - but we recently introduced openal-support - and the windows support is not completed atm. just remove the snd_openal.c, qal.c snd qal_win.c from dev-cpp project files to bulid without openal - "should" work


What do you know... it worked :)

Thanks!
Title: Problem linking ref_gl
Post by: kain on November 14, 2006, 08:52:47 pm
Everything is good except linking the ref_gl package:

Code: [Select]
../../src/ref_gl/gl_image.o(.text+0xa60):gl_image.c: undefined reference to `png_get_io_ptr'
../../src/ref_gl/gl_image.o(.text+0xaf1):gl_image.c: undefined reference to `png_check_sig'
../../src/ref_gl/gl_image.o(.text+0xb4c):gl_image.c: undefined reference to `png_create_read_struct'
../../src/ref_gl/gl_image.o(.text+0xb8c):gl_image.c: undefined reference to `png_create_info_struct'
../../src/ref_gl/gl_image.o(.text+0xbb0):gl_image.c: undefined reference to `png_destroy_read_struct'
../../src/ref_gl/gl_image.o(.text+0xbe7):gl_image.c: undefined reference to `png_create_info_struct'
../../src/ref_gl/gl_image.o(.text+0xc0a):gl_image.c: undefined reference to `png_destroy_read_struct'
../../src/ref_gl/gl_image.o(.text+0xc50):gl_image.c: undefined reference to `png_set_read_fn'
../../src/ref_gl/gl_image.o(.text+0xc72):gl_image.c: undefined reference to `png_read_png'
../../src/ref_gl/gl_image.o(.text+0xc84):gl_image.c: undefined reference to `png_get_rows'

../../src/ref_gl/gl_image.o(.text+0xdf3):gl_image.c: undefined reference to `png_destroy_read_struct'
../../src/ref_gl/gl_image.o(.text+0xe36):gl_image.c: undefined reference to `png_create_write_struct'
../../src/ref_gl/gl_image.o(.text+0xe5b):gl_image.c: undefined reference to `png_create_info_struct'
../../src/ref_gl/gl_image.o(.text+0xe77):gl_image.c: undefined reference to `png_destroy_write_struct'
../../src/ref_gl/gl_image.o(.text+0xe9a):gl_image.c: undefined reference to `png_init_io'
../../src/ref_gl/gl_image.o(.text+0xee2):gl_image.c: undefined reference to `png_set_IHDR'
../../src/ref_gl/gl_image.o(.text+0xef5):gl_image.c: undefined reference to `png_set_compression_level'
../../src/ref_gl/gl_image.o(.text+0xf08):gl_image.c: undefined reference to `png_set_compression_mem_level'
../../src/ref_gl/gl_image.o(.text+0xf1a):gl_image.c: undefined reference to `png_write_info'
../../src/ref_gl/gl_image.o(.text+0xf7d):gl_image.c: undefined reference to `png_write_image'
../../src/ref_gl/gl_image.o(.text+0xf8f):gl_image.c: undefined reference to `png_write_end'
../../src/ref_gl/gl_image.o(.text+0xfa1):gl_image.c: undefined reference to `png_destroy_write_struct'
collect2: ld returned 1 exit status

C:\Dev-Cpp\Bin\dllwrap.exe: c++ exited with status 1

make.exe: *** [../../ref_gl.dll] Error 1

Execution terminated
Title: Compiler of choice
Post by: Moe on November 14, 2006, 10:11:17 pm
well ref_gl.dev, ufo.dev, campaigneditor.dev and snd_dx.dev have some issues under devcc.maybe they get fixed.
other problem is as i know that one packes for the devcc is outdated so there happen some problems.
Title: Compiler of choice
Post by: Mattn on November 14, 2006, 10:24:22 pm
install libpng (see wiki) and add -lpng to project linker flags
Title: Compiler of choice
Post by: kain on November 15, 2006, 12:25:02 am
yea... I instaled libpng already but never thought to change the linker flags... duh!
Title: Compiler of choice
Post by: kain on November 15, 2006, 12:37:53 am
Now to find where to change the linker parameters... any hints? I've never used devcpp before, sorry.
Title: Compiler of choice
Post by: kain on November 15, 2006, 02:40:37 am
Nevermind... I had to right click on the project and go to project options... all compiled. Now I'm going to try to run it :)
Title: Compiler of choice
Post by: kain on November 15, 2006, 02:47:41 am
AWESOME!!!! It runs!!

I had to copy the new library dll files to the game dir, but it runs great! Now I can keep up with the development, and maybe even offer some help when needed :) I'm good with c/c++, so I'm going to try.
Title: Compiler of choice
Post by: kain on November 15, 2006, 03:21:31 am
Hrm... everything compiles fine now, but when I run the game there are some quirky things going on. I setup my first base, and no buildings show up to place. I also don't see anything in the buy/sell list, and I can't go to the options menu at all. I'm sorry if this is all known stuff... just let me know :)

Thanks!
Title: Compiler of choice
Post by: Mattn on November 15, 2006, 08:19:31 am
no, this is not known. at least not by me. let's discuss in irc about your problem
Title: Compiler of choice
Post by: kain on November 15, 2006, 02:39:15 pm
Quote from: "Mattn"
no, this is not known. at least not by me. let's discuss in irc about your problem

Ok... I'm Kainazzzo on freenode. I left my bouncer connected, so I'm on there at all times, but I might not be at my computer. If you say something to me, I can check the logs, though... wouldn't be any different than the forums though lol

How should I be running this? Right now, I have installed RC5, and I've just overwritten the files with my compiled versions. I did that because i didn't see intl.dll at all. How should I do it?
Title: Compiler of choice
Post by: kain on November 15, 2006, 03:54:31 pm
Alright... I got it working by putting all the files and dlls in the main directory of the SVN download. It's a bit messy, but it seems to work. The only thing I noticed is that the intro doesn't have any actual story anymore, but it just scrolls:

intro_sentence1
intro_sentence2
intro_sentence3
intro_sentence4

etc...

I know you guys are working on a storyline, so I am guessing that is it.

If I'm not setting up the game directory right for running, please let me know what I did wrong.

Thanks!