On Sun, 2006-08-20 at 11:10 -0400, William A. Hoffman wrote: > >The "magic" build script for Win32 contain this fragment of the build > >line for MSVC > > > >/DEF:"./../../engine/api/doomsday.def" /IMPLIB:"./%BIN_DIR > >%/Doomsday.lib" > > > >(Full script is here -> > >http://svn.sourceforge.net/viewvc/deng/trunk/doomsday/build/win32/vcbuild.bat?revision=3509&view=markup > > ) > > > >Somehow it produces a .lib file from the main executable that makes the > >Windows linker happy. > > > >I tried to emulate this in cmake with this: > > > >## Work around for Win32 wanting something for the plugins to link to > >IF (WIN32) > >ADD_LIBRARY (deng STATIC ${DENG_SOURCES} engine/api/doomsday.def) > >TARGET_LINK_LIBRARIES (deng ${SDL_LIBRARY} ${SDLNET_LIBRARY} > >${ZLIB_LIBRARIES} > >${CURSES_LIBRARIES} ${PNG_LIBRARIES} wsock32 winmm gdi32 ole32 user32 > >${CMAKE_SOURCE_DIR}/external/lzss/win32/lzss ) > >ENDIF (WIN32) > > If you want a shared library, why use STATIC. Remove the STATIC > and it should work. CMake will do the right thing with the .def file > as the source. > > -Bill >
G'day Bill, What I want isn't a library that will be used by the final executable, I just want to make a library out of the executable to make the linker happy, then I will discard the library. Win32 will then find the symbols in the main executable when it loads the plugins. In any case, Usung Cmake 2.4-patch3 and MinGW I get the following output. With STATIC Warning: resolving [EMAIL PROTECTED] by linking to _ArgExists Use --enable-stdcall-fixup to disable these warnings Use --disable-stdcall-fixup to disable these fixups Cannot export .idata$4: symbol not found Cannot export .idata$5: symbol not found Cannot export .idata$6: symbol not found Cannot export .text: symbol not found Cannot export LZSS_NULL_THUNK_DATA: symbol not found Cannot export zlib1_NULL_THUNK_DATA: symbol not found Creating library file: libdropengl.dll.a collect2: ld returned 1 exit status make[2]: *** [plugins/opengl/libdropengl.dll] Error 1 make[1]: *** [plugins/opengl/CMakeFiles/dropengl.dir/all] Error 2 make: *** [all] Error 2 Without STATIC Cannot export .idata$4: symbol not found Cannot export .idata$5: symbol not found Cannot export .idata$6: symbol not found Cannot export .text: symbol not found Cannot export LZSS_NULL_THUNK_DATA: symbol not found Cannot export zlib1_NULL_THUNK_DATA: symbol not found Creating library file: libdeng.dll.a collect2: ld returned 1 exit status make[2]: *** [libdeng.dll] Error 1 make[1]: *** [CMakeFiles/deng.dir/all] Error 2 make: *** [all] Error 2 With STATIC deng.lib builds, but when libdropengl.dll trys to link with it, it fails. Without STATIC, deng.lib doesn't even link. I hope my explanation of what I want to do is clear. Regards, Yagisan -- GPG/PGP signed mail preferred. No HTML mail. No MS Word attachments PGP Key ID 0x4B6E7209 Fingerprint E1FD 9D7E 6BB4 1BD4 AEB9 3091 0027 CEFA 4B6E 7209
signature.asc
Description: This is a digitally signed message part
_______________________________________________ CMake mailing list [email protected] http://www.cmake.org/mailman/listinfo/cmake
