I was recently communicating with openwatcom matinainers; which just
released a version 2.0 fork on sourceforge... but the issue was
basically... if I have a shared library with no exports, it fails to build.
I used to use a method...(and this is how cmake does it)
wlink (...) # build library
wlib (...) # build import library from wlink output
but doing it this way if the .dll has no exports, wlib results in an error,
and faults the build.
I was informed that the correct way is to build the import library during
the wlink step using 'option implib[=libname]'
I was able to successfully modify
./share/cmake-2.8/Modules/Platform/Windows-wcl386.cmake
** remove at line 42
#set(CMAKE_C_CREATE_IMPORT_LIBRARY
# "wlib -c -q -n -b <TARGET_IMPLIB> +'<TARGET_UNQUOTED>'")
#set(CMAKE_CXX_CREATE_IMPORT_LIBRARY ${CMAKE_C_CREATE_IMPORT_LIBRARY})
#
** modify line 69 (65 if 4 lines deleted)
"wlink ${CMAKE_START_TEMP_FILE} system nt_dll ${CMAKE_WLINK_QUIET} name
'<TARGET_UNQUOTED>' <LINK_FLAGS> option caseexact file {<OBJECTS>}
<LINK_LIBRARIES> ${CMAKE_END_TEMP_FILE}")
to include "option implib=<TARGET_IMPLIB>"
"wlink ${CMAKE_START_TEMP_FILE} system nt_dll ${CMAKE_WLINK_QUIET} name
'<TARGET_UNQUOTED>' <LINK_FLAGS> option implib=<TARGET_IMPLIB> option
caseexact file {<OBJECTS>} <LINK_LIBRARIES> ${CMAKE_END_TEMP_FILE}")
and then the next line...
set(CMAKE_CXX_CREATE_SHARED_LIBRARY
${CMAKE_CXX_CREATE_SHARED_MODULE}
${CMAKE_CXX_CREATE_IMPORT_LIBRARY})
Includes a reference to the IMPORT_LIBRARY symbol removed before so that
can be removed.
Please update this for the future
--
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers