This morning I have the following error when I attempt to compile my dll with cmake and nmake (Sorry for text in French):
Création de la bibliothÞque core.lib et de l'objet core.exp
CVTRES : fatal error CVT1100: ressource en double. Type: VERSION, nom: 1, langage: 0x040C
LINK : fatal error LNK1123: échec lors de la conversion en fichier COFF: fichier non valide ou endommagÚ
LINK Pass 1 failed. with 1123
NMAKE : fatal error U1077: '"C:\Program Files (x86)\CMake\bin\cmake.exe"' : code retour '0xffffffff'
Before, everithing works fine.
I use the script of https://github.com/halex2005/CMakeHelpers to make my versionning of file with cmake. Here is what I insert into my CMakeLists.txt :
[...]
file(GLOB SRC_FILES
${SOURCE_BASE_DIR}/src/*.cpp
${SOURCE_BASE_DIR}/src/*.h
)
[...]
if(MSVC)
include(${MAIN_DIR}/platform/cmake/common/generate_product_version.cmake)
generate_product_version(
VersionFilesOutputVariable
NAME ${PROJECT_NAME}
VERSION_MAJOR 0
VERSION_MINOR 0
VERSION_PATCH 0
VERSION_REVISION 1
COMPANY_NAME "COMPANY"
FILE_DESCRIPTION "Librairie ${PROJECT_NAME}.dll"
)
endif(MSVC)
[...]
add_library(${PROJECT_NAME} SHARED
${SRC_FILES}
${VersionFilesOutputVariable}
)
I have a folder /platform/cmake/common/
with VersionResource.rc, VersionInfo.in and generate_product_version.cmake inside. These are the same files as the repos above.
I've read on many post (fatal error CVT1100: duplicate resource. type:ICON, name:1 (C++, Visual Studio C++ 2010) and How to resolve CVT1100 in Visual Studio 2010 Ultimate?) that it can come from duplicate file.rc or same variable (here VERSION apparently) who's call several times.
I've also test to put /INCREMENT:NO
or /MANIFEST:NO
as I see in other post on web.
After I search for any variable strictly called VERSION
or something like that to change but anyway... I 'm not very comfortable with the rc files.
How I can resolve this issue please ?
And why suddenly it doesn't works ?
I use cmake 3.5.2 and Visual Studio 2015. I try to compile in Debug and x64.
Thanks for any help.