Development SIG Toolkit

You are not logged in. Would you like to login or register?

Compilation in Linux » CMakeLists for SIG » 1/01/2020 9:39 am

LeoYulinLi
Replies: 0

Go to post

Since Visual Studio is only available on Windows, I need to use some other IDE on my Linux desktop. My pick was CLion, but it uses CMake instead of Make. Here is the CMakeList I have been using throughout the semester. It works, but there are stuff I don't know how to convert from MakeFile, so there is a chance that you may run into some problem...

gist: https://gist.github.com/LeoYulinLi/ac079dd76ff7c6d05a027f61a6d1d8ac

(File)

cmake_minimum_required(VERSION 2.6)
cmake_policy(SET CMP0015 NEW)

set(INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../sig/include)
set(LINK_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../sig/src)
set(SOURCE_DIR "./src")
set(LIB_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../sig/lib/linux64)

include_directories(${INCLUDE_DIR})
link_directories(${LINK_DIR})

file(GLOB SOURCES "src/*.cpp" "src/*.h")

project(sigapp)
add_executable(sigapp ${SOURCES})

target_link_libraries(model
        ${LIB_DIR}/libsigogl.a
        ${LIB_DIR}/libsigos.a
        ${LIB_DIR}/libsig.a
        glfw
        X11
        GL)

(End File)
 

Compilation in Linux » [SOLVED] /usr/bin/ld: cannot find -lsigogl when building sigmynode » 9/10/2019 7:09 am

LeoYulinLi
Replies: 1

Go to post

When using the provided makefile from the example sigapp (sigmynode does not seem to have a makefile but copying and using the one from sigapp works fine), it will throw the follwing error:

creating: ./sigapp.x
/usr/bin/ld: cannot find -lsigogl
/usr/bin/ld: cannot find -lsigos
/usr/bin/ld: cannot find -lsig
collect2: error: ld returned 1 exit status
makefile:29: recipe for target 'sigapp.x' failed
make: *** [sigapp.x] Error 1


This could be fixed by changing the LIBDIR from $(SIGROOT)/lib/linux to $(SIGROOT)/lib/linux64 (32 if you are you using 32-bit system but not tested).

Board footera

 

Powered by Boardhost. Create a Free Forum