Code: Select all
git clone git://git.dcmtk.org/dcmtk.git
...
cd dcmtk
./configure && make
...
make install-lib
...
cd ~
g++-4.9 t.cpp -o t -std=c++11
Undefined symbols for architecture x86_64:...
Moderator: Moderator Team
Code: Select all
git clone git://git.dcmtk.org/dcmtk.git
...
cd dcmtk
./configure && make
...
make install-lib
...
cd ~
g++-4.9 t.cpp -o t -std=c++11
Undefined symbols for architecture x86_64:...
Can you tell about this flags?Jan Schlamelcher wrote: I can see no -L/PATH/TO/DCMTK/LIBS -lofstd -l...
Jan Schlamelcher wrote:You might take a look at this: viewtopic.php?f=4&t=2689
Code: Select all
#include <dcmtk/config/osconfig.h>
/*DCMTK Header Files*/
#include "dcmtk/dcmdata/dcvrpn.h"
#include "dcmtk/dcmdata/dcfilefo.h"
int main()
{
DcmFileFormat fileformat;
OFCondition status = fileformat.loadFile("test.dcm");
return 0;
}
Code: Select all
~$ g++-4.9 t.cpp -o t -L/usr/local/include/dcmtk -ldcmdata -lofstd
Undefined symbols for architecture x86_64:
Code: Select all
~$ g++-4.9 t.cpp -o t -L/usr/local/include/dcmtk -ldcmdata -loflog -lofstd
Same resultJan Schlamelcher wrote:Try:Code: Select all
~$ g++-4.9 t.cpp -o t -L/usr/local/include/dcmtk -ldcmdata -loflog -lofstd
https://www.dropbox.com/s/pazowb4obmtra ... %D0%B0.txtJan Schlamelcher wrote:Which symbols are missing?
Code: Select all
~$ g++-4.9 t.cpp -o t -L/usr/local/include/dcmtk -ldcmdata -loflog -lofstd -lz
I successfuly compile the program with g++ (4.2). g++-4.9 i installed from brew. Thanks!Jan Schlamelcher wrote:Strange output. It seems you are using zlib, so you need at least:I'm not sure about the missing STL symbols however. They are either just consequential errors from the missing zlib symbols, or you are missing -lstdc++, but your compiler should normally use -lstdc++ automatically. Why are you calling g++-4.9 instead of g++? Is this a custom toolchain? That would explain these kind of errors.Code: Select all
~$ g++-4.9 t.cpp -o t -L/usr/local/include/dcmtk -ldcmdata -loflog -lofstd -lz
Users browsing this forum: No registered users and 1 guest