The Ur-Quan Masters Discussion Forum

The Ur-Quan Masters Re-Release => Technical Issues => Topic started by: GDP_Spaceman on May 08, 2003, 01:48:19 am



Title: Linker problem
Post by: GDP_Spaceman on May 08, 2003, 01:48:19 am
Hi all,

i use the programm "DevC++ 4.9.8" to build the exe-file.

Compiler runs with no errors, only some warnings.
But the linker post many errors like this:

Sternkontrolle.o(.text+0x111a):Sternkontrolle.c: undefined reference to `TFB_InitGraphics'

what can is do to solve this problem?

thanks for all help . . .

Spacy


Title: Re: Linker problem
Post by: chmmravatar on May 08, 2003, 05:26:24 am
Sternkontrolle.c? There's no Sternkontrolle.c, I don't think. Did you rename files? Anyhow, I don't think uqm compiles on devc++ at this point. Though honestly I haven't tried it myself. I believe only visual c++ 6 and 7 are officially supported at this point (but don't quote me on that).


Title: Re: Linker problem
Post by: GDP_Spaceman on May 08, 2003, 01:26:46 pm
Sternkontrolle.c is the main c-file (starcon2.c)

And thats true, there is a VC++ projekt. But i don't have this
software, and i don't want to buy it. DevC++ is free to use . . .

I think, there is a bug in my linker-configuration or somthing
like this . . . but i don't know where
I have the same problem with mingw

Hope anyone can help me  ::)


Title: Re: Linker problem
Post by: chmmravatar on May 09, 2003, 01:19:32 am
Wait, so you did change the file names? Or you didn't? That could be what's breaking it.


Title: Re: Linker problem
Post by: GDP_Spaceman on May 09, 2003, 01:30:11 am
I changed only the name of the main c file . . . . thats not the problem


Title: Re: Linker problem
Post by: Death 999 on May 09, 2003, 02:08:31 am
"SternKontrolle" == Deutsch (German) for "Star Control"
Just to help out those non-German-speakers.


Title: Re: Linker problem
Post by: miri on May 09, 2003, 04:57:45 am
Hi!

I got it working with mingw, and I advice you to try as well. It is also free of charge, and there are instructions available for it!

http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/*checkout*/sc2/sc2/INSTALL.mingw


Title: Re: Linker problem
Post by: chmmravatar on May 09, 2003, 05:06:08 am
Well, I still don't think it's a good idea to rename any of the files. But anyhow, the problem is probably either that you aren't compiling all of the .c files, or your makefile is not correct.

TFB_InitGraphics is declared in src/sc2code/libs/graphics/gfx_common.h, but actually implemented in src/sc2code/libs/graphics/sdl/sdl_common.c. If your makefile doesn't take this into account, you're going to get the linker error. (Short answer: starcon2.o depends on sdl_common.o). There's many other instances of dependencies such as this.


Title: Re: Linker problem
Post by: GDP_Spaceman on May 10, 2003, 05:04:35 am
Yea baby yea . . . . IT WORKS  ;D

I found the bug . . . wrong compiler and linker options
thx all for help

DevC++ run fine now 8)