title: Weird Linker Error
body: <pre><code>#include path
  include_directories(
  ${PROJECT_SOURCE_DIR}/include
  ${HGE_INCLUDE_DIR}
  ${IKL_INCLUDE_DIR}
  ${BOOST_DIRECTORY}
  )
  
  #include all files
  FILE(GLOB CORE_SRCS source/core/*.cpp)
  FILE(GLOB TOOL_SRCS source/tools/*.cpp)
  FILE(GLOB GAME_SRCS source/game/*.cpp)
  
  #Making a compiled library
  add_library(GAMECORE_LIBRARY ${CORE_SRCS} ${HGE_LIBRARY} ${HGE_HELPER_LIBRARY})
  
  #add executable
  add_executable(DemoGame ${GAME_SRCS})
  
  ##link executable to HGE lib
  TARGET_LINK_LIBRARIES(DemoGame ${HGE_LIBRARY} ${HGE_HELPER_LIBRARY} ${IKL_LIBRARY} GAMECORE_LIBRARY)
  
  if(BUILD_TOOLS)
  add_executable(EntityTool ${TOOL_SRCS})
  TARGET_LINK_LIBRARIES(EntityTool ${HGE_LIBRARY} ${HGE_HELPER_LIBRARY} ${IKL_LIBRARY} GAMECORE_LIBRARY)
  endif(BUILD_TOOLS)
  </code></pre>
  
  <p>this is my current cmake ..</p>
  
  <p>I get a weird linker error for hgeGUI class<br>
  eg : DemoGame/source/core/GameMainMenu.cpp:74: undefined reference to `hgeGUI::hgeGUI()'</p>
  
  <p>This only happens when I try to compile the core files into a static library.
  When I add the executable with the CORE_SRCS and remove the dependencies on my current compiled library .. it will work fine..</p>
  
  <p>Also I tried copy pasting the hgegui.cpp file into my core sources directory .. and change the <code>#include "..\..\include\hgegui.h"</code> to <code>#include "hgegui.h"</code></p>
  
  <p>After that my linker code resolves the issue but I get segmentation faults but I m guessing linking the file in the previous step was not right ..</p>
  
  <p>Here's a link to their .h file<br>
  <a href="http://trac.assembla.com/snowscape/browser/hge/include/hgegui.h" rel="nofollow noreferrer">http://trac.assembla.com/snowscape/browser/hge/include/hgegui.h</a></p>