I am currently having what appears to be a linking issue on Cygwin however it is unlike other problems that have been quoted in that there is only one symbol missing.
I am simply attempting to load a file and extract the value of a tag, the symbols for the file loading functions appear to be resolved (or at least the linker is not complaining about them) but then it is unable to find the symbol for DcmItem::findAndGetOFString.
The following is the linker output followed by the code block causing it:
Code: Select all
$ make
g++ -ggdb -D_HAVE_CONFIG_H -I/usr/local/dicom/include -ofileprocessor.o -c fileprocessor.cpp
g++ -ggdb -D_HAVE_CONFIG_H -o filelogger filelogger.o watcher.o netagent.o fileprocessor.o -L /usr/local/dicom/lib -L/usr/lib -lsqlite3 -ldcmnet -ldcmdata -lofstd -lz -lpthread
fileprocessor.o:/cygdrive/d/documents and settings/602354921/My Documents/filelogger/fileprocessor.cpp:53: undefined reference to `DcmItem::findAndGetOFString(DcmTagKey const&, OFString&, unsigned long, int)'
collect2: ld returned 1 exit status
make: *** [filelogger] Error 1
Code: Select all
void FileProcessor::loadFile(char *filename)
{
OFCondition cond;
DcmFileFormat file;
DcmDataset *ds;
OFString dataValue;
cond = file.loadFile(filename);
if (cond.bad())
{
printf("ERR: %s\n", cond.text());
}
ds = file.getDataset();
ds->findAndGetOFString(DcmTag(0x0020, 0x000D), dataValue, 0, false);
this->uuid = (char *)dataValue.c_str();
}
Copyright (C) 2004 Free Software Foundation, Inc.
If more information is required in order to diagnose then please let me know. I have checked the FAQ on linking order dependancies and have played around with the order, the order seen above produces the least unresolved symbols but I guess its still not quite right, any ideas ??