Page 1 of 1

linker error? 0x162d undefined reference

Posted: Fri Jul 29, 2011 1:24 am
by bludshot
I'm currently stuck on a compiler error:

LD build/release-mingw32-x86/baseq3/cgamex86.dll
build/release-mingw32-x86/baseq3/cgame/cg_main.o:cg_main.c:(.text+0x162d): undefined reference to `String_Parse'
collect2: ld returned 1 exit status

I don't understand this error, because as far as I can see String_Parse *is* defined.

In cg_main.c I've added a function (from NS:CO source code) in which String_Parse() is called. This is the only line in all of cg_main.c where String_Parse() is called, so it's the line creating the error.

However, at the top of cg_main.c I have
#include "../ui/ui_shared.h"

And in ui_shared.h String_Parse is defined.

Perhaps cg_main.c just doesn't have access to things in ui_shared.c (where the actual String_Parse function is defined)???

Re: linker error? 0x162d undefined reference

Posted: Fri Jul 29, 2011 2:45 pm
by ^misantropia^
bludshot wrote:Perhaps cg_main.c just doesn't have access to things in ui_shared.c (where the actual String_Parse function is defined)???
That's correct.