Trouble Linking Libraries

Actually, I'll do that. I need to write a sample generic client that everyone can re-use in their projects like in your case. Give me a couple of days.
5 years 1 month ago #41823

Please Log in or Create an account to join the conversation.

  • Posts: 19
  • Thank you received: 3

Replied by Greg on topic Trouble Linking Libraries

I went ahead and made the minimal project. I think the issue is in the find_package statement. On the github by default it finds the alignment and driver components. To get the client component you need to specify it but when I try to it doesn't find the client component. When the CMake file compiles it notifies me that it has found the driver and alignment components but there is no information on the client component.
5 years 1 month ago #41824
Attachments:

Please Log in or Create an account to join the conversation.


×

INDI Library v2.0.7 is Released (01 Apr 2024)

Bi-monthly release with minor bug fixes and improvements


Rendering Error in layout Message/Item: array_keys(): Argument #1 ($array) must be of type array, null given. Please enable debug mode for more information.

Please Log in or Create an account to join the conversation.

  • Posts: 19
  • Thank you received: 3

Replied by Greg on topic Trouble Linking Libraries

Awesome! This fixed the issue! However, I am now getting a new error in the client library.

/usr/bin/ld: /usr/lib/x86_64-linux-gnu/libindiclient.a(basedevice.cpp.o): undefined reference to symbol 'uncompress'
//lib/x86_64-linux-gnu/libz.so.1: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status

I thought this had to do with a dependency on pthreads and tried including that using

find_package(Threads REQUIRED)
include_directories( ${CMAKE_CURRENT_SOURCE_DIR})
target_link_libraries(pandaScope ${CMAKE_THREAD_LIBS_INIT})

but that didn't work. Thanks for working so hard on solving this issue. I really appreciate the help!
5 years 1 month ago #41829

Please Log in or Create an account to join the conversation.


Rendering Error in layout Message/Item: array_keys(): Argument #1 ($array) must be of type array, null given. Please enable debug mode for more information.

Please Log in or Create an account to join the conversation.

  • Posts: 19
  • Thank you received: 3

Replied by Greg on topic Trouble Linking Libraries

Fixed the issue. For the client to work correctly, these must be included in the CMakeLists.txt file

find_package(INDI 1.7 REQUIRED)
find_package(INDI COMPONENTS client REQUIRED)
find_package(Nova REQUIRED)
find_package(CFITSIO REQUIRED)
find_package(Threads REQUIRED)
find_package(ZLIB REQUIRED)

include_directories(${INDI_INCLUDE_DIR})
include_directories(${NOVA_INCLUDE_DIR})
include_directories(${CFITSIO_INCLUDE_DIR})
include_directories( ${CMAKE_CURRENT_SOURCE_DIR})
include_directories(${ZLIB_INCLUDE_DIR})

target_link_libraries(pandaScope ${NOVA_LIBRARIES})
target_link_libraries(pandaScope ${CFITSIO_LIBRARIES})
target_link_libraries(pandaScope ${INDI_LIBRARIES})
target_link_libraries(pandaScope ${INDI_CLIENT_LIBRARIES})
target_link_libraries(pandaScope ${CMAKE_THREAD_LIBS_INIT})
target_link_libraries(pandaScope ${ZLIB_LIBRARIES})

Thanks for all your help Jasem!
The following user(s) said Thank You: Jasem Mutlaq
5 years 1 month ago #41838

Please Log in or Create an account to join the conversation.

Time to create page: 0.684 seconds