Ask Your Question
0

third party library

asked 2015-08-03 10:11:44 -0500

soshiant gravatar image

updated 2015-08-04 01:41:10 -0500

gvdhoorn gravatar image

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

edit retag flag offensive close merge delete

Comments

@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.

gvdhoorn gravatar image gvdhoorn  ( 2015-08-04 01:43:03 -0500 )edit

Maybe you should select the project in eclipse press right mouse button on it and select Index->Rebuild. That should probably check for headers.

cyborg-x1 gravatar image cyborg-x1  ( 2015-08-04 04:22:31 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2015-08-03 10:16:42 -0500

updated 2015-08-03 10:19:55 -0500

Checkout the CMake find_library command.

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

http://www.cmake.org/cmake/help/v3.0/...

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

 target_link_libraries(your_node_or_library
   ${library_name}
)
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2015-08-03 10:11:44 -0500

Seen: 446 times

Last updated: Aug 04 '15