Development > Newbie Coding

Undefined Reference

<< < (5/6) > >>

criusmac:
Ok, well, assuming I manage to download all of the source code and needed files, and I move all my code into g_actor.c as told, may I get some advice on how to fix my memory allocation problem?


--- Quote from: criusmac on September 17, 2009, 09:56:23 pm ---Right now, as far as I can tell, the problem you are stating Mattn (aside from the comments on how poorly written my code in progress is) is that the dll is not using the same heap manager as the rest of the code. If this is the case, even if I create my own linked list in the dll, it will run into the same problem.

From what I understand, the code should have been written so that only one module is handling all the allocations and the frees. Any allocations in the dll should have already been using the same allocator.. If this is the case, there shouldn't be any problem using the existing linked list code in the dll. If this is not the case, there are going to be a lot of other problems in the dll code if it does any sort of memory allocations at all... Even if I create my own linked list to do so.

So, right now, the way I see it... I can't continue properly, since the suggestion given and the reason given by you are conflicting with each other.

IE: If different memory pools are being used, then I can't create my own linked list to get around it anyways. My code absolutely *must* be able to transfer the memory contents between the dll portion and the rest of the code since wounds need to be handled in combat, and hospitals, and save files, and etc. Is what I'm trying to do impossible due to this?

--- End quote ---

criusmac:
Ok, I decided I would try to do a full checkout since no other options were working, and I supplied my existing development directory hoping it wouldn't download the unchanged files. This appears to have not worked at all, and I killed it after 382 megs were downloaded. I figure I can just not use the internet for a week or so, and get it back. Since I now have pretty much all the source code, I'm ready for whatever suggestions you guys have.

I wonder why everything is a red exclamation mark. I'll have to look up what that means.

*edit*
Ok, I changed everything to a green checkmark by reverting the directories. That didn't use any bandwidth, so that's nice. Everything appears to be up to date now... Of what I managed to download. I just won't run the game until I get the rest of the files. It's too bad svn can't tell the files are old versions and update them without saving the revision numbers.. But alas, I guess it's just not done often enough to warrant implementation.

Kildor:
> I wonder why everything is a red exclamation mark. I'll have to look up what that means.
Screenshot, please.

PS: And you *must* checkout SVN to empty folder or you will get errors.

criusmac:
The red exclamation mark just means it thinks I modified the file, and it merged the new changes in.

And no, I don't need to checkout SVN to empty folder, and I won't get errors. I can say this since I just did this. Not a single error, just every file got merged instead of reverted.

criusmac:
Well, in the end, I had to just update everything. $5 isn't enough to worry about yet. So everything is updated and reverted.

This still leaves me with my original problem. A bunch of linked list undefined references.

Linking dynamic library: ..\..\base\game.dll
.objs\game\src\game\g_actor.o: In function `G_ActorDamage':C:/cprogs/UFOAI-2.3-dev/src/game/g_actor.c:202: undefined reference to `LIST_AddPointer'
.objs\game\src\game\g_actor.o: In function `G_ActorTreat':C:/cprogs/UFOAI-2.3-dev/src/game/g_actor.c:319: undefined reference to `LIST_GetByIdx

From what I can tell, the suggestion was to create my own linked list not using any of the undefined referenced code... Or, in other words, copy and paste all the linked list functions to the dll. If this is still what you want, I can go ahead and do that.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version