Jean-Marc Lasgouttes wrote:

> Le 23/12/2014 16:13, Richard Heck a écrit :
>> On 12/22/2014 09:21 PM, Uwe Stöhr wrote:
>>> Compared to the trunk of last week I get now this compilation error:
>>>
>>> "D:\LyXGit\Master\compile-result\src\support\support.vcxproj"
>>> (Standardziel) (21) ->
>>>   trivstring.obj : warning LNK4221: The object file does not define
>>> public symbols that were undefined before. It is therefore not used by
>>> any linking action used by this library.
>>
>> This is expected on your system. I suppose there's a way to avoid it,
>> but it's probably not worth it.

IMHO it is worth it. With a warning free build you see immediately if 
something goes wrong.

> Declare a dummy variable in this case?

I would prefer to exclude this file from compilation completely. Does the 
attached patch work?


Georg
diff --git a/src/support/CMakeLists.txt b/src/support/CMakeLists.txt
index b0d1c6d..42a9134 100644
--- a/src/support/CMakeLists.txt
+++ b/src/support/CMakeLists.txt
@@ -33,6 +33,9 @@ list(REMOVE_ITEM support_sources
 	${TOP_SRC_DIR}/src/support/os_cygwin.cpp
 	${TOP_SRC_DIR}/src/support/os_os2.C
 	${TOP_SRC_DIR}/src/support/gettext.cpp)
+if(NOT STD_STRING_USES_COW)
+	list(REMOVE_ITEM support_sources ${TOP_SRC_DIR}/src/support/trivstring.cpp)
+endif()
 
 if(APPLE)
 	message(STATUS "Mac LinkBack support")

Reply via email to