Closed simone-fontana closed 9 years ago
which version of boost are you using?
I am using libboost 1.54
Just FYI. I also am having this problem. Also with Boost 1.54. If I can help at all from ETH, let me know :)
ok, I'm investigating this issue now. It seems that boost is not link to the library but only to the example applications, which make the all thing work within our build hierarchy but most probably not for external projects. It seems that drhalftone was reporting the same problem.
What is the output of ${libpointmatcher_LIBRARIES}
on your side?
In your CMakeLists.txt, you can add:
message("libpointmatcher_LIBRARIES= ${libpointmatcher_LIBRARIES}")
Hi Francois, I've already solved the problem on my machine. Sorry I forgot to send a message with the fix. If I remember correctly, all I had to do was add a link to the Boost libraries for 'pointmatcher'. Line 215 of CMakeLists: target_link_libraries(pointmatcher ${yaml-cpp_LIBRARIES} ${libnabo_LIBRARIES} ${Boost_LIBRARIES})
Hopefully this works for everyone.
Best, Tim
On Thu, Feb 19, 2015 at 6:13 PM, François Pomerleau < notifications@github.com> wrote:
ok, I'm investigating this issue now. It seems that boost is not link to the library but only to the example applications, which make the all thing work within our build hierarchy but most probably not for external projects. It seems that drhalftone was reporting the same problem.
What is the output of ${libpointmatcher_LIBRARIES} on your side?
In your CMakeLists.txt, you can add:
message("libpointmatcher_LIBRARIES= ${libpointmatcher_LIBRARIES}")
— Reply to this email directly or view it on GitHub https://github.com/ethz-asl/libpointmatcher/issues/61#issuecomment-75093740 .
@simone-fontana the last commit 48b1a61ddd1d1c19ea6440b6d401c373fc3e9a39 should fix your problem. I also add a small CMakeFile.txt
inspired from your example along with an executable to make sure that all information is properly included using find_package()
. If you could try on your side, it would be great to confirm everything before I close this issue.
The example project is in /examples/demo_external_link/
.
After building the library, you should be able to do:
cd /examples/demo_external_link/
mkdir build
cd build
cmake ..
make
@tsandy thanks for the tip. I cleaned the CMakeList.txt
to track the external libraries more easily. There was also some difference whether the library was static or dynamic. If you could update and confirm that it cover your case too, it would be great!
Also, if everything work on your side, could you give me your system spec. It seems that you're on a more recent system than me and would like to add that in the table on the top of tutorial page. All the commands to quickly write the versions are at the end of that page.
Cheers!
I'm still having problems. Here is the error message:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -headerpad_max_install_names -Wl,-syslibroot,/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk -mmacosx-version-min=10.7 -Wl,-rpath,/Qt/5.4/clang_64/lib -o LAUPointMatcher.app/Contents/MacOS/LAUPointMatcher main.o laupointmatcherwidget.o moc_laupointmatcherwidget.o -F/Qt/5.4/clang_64/lib -L/usr/local/lib/ -lboost_thread-mt -lboost_filesystem-mt -lboost_system-mt -lboost_program_options-mt -lboost_date_time-mt -lboost_chrono-mt -framework QtWidgets -framework QtGui -framework QtCore -framework DiskArbitration -framework IOKit -framework OpenGL -framework AGL
Undefined symbols for architecture x8664:
"PointMatcher
Here is the Qt Project file that I'm using:
QT += core gui widgets
TARGET = LAUPointMatcher TEMPLATE = app
SOURCES += main.cpp\ laupointmatcherwidget.cpp
HEADERS += laupointmatcherwidget.h
INCLUDEPATH += /Users/dllau/Libraries/libpointmatcher/pointmatcher \ /usr/local/include/eigen3/ \ /usr/local/include/
LIBS += -L/usr/local/lib/ -lboost_thread-mt -lboost_filesystem-mt -lboost_system-mt -lboost_program_options-mt -lboost_date_time-mt -lboost_chrono-mt /Users/dllau/Libraries/libpointmatcher/build/libpointmatcher.a
Here is the header for the object that is triggering the undefined symbols:
class LAUPointMatcherWidget : public QWidget { Q_OBJECT
public: LAUPointMatcherWidget(QWidget *parent = 0); ~LAUPointMatcherWidget();
private:
PointMatcher
I'am trying to compile my own software that uses libpointmatcher. However, when linking, I get the following error I couldn't solve in any way:
I am using the following CMakeLists.txt: