cmake crosscompilation qnx7.1 undefined reference to function with shared library

Viewed 17
# compiler is q++:
set(CMAKE_CXX_COMPILER q++)

set(CMAKE_CXX_FLAGS "-I/usr/include/")

# linking as below
add_executable(MYPGM main.cpp)
target_link_libraries(MYPGM  socket) # -> this links fine, if I link same way libtest, not even identifying the library from the path

target_link_libraries(MYPGM -L"/usr/lib/libtest.so")

On linux it links fine. On QNX it finds the path but it says undefined reference

main.cpp.o: in function `main':
main.cpp:(.text+0xdc): undefined reference to `testinit'
0 Answers
Related