Просмотр исходного кода

Fix for multiply defined symbols fatal error in polyimport.cpp on win32

* the assimp libraries appear to be compiled with zlib support already, so including them again when linking polyimport results in a multiply defined symbols error on visual studio 2010

* removed zlib from the list of link libraries for polyimport on win32 only

* not sure if this needs done on other platforms or not

* verified that polyimport.exe still works after this tweak

* full text of error:

assimp.lib(inflate.obj) : error LNK2005: _inflateInit2_ already defined in zlib.lib(zlib.dll) [Polycode\Build\Tools\Contents\polyimport\polyimport.vcxproj]
assimp.lib(inflate.obj) : error LNK2005: _inflate already defined in zlib.lib(zlib.dll) [Polycode\Build\Tools\Contents\polyimport\polyimport.vcxproj]
assimp.lib(inflate.obj) : error LNK2005: _inflateEnd already defined in zlib.lib(zlib.dll) [Polycode\Build\Tools\Contents\polyimport\polyimport.vcxproj]
Polycode\Build\Tools\Contents\polyimport\Release\polyimport.exe : fatal error LNK1169: one or more multiply defined symbols found [Polycode\Build\Tools\Contents\polyimport\polyimport.vcxproj]
Danny Warren 13 лет назад
Родитель
Сommit
3478207f53
1 измененных файлов с 2 добавлено и 0 удалено
  1. 2 0
      Tools/Contents/polyimport/CMakeLists.txt

+ 2 - 0
Tools/Contents/polyimport/CMakeLists.txt

@@ -16,6 +16,8 @@ SET(CMAKE_DEBUG_POSTFIX "_d")
 ADD_EXECUTABLE(polyimport Source/polyimport.cpp Include/polyimport.h)
 IF(APPLE)
 	TARGET_LINK_LIBRARIES(polyimport Polycore ${PHYSFS_LIBRARY}  ${ZLIB_LIBRARIES} ${ASSIMP_LIBRARY} "-framework IOKit" "-framework Cocoa")
+ELSEIF(WIN32)
+	TARGET_LINK_LIBRARIES(polyimport Polycore ${PHYSFS_LIBRARY}  ${ASSIMP_LIBRARY})
 ELSE()
 	TARGET_LINK_LIBRARIES(polyimport Polycore ${PHYSFS_LIBRARY}  ${ZLIB_LIBRARIES} ${ASSIMP_LIBRARY})
 ENDIF(APPLE)