I've got some fairly expansive code for musculoskeletal simulations that I'm altering. I've double and triple checked my code segments, but I've been banging my head against this particular error for some time. I'd appreciate any elucidation you kind fellows can pass my way. If any further code, etc would be helpful in the diagnosis, please just let me know.
First, here are the errors I encounter:
Linking...
Creating library Debug/simulation.lib and object Debug/simulation.exp
gmc.obj : error LNK2001: unresolved external symbol _muscleTendonLength
..\simulation.dll : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.
Here are some pertinent segments from the source code (gmc.c):
extern dpMuscleTendonLengthStruct* muscleTendonLength;
...
muscleTendonLength = (dpMuscleTendonLengthStruct*)malloc(sdm->num_muscles *
sizeof(dpMuscleTendonLengthStruct));
...
muscleTendonLength[i].numMTLStructs = dataSetCount + 1;
muscleTendonLength[i].muscleTL = (dpMTLStruct*)realloc(muscleTendonLength[i].muscleTL,muscleTendonLength[i].numMTLStructs*sizeof(dpMTLStruct));
...
etc, etc
and now the definition file for the external dependencies (structs.h):
...
typedef struct
{
char name[50];
int numMTLStructs;
int calctorque;
dpMTLStruct *muscleTL;
} dpMuscleTendonLengthStruct;
...
All of this is, of course, very truncated bits of code.
I'm using MS Visual C++ 6.0 to build (Win XP, WIN32).
From what I can tell, everything appears properly called and linked, but obviously something must be amiss, or is there some obscure buffer or sdk bug I need to get fixed?
Also, in your responses please remember that I am a Biomedical Engineer first and a coder second, or probably 3rd actually, and so pulling back the throttle on lingo and explanations would be greatly appreciated... :)
Your help is greatly appreciated.