kylelutz / chemkit

A C++ library for molecular modelling, cheminformatics and molecular visualization.
http://www.chemkit.org
BSD 3-Clause "New" or "Revised" License
53 stars 26 forks source link

Compiling examples #31

Open mcpzi opened 10 years ago

mcpzi commented 10 years ago

Hello !

I've been trying to compile the protein surface example following your step by step instructions. To get rid of the first compilation errors I had to add some Boost related entries in the CMakeLists : find_package(Boost COMPONENTS iostreams filesystem system REQUIRED) target_link_libraries(protein-surface-area ${CHEMKIT_LIBRARIES} ${Boost_LIBRARIES})

Errors are still showing up at linking :

[100%] Building CXX object CMakeFiles/protein-surface-area.dir/protein-surface-area.cpp.o
Linking CXX executable protein-surface-area
CMakeFiles/protein-surface-area.dir/protein-surface-area.cpp.o: In function `main':
protein-surface-area.cpp:(.text+0x4e): undefined reference to `chemkit::PolymerFile::PolymerFile(std::string const&)'
protein-surface-area.cpp:(.text+0xe3): undefined reference to `chemkit::PolymerFile::polymer(unsigned long) const'
protein-surface-area.cpp:(.text+0x25c): undefined reference to `chemkit::PolymerFile::~PolymerFile()'
protein-surface-area.cpp:(.text+0x2cb): undefined reference to `chemkit::PolymerFile::~PolymerFile()'
CMakeFiles/protein-surface-area.dir/protein-surface-area.cpp.o: In function `chemkit::GenericFile::read(std::istream&)':
protein-surface-area.cpp:(.text._ZN7chemkit11GenericFileINS_11PolymerFileENS_17PolymerFileFormatEE4readERSi[_ZN7chemkit11GenericFileINS_11PolymerFileENS_17PolymerFileFormatEE4readERSi]+0x20a): undefined reference to `chemkit::PolymerFileFormat::errorString() const'
collect2: error: ld returned 1 exit status
make[2]: *** [protein-surface-area] Error 1
make[1]: *** [CMakeFiles/protein-surface-area.dir/all] Error 2
make: *** [all] Error 2

I've tried both the stable version and latest git codes but I can't get past this error ...

Any idea ?

Thanks

vanish13 commented 10 years ago

I have been having similar problems.