UFO:Alien Invasion

Development => Newbie Coding => Topic started by: criusmac on September 16, 2009, 01:17:35 am

Title: Undefined Reference
Post by: criusmac on September 16, 2009, 01:17:35 am
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?
Title: Re: Undefined Reference
Post by: Destructavator on September 16, 2009, 04:55:22 am
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.
Title: Re: Undefined Reference
Post by: Mattn on September 16, 2009, 08:41:20 am
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
Title: Re: Undefined Reference
Post by: criusmac on September 16, 2009, 02:37:33 pm
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.
Title: Re: Undefined Reference
Post by: Mattn on September 16, 2009, 03:04:35 pm
what are you working on? patches already available?
Title: Re: Undefined Reference
Post by: criusmac on September 17, 2009, 05:53:14 pm
There are no patches available for what I'm working on.

I am working on medikits.
Title: Re: Undefined Reference
Post by: criusmac on September 17, 2009, 08:39:04 pm
After moving all my functions to g_combat.c, I now get different undefined references:


-------------- Build: windows_debug in game ---------------

Compiling: ..\..\src\game\g_combat.c
Linking dynamic library: ..\..\base\game.dll
.objs\game\src\game\g_combat.o: In function `CL_ActorDamage':C:/cprogs/UFOAI-2.3-dev/src/game/g_combat.c:205: undefined reference to `LIST_AddPointer'
.objs\game\src\game\g_combat.o: In function `CL_ActorTreat':C:/cprogs/UFOAI-2.3-dev/src/game/g_combat.c:305: undefined reference to `LIST_GetByIdx'
collect2: ld returned 1 exit status
Process terminated with status 1 (0 minutes, 2 seconds)
0 errors, 0 warnings
 
So, I've run into the problem that prevents me from adding this code to either cl_actor.c and g_combat.c.

I doubt it'll help any, but here is all the code I'm trying to compile... It is untested, and probably very buggy though, but here it is anyways:

Code: [Select]
/**
 * @brief Damage the actor.
 * @param[in] target Who is injured
 * @param[in] damage How much damage is being inflicted
 */
void CL_ActorDamage (edict_t *target, const int damage)
{
wound_t *newWound;
int randomValue;

/**< Sanity check, don't add a wound if no damage was done. */
if(damage <= 0)
return;

newWound = malloc(sizeof(wound_t));
/**< First determine where the wound is */
randomValue = rand() % (WOUND_HEAD_PROBABILITY + WOUND_CHEST_PROBABILITY + WOUND_ARMS_PROBABILITY + WOUND_LEGS_PROBABILITY);
if(randomValue < WOUND_HEAD_PROBABILITY)
newWound->location = WOUND_HEAD;
else if(randomValue < WOUND_HEAD_PROBABILITY + WOUND_CHEST_PROBABILITY)
newWound->location = WOUND_CHEST;
else if(randomValue < WOUND_HEAD_PROBABILITY + WOUND_CHEST_PROBABILITY + WOUND_ARMS_PROBABILITY)
newWound->location = WOUND_ARMS;
else if(randomValue < WOUND_HEAD_PROBABILITY + WOUND_CHEST_PROBABILITY + WOUND_ARMS_PROBABILITY + WOUND_LEGS_PROBABILITY)
newWound->location = WOUND_LEGS;
else /**< This should *never* happen, put out an error or something */
newWound->location %= WOUND_LEGS; /**< WOUND_LEGS is probably the highest enum value, so % by it. */

/**< Next determine if it is a wound */
if(damage < WOUND_MINIMUM_DAMAGE) {
newWound->affectSkill = 0;
newWound->treated = 1;
} else {
newWound->affectSkill = 1;
newWound->treated = 0;
}

/**< Finally set the damage of the wound */
newWound->value = damage;

/**< The wound is created, just add it to the target now */
LIST_AddPointer(&target->chr.wounds, newWound);
/**< Subtract the damage from the current hit points. */
target->HP -= damage;
}

int CL_ActorAccuracyDecreaseByWounds (edict_t *target)
{
linkedList_t *woundList;
wound_t *wound;
int armWounds = 0, headWounds = 0, returnValue = 0;

/**< Calculate Arm Wounds */
woundList = target->chr.wounds;
while (woundList) {
wound = (wound_t *)woundList->data;
if ((wound->location == WOUND_ARMS) && wound->affectSkill) {
if (wound->treated)
armWounds += wound->value / 2;
else
armWounds += wound->value;
}
woundList = woundList->next;
}
/**< TODO: Value of all arm wounds is now stored in armWounds, do something with it here. */

/**< Calculate Head Wounds */
woundList = target->chr.wounds;
while (woundList) {
wound = (wound_t *)woundList->data;
if ((wound->location == WOUND_HEAD) && wound->affectSkill) {
if (wound->treated)
headWounds += wound->value / 2;
else
headWounds += wound->value;
}
woundList = woundList->next;
}
/**< TODO: Value of all head wounds is now stored in headWounds, do something with it here. */

return returnValue;
}

int CL_ActorShootTUIncreaseByWounds (edict_t *target)
{
linkedList_t *woundList;
wound_t *wound;
int armWounds = 0, returnValue = 0;

/**< Calculate Arm Wounds */
woundList = target->chr.wounds;
while (woundList) {
wound = (wound_t *)woundList->data;
if ((wound->location == WOUND_ARMS) && wound->affectSkill) {
if (wound->treated)
armWounds += wound->value / 2;
else
armWounds += wound->value;
}
woundList = woundList->next;
}
/**< TODO: Value of all arm wounds is now stored in armWounds, do something with it here. */

return returnValue;
}

/**
 * @brief Treat the actor.
 * @param[in] target Who is treated
 * @param[in] damage /1000=type of healing, %1000 = amount of healing.
 */
void CL_ActorTreat (edict_t *target, const int damage)
{
int type, value, index, amount, woundNumber;
linkedList_t *woundList;
wound_t *treatWound;

type = damage / 1000;
value = damage % 1000;

/**< Sanity check on 'value' here if wanted. *
* I am leaving it out in case we want to subtract morale or something. */
if (type < 0)
type = -type;

if ( type == HEAL ) {
/**< First we locate the worst wound on the person being treated */
index = 0;
amount = 0;
woundNumber = 0;
woundList = target->chr.wounds;
while (woundList) {
treatWound = (wound_t *)woundList->data;
if ((!treatWound->treated) && (treatWound->value > amount)) {
    amount = treatWound->value;
    woundNumber = index;
}
index++;
woundList = woundList->next;
}
woundList = target->chr.wounds;
treatWound = (wound_t *)LIST_GetByIdx(woundList, woundNumber);
/**< Heal the wound a bit. We will simply subtract 10% of the wound from itself. */
treatWound->value -= treatWound->value / 10;
treatWound->treated = 1;
target->HP += treatWound->value / 10;
} else if (type == MORALE) {
target->morale -= value;
target->morale = min (target->morale, 100);
target->morale = max (target->morale, 0);
} else if (type == STUN) {
target->STUN -= value;
target->STUN = min (target->STUN, 255);
target->STUN = max (target->STUN, 0);
} else {

}
}
Title: Re: Undefined Reference
Post by: Mattn on September 17, 2009, 09:20:58 pm
you can't use the linked list directly. it is using memory pools that are not available in the game lib - keep in mind that the stuff below src/game/ will end in a dll - you can use most of the stuff from src/shared - but very little other stuff.

also please move your code into g_actor.c and change the prefix from CL_Actor* to G_Actor*

be a little bit more verbose on your comments please - describe exactly what each function is supposed to do.

the game lib is using callbacks for e.g. cvars and commands to access the server context (where the game lib is running at) see sv_game.c SV_InitGameProgs

but adding more function callbacks there is only accepted if no other choice is left. so maybe just make wound_t a linked list like this:

Code: [Select]
typedef struct wound_s {
[......]
[......]
struct wound_s *next;
} wound_t;

last but not least - please beware our coding guidelines ;)
Title: Re: Undefined Reference
Post by: criusmac on September 17, 2009, 09:38:29 pm
also please move your code into g_actor.c and change the prefix from CL_Actor* to G_Actor*

Yes, as stated before, once I figure out where the code is going, I will change the function names.

Quote
be a little bit more verbose on your comments please - describe exactly what each function is supposed to do.

Yes, as stated before, this code is *NOT* done, and will not be commented properly until it does exactly what I want. The number of times I've had to change this code already has made many comments vanish.

Quote
the game lib is using callbacks for e.g. cvars and commands to access the server context (where the game lib is running at) see sv_game.c SV_InitGameProgs

but adding more function callbacks there is only accepted if no other choice is left. so maybe just make wound_t a linked list like this:

Code: [Select]
typedef struct wound_s {
[......]
[......]
struct wound_s *next;
} wound_t;

So, you are suggesting that I create linkedList_t by copying all the functionality to the dll? I'm not sure exactly what you are suggesting.

Quote
last but not least - please beware our coding guidelines ;)

As stated before, I will finalize the code once I have written it. I will not beautify my code until it is complete since it takes so much time to do so, and it keeps changing due to various problems, such as this. This is actually what I figured might be said, which is why I originally didn't want to supply any code.
Title: Re: Undefined Reference
Post by: criusmac on September 17, 2009, 09:56:23 pm
I am probably over reacting, but it is how I feel, so I will leave it as was... (This attitude of mine always seems to get me into trouble)

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?
Title: Re: Undefined Reference
Post by: geever on September 17, 2009, 10:04:43 pm
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?

I don't know this (dll) part but did you check how character data shared? There is a communication in both directions (client->game, game->client) for sure...

-geever
Title: Re: Undefined Reference
Post by: criusmac on September 17, 2009, 10:15:02 pm
Sort of. The character data appears to be stored in character_t create in inv_shared.h. This already has a linked list built into it via teamDef_t, and so I included my linked list into character_t's data structure. The teamDef_t data structure appeared to be used in both the g_ and cp_ places, but I didn't pay attention to where its memory is allocated. Now that I look, it appears the memory is allocated only in the cp_ code.

Unfortunately, I can't do that the same way since memory has to be allocated and deallocated with regards to my linked list in both the g_ code, and the cp_ code.

For example:
Every time a wound is created I need to allocate in the g_ code since it happens in combat.
Every time a wound is healed, I need to deallocate in the cp_ code since it happens outside of combat.

*Edit*
I don't know this (dll) part but did you check how character data shared? There is a communication in both directions (client->game, game->client) for sure...

-geever

On second thought, I am unsure of what you are asking. It appears you are asking if I realize that the dll and non dll portions of the game can share data.. This is, at its surface an odd question since anyone can't avoid knowing that dlls share data with application code... So, you must be asking something else.. Are you asking if I've look at how memory is allocated between the client and the game? No, I never did. I did not even realize the game project was a dll since I don't know how to see that in code blocks.

I was unable to find g_actor.c in my current project, so I imagine I have to download everything again. From rereading Mattn's comments, it *sounds* like I need to move my code out of g_combat.c, and put it into inv_shared.c, which is in the src/shared, and go from there.
Title: Re: Undefined Reference
Post by: Duke on September 17, 2009, 10:53:17 pm
I was unable to find g_actor.c in my current project,
In C:B, 'game' project, it's pretty much the first source you see if you open the 'sources' folder.
No need to re-download...
Title: Re: Undefined Reference
Post by: criusmac on September 17, 2009, 11:11:12 pm
It is pretty obvious that I can't do a malloc in a dll and get away with it now that I know it's a dll.

Obviously, being a dll, it has to be used by multiple pieces of software. Doing a dir indicates:
ufo.exe
ufo2map.exe
ufo_ded.exe

so, probably between a couple of those at least. I have never known another reason to use a dll myself, other than to share code between software...

Looking at ufo2map.exe, it looks like some sort of map editor, maybe it has something to do with radiant.
ufo.exe is the game, so that needs the dll.
ufo_ded.exe looks like a server or something. It appears to have connections to the game library as well. inv_shared.c is here, so it appears that inv_shared is purely exe code, and not available in the dll. Putting my code in it won't help at all. Hmmm...

Ok, my code absolutely has to be called during combat, and that appears to all take place in the dll. The memory for this has to be used outside of combat... so I really should allocate everything outside of the dll. Oops, I shouldn't keep thinking out loud. I'm making too much noise.


Reply posted while typing, so...
dir *g_actor* /s
was done before, and it showed no files found.
Looking at the game project indicates the first file is g_ai.c, not g_actor.c, and so I don't have the same project.
Since my last download before I started work was:
07/31/2009  11:40 AM       620,577,731 ufoai-2.3-dev-win32-25511.exe

Best I can assume is this g_actor.c did not exist when I did the download about a month ago. Does anyone have a small patch file for the changes since 25511? I don't have the bandwidth to download 600+ megs for about 20 days. (Until the eighth of October, my billing date)
Title: Re: Undefined Reference
Post by: criusmac on September 17, 2009, 11:24:45 pm
I guess it is wrong of me to expect help with my code the way it is. I have already started to beautify it to the coding standards in place. I expect it to take about 3-5 hours to complete, but I will post it when done.
Title: Re: Undefined Reference
Post by: criusmac on September 18, 2009, 12:09:54 am
Quicker than I expected since I only worked on the code I am displaying, but here is the same code beautified for your perusal:

Code: [Select]
/**
 * @brief Add a new wound to the actor in a random location.
 * @param[in] target Who is injured
 * @param[in] damage How much damage is being inflicted
 */
void G_ActorDamage (edict_t *target, const int damage)
{
wound_t *newWound;
int randomValue;

/**< Sanity check, don't add a wound if no damage was done. */
if(damage <= 0)
return;

newWound = malloc(sizeof(wound_t));
/**< First determine where the wound is */
randomValue = rand() % (WOUND_HEAD_PROBABILITY + WOUND_CHEST_PROBABILITY + WOUND_ARMS_PROBABILITY + WOUND_LEGS_PROBABILITY);
if(randomValue < WOUND_HEAD_PROBABILITY) {
newWound->location = WOUND_HEAD;
}
else if(randomValue < WOUND_HEAD_PROBABILITY + WOUND_CHEST_PROBABILITY) {
newWound->location = WOUND_CHEST;
}
else if(randomValue < WOUND_HEAD_PROBABILITY + WOUND_CHEST_PROBABILITY + WOUND_ARMS_PROBABILITY) {
newWound->location = WOUND_ARMS;
}
else if(randomValue < WOUND_HEAD_PROBABILITY + WOUND_CHEST_PROBABILITY + WOUND_ARMS_PROBABILITY + WOUND_LEGS_PROBABILITY) {
newWound->location = WOUND_LEGS;
}
/**< This should *never* happen, put out an error or something */
else {
/**< WOUND_LEGS is probably the highest enum value, so % by it. */
newWound->location %= WOUND_LEGS;
}

/**< Next determine if it is a wound */
if(damage < WOUND_MINIMUM_DAMAGE) {
newWound->affectSkill = 0;
newWound->treated = 1;
}
else {
newWound->affectSkill = 1;
newWound->treated = 0;
}

/**< Finally set the damage of the wound */
newWound->value = damage;

/**< The wound is created, just add it to the target now */
LIST_AddPointer(&target->chr.wounds, newWound);
/**< Subtract the damage from the current hit points. */
target->HP -= damage;
}

/**
 * @brief Return the decrease in accuracy due to wounds for an actor.
 * @param[in] target The injured actor we are calculating the decrease in accuracy for.
 */
int G_ActorAccuracyDecreaseByWounds (edict_t *target)
{
linkedList_t *woundList;
wound_t *wound;
int armWounds = 0, headWounds = 0, returnValue = 0;

/**< Calculate all arm wounds, we'll have to go through the wound linkedlist to count all arm wounds. */
woundList = target->chr.wounds;
while (woundList) {
wound = (wound_t *)woundList->data;
if ((wound->location == WOUND_ARMS) && wound->affectSkill) {
if (wound->treated) {
armWounds += wound->value / 2;
}
else {
armWounds += wound->value;
}
}
woundList = woundList->next;
}
/**< @todo: Value of all arm wounds is now stored in armWounds, do something with it here. */

/**< Calculate all head wounds, we'll have to go through the wound linkedlist to count all head wounds. */
woundList = target->chr.wounds;
while (woundList) {
wound = (wound_t *)woundList->data;
if ((wound->location == WOUND_HEAD) && wound->affectSkill) {
if (wound->treated) {
headWounds += wound->value / 2;
}
else {
headWounds += wound->value;
}
}
woundList = woundList->next;
}
/**< @todo: Value of all head wounds is now stored in headWounds, do something with it here. */

return returnValue;
}

/**
 * @brief Return the increase in turn units used by an actor due to wounds.
 * @param[in] target The injured actor we are calculating the increase in turn units for.
 */
int G_ActorShootTUIncreaseByWounds (edict_t *target)
{
linkedList_t *woundList;
wound_t *wound;
int armWounds = 0, returnValue = 0;

/**< Calculate all arm wounds, we'll have to go through the wound linkedlist to count all arm wounds. */
woundList = target->chr.wounds;
while (woundList) {
wound = (wound_t *)woundList->data;
if ((wound->location == WOUND_ARMS) && wound->affectSkill) {
if (wound->treated) {
armWounds += wound->value / 2;
}
else {
armWounds += wound->value;
}
}
woundList = woundList->next;
}
/**< @todo: Value of all arm wounds is now stored in armWounds, do something with it here. */

return returnValue;
}

/**
 * @brief Treat the actor to slightly heal, and prevent bleeding of untreated combat wounds.
 * @note Type of healing is 1 for wounds, 2 for morale, 3 for stun.
 * @param[in] target Who's wounds are being treated.
 * @param[in] damage /1000=type of healing, %1000 = amount of healing.
 */
void G_ActorTreat (edict_t *target, const int damage)
{
int type, value, index, amount, woundNumber;
linkedList_t *woundList;
wound_t *treatWound;

/**< Determine the type and value of the healing. */
type = damage / 1000;
value = damage % 1000;

/**< Sanity check on 'type' here. *
* I am leaving it out the value check in case we want to subtract morale or something. */
if (type < 0)
type = -type;

if ( type == HEAL ) {
/**< First we locate the worst wound on the person being treated */
index = 0;
amount = 0;
woundNumber = 0;
woundList = target->chr.wounds;
while (woundList) {
treatWound = (wound_t *)woundList->data;
if ((!treatWound->treated) && (treatWound->value > amount)) {
    amount = treatWound->value;
    woundNumber = index;
}
index++;
woundList = woundList->next;
}
woundList = target->chr.wounds;
if(woundList) {
treatWound = (wound_t *)LIST_GetByIdx(woundList, woundNumber);
if(treatWound->treated == 0) {
/**< Heal the wound a bit. We will simply subtract 10% of the wound from itself. */
treatWound->value -= treatWound->value / 10;
treatWound->treated = 1;
target->HP += treatWound->value / 10;
}
}
}
else if (type == MORALE) {
target->morale -= value;
target->morale = min (target->morale, 100);
target->morale = max (target->morale, 0);
}
else if (type == STUN) {
target->STUN -= value;
target->STUN = min (target->STUN, 255);
target->STUN = max (target->STUN, 0);
}
else {

}
}

It took only 50 minutes to do. Now you can look it over for things not matching your code standards if that's what you want to do.
Title: Re: Undefined Reference
Post by: Duke on September 18, 2009, 12:14:02 am
You're right, g_actor.c was created on Aug 30th by 'splitting code'. I currently can't think of an easy way to provide a small patch for you, sorry.

Are your bandwidth limitations a matter of speed or volume ?

I think your best bet is to hop on the svn train. That would at least save you from working on outdated source. But then again, the first checkout is also some 500 MB and IIRC it has to be done in one session :(

Hey guys, does anyone know a way to split an svn checkout into smaller pieces ??
Title: Re: Undefined Reference
Post by: Destructavator on September 18, 2009, 12:24:54 am
Quote
Hey guys, does anyone know a way to split an svn checkout into smaller pieces ??

Yes.  Some SVN clients, after being interrupted or bombing out with an error, will pick up again where they left off with a standard update command.

The more recent versions of Tortoise SVN do this, I know this is true because sometimes my DSL connection gets interrupted, and the regular "update" with a right-click will work this way, it won't re-download the files it already got as long as they are up-to-date.  I've also seen this happen when Tortoise SVN encounters an error.
Title: Re: Undefined Reference
Post by: Kildor on September 18, 2009, 04:33:05 am
As workaround you can checkout only src, base\ufos, build, and may be contrib dirs.
Other you can get from your snapshot, to edit code that dirs aren`t needed.
Title: Re: Undefined Reference
Post by: Destructavator on September 18, 2009, 04:35:31 am
If you only want certain parts of UFO: AI so you don't have to download the whole thing, you also can use the online SVN browser on Sourceforge - just find the folders with what you want and then click on "download tarball" or something, and you'll get a compressed file with only the folders and files you wanted.  I think it is in .tar format or something, I know 7-zip can open it easily.  (7-zip itself is tiny.)

Only problem with that method is you can't have it update just the changed files automatically like with Tortoise SVN.  (Actually, I think Kildor's suggestion is better.)
Title: Re: Undefined Reference
Post by: criusmac on September 18, 2009, 05:51:43 am
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?

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?
Title: Re: Undefined Reference
Post by: criusmac on September 18, 2009, 06:33:26 am
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.
Title: Re: Undefined Reference
Post by: Kildor on September 18, 2009, 06:50:16 am
> 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.
Title: Re: Undefined Reference
Post by: criusmac on September 18, 2009, 06:52:30 am
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.
Title: Re: Undefined Reference
Post by: criusmac on September 18, 2009, 07:28:11 am
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.
Title: Re: Undefined Reference
Post by: Mattn on September 18, 2009, 09:10:38 am
do your own linked list please
Title: Re: Undefined Reference
Post by: Kildor on September 18, 2009, 10:07:24 am
> 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.
Really? I`ve not known it, thanks for answer.