Skip to content

Commit

Permalink
mengeCore compiles but don't link
Browse files Browse the repository at this point in the history
Errors of the like:
duplicate symbol Menge::Math::Vector3d<float>::z() const in:
    CMakeFiles/menge.dir/Users/chraibi/Workspace/Menge/src/Menge/mengeMain/mengeMain.cpp.o
    ../../lib/libmengeCore.a(AgentGenerator.cpp.o)
  • Loading branch information
chraibi committed Nov 1, 2016
1 parent 32fe4ad commit 26b1bcd
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
7 changes: 3 additions & 4 deletions projects/g++/Menge/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ INCLUDE_DIRECTORIES (${MENGE_SRC_DIR}/MengeCore/PluginEngine)

set( CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fpermissive" )


#find the correct OpenMP flag
FIND_PACKAGE(OpenMP)
if(OPENMP_FOUND)
Expand Down Expand Up @@ -62,9 +61,9 @@ else()
endif()

FIND_PACKAGE(OpenGL REQUIRED)
if(OPENGL_FOUND)
INCLUDE_DIRECTORIES(${OPENGL_INCLUDE_DIR})
endif()
INCLUDE_DIRECTORIES(${OPENGL_INCLUDE_DIRS})
FIND_PACKAGE(GLUT REQUIRED)
INCLUDE_DIRECTORIES( ${GLUT_INCLUDE_DIRS})

FIND_PACKAGE(PNG REQUIRED)

Expand Down
2 changes: 1 addition & 1 deletion projects/g++/Menge/MengeCore/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ add_library(
${source_files}
)

target_link_libraries ( mengeCore dl )
target_link_libraries ( mengeCore dl tinyxml ${OPENGL_LIBRARIES} ${GLUT_LIBRARY} ${SDL_LIBRARY} ${PNG_LIBRARY} ${SDLIMAGE_LIBRARY} ${SDLTTF_LIBRARY})

install( TARGETS mengeCore DESTINATION ${LIBRARY_OUTPUT_PATH} )
5 changes: 4 additions & 1 deletion projects/g++/Menge/mengeMain/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@ add_executable(
${source_files}
)

target_link_libraries (menge mengeCore tinyxml ${OPENGL_LIBRARIES} ${SDL_LIBRARY} ${SDLIMAGE_LIBRARY} ${SDLTTF_LIBRARY} ${PNG_LIBRARY})


#target_link_libraries (menge tinyxml ${OPENGL_LIBRARIES} ${GLUT_LIBRARY} ${SDL_LIBRARY} ${PNG_LIBRARY} ${SDLIMAGE_LIBRARY} ${SDLTTF_LIBRARY} mengeCore )
target_link_libraries (menge mengeCore )

#file( COPY ${CMAKE_SOURCE_DIR}/../resources/linux DESTINATION ${MENGE_EXE_DIR} )
#file( COPY ${CMAKE_SOURCE_DIR}/../resources/common DESTINATION ${MENGE_EXE_DIR} )
Expand Down

0 comments on commit 26b1bcd

Please sign in to comment.