0
$\begingroup$

Rosanswers logo

i compiled a project with catkin and it worked fine and now i'm trying to write some more code that i'm going to use variables in the previous code (read and write) i've opened cmakelist in qtcreator IDE and also managed to bring it up in eclipse IDE but neither work when i add my lib.so and includepath i think i should somehow manipulate the cmakelist for it to work but when i search i don't see anywhere adding a lib.so file or path in cmakelist its wearing me out cause its not working can anyone help me or point me in the right direction?


Edit:

i added following two lines.

find_library(Fuzzy fuzzylited /home/soshiant/fuzzylite-5.0/fuzzylite-5.0/fuzzylite/debug/bin/)

target_link_libraries(talker1 ${catkin_LIBRARIES} ${Fuzzy})

it worked perfectly in qtcreator but not in eclipse it didn't recognized the library because it gave me err like invalid argument in my code that qt seems not to mined alles in ordnung danke


Originally posted by soshiant on ROS Answers with karma: 3 on 2015-08-03

Post score: 0


Original comments

Comment by gvdhoorn on 2015-08-04:
@soshiant: please update your original question when you have additional information. Post an answer only to answer your own question, use comments for interacting with other posters. Thanks.

Comment by cyborg-x1 on 2015-08-04:
Maybe you should select the project in eclipse press right mouse button on it and select Index->Rebuild. That should probably check for headers.

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

Checkout the CMake find_library command.

find_library(library_name file.so <search_paths (optional)>)

http://www.cmake.org/cmake/help/v3.0/command/find_library.html

And (afaik) you need to add it like this:

 target_link_libraries(your_node_or_library
   ${library_name}
)

Originally posted by cyborg-x1 with karma: 1376 on 2015-08-03

This answer was ACCEPTED on the original site

Post score: 1

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.