[Paraview] Build bug on Windows
Dave Partyka
dave.partyka at kitware.com
Tue Sep 7 10:17:55 EDT 2010
You can build dlls (/LD) and at the same time link the static version of the
runtime (/MT). It makes it more convenient to distribute shared libraries
without also needing to carry around the dynamic runtime dlls
(msvcrtxx.dll).
That said, your solution to set the excluded libraries in the project
properties should work but can get trampled when CMake regenerates. A
slightly better solution would be to use the /NODEFAULTLIB:<library.lib>
link flags in CMake to exclude them will also work.
CMAKE_EXE_LINKER_FLAGS add /NODEFAULTLIB:<library.lib>
CMAKE_SHARED_LINKER_FLAGS add /NODEFAULTLIB:<library.lib>
On Mon, Sep 6, 2010 at 5:33 PM, Dr. X <xunlei at renci.org> wrote:
> Hi Dave,
> I am building against prebuilt MySQL (x64 essential) binary.
> http://www.mysql.com/downloads/mysql/
> By examining the size of libmysql.lib, I am pretty sure it is a shared
> library.
>
> Best,
> x
>
>
> On 9/6/2010 5:26 PM, Dave Partyka wrote:
>
> So you're building ParaView against your own build of sql, or a prebuilt
> binary (via XDMF_USE_MYSQL)? Did you build it yourself? If so, was it built
> with /MT? Can you provide any more details so I can try and reproduce the
> errors?
>
> On Mon, Sep 6, 2010 at 5:08 PM, Dr. X <xunlei at renci.org> wrote:
>
>> Hi Dave,
>> I guess you were talking about the linking error caused in Xdmf build,
>> right?
>> I did only have /MD and /MDd options in ParaView CMake. The libcmt errors
>> only happen to Xdmf project.
>> I will do a clean build again to verify.
>>
>> Best,
>> x
>>
>>
>>
>> On 9/6/2010 4:52 PM, Dave Partyka wrote:
>>
>> The link errors indicate you're linking things built with the static
>> runtime (/MT) and the dynamic runtime (/MD). By default CMake uses the /MD
>> Flags. Did you change them to /MT? In either case you want them to be the
>> same for everything you're trying to build.
>>
>> On Mon, Sep 6, 2010 at 4:46 PM, Dr. X <xunlei at renci.org> wrote:
>>
>>> Hi All,
>>> The default build of Xdmf.vcproj have the following bugs:
>>> ====================================================
>>> Errors:
>>> Error 326 error C2146: syntax error : missing ';' before identifier 'fd'
>>> d:\mysql5.1\include\mysql_com.h 243 Xdmf
>>> Error 327 error C4430: missing type specifier - int assumed. Note: C++
>>> does not support default-int d:\mysql5.1\include\mysql_com.h 243 Xdmf
>>> Error 328 error C4430: missing type specifier - int assumed. Note: C++
>>> does not support default-int d:\mysql5.1\include\mysql_com.h 243 Xdmf
>>> Error 329 error C2065: 'SOCKET' : undeclared identifier
>>> d:\mysql5.1\include\mysql_com.h 427 Xdmf
>>> Error 330 error C2146: syntax error : missing ')' before identifier 's'
>>> d:\mysql5.1\include\mysql_com.h 427 Xdmf
>>> Error 331 error C2059: syntax error : ')'
>>> d:\mysql5.1\include\mysql_com.h 428 Xdmf
>>>
>>> Fix:
>>> Add the following lines in d:\mysql5.1\include\mysql_com.h
>>>
>>> #if defined(__WIN__)
>>> #include <WinSock2.h>
>>> #endif /* __WIN__ */
>>> ====================================================
>>> Errors:
>>> Error 3 error LNK2005: _amsg_exit already defined in
>>> MSVCRTD.lib(MSVCR90D.dll) LIBCMT.lib Xdmf
>>> Error 4 error LNK2005: _initterm_e already defined in
>>> MSVCRTD.lib(MSVCR90D.dll) LIBCMT.lib Xdmf
>>> Error 5 error LNK2005: exit already defined in MSVCRTD.lib(MSVCR90D.dll)
>>> LIBCMT.lib Xdmf
>>> ...
>>>
>>> Fix:
>>> Add "libcmt" in Xdmf Property Pages -> Configuration Properties ->
>>> Linker -> Input -> Ignore Specific Library for both Debug and Release
>>> build.
>>>
>>> For the libcmt errors, how can I patch the corresponding CMakeLists.txt
>>> file? Thanks a lot.
>>>
>>> Best,
>>> x
>>> _______________________________________________
>>> 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 ParaView Wiki at:
>>> http://paraview.org/Wiki/ParaView
>>>
>>> Follow this link to subscribe/unsubscribe:
>>> http://www.paraview.org/mailman/listinfo/paraview
>>>
>>
>>
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.paraview.org/pipermail/paraview/attachments/20100907/63244d8c/attachment.htm>
More information about the ParaView
mailing list