Development > Newbie Coding
Undefined Reference
criusmac:
While I am compiling the game project (Specifically g_combat.c), I am getting undefined reference errors to all the code I added in the ufo project (Specifically cl_actor.c).
From what I understand, it can't find the object code, probably due to them being in different projects.
I realize I can probably solve this by moving these functions into g_combat.c, but I would rather keep them together since they really all deal with the actor. Is there another way to solve this?
Destructavator:
Although I'm not an advanced coder, I'd suggest that you post some of your code in your posts, in-between the code tags - assuming you are using the default forum layout, this is done with the "pound" or "number sign" - " # " in the buttons above where you post (apologies if you already happen to know this).
Either that, or including your code files in an attachment to your post would likely help, re-naming them to .txt files.
Mattn:
you can't add code from cl_actor.c into the g_* files - the g_* files will end in a shared object file (or dylib or dll) - the cl_* files are used to link the ufo binary itself, not the game.dylib.
Show us your patch and then we can say more and help you a little out
criusmac:
Thank you for the help, you have solved my problem.
The solution is I have to transfer my new functions from cl_actor.c to g_combat.c.
It is unfortunate there wasn't a different solution, and the functions I'm creating must be spread apart, but such is the way it is written. I might as well rename the functions too, I'll update my todo list when I decide on the new names.
Mattn:
what are you working on? patches already available?
Navigation
[0] Message Index
[#] Next page
Go to full version