Bo Peng wrote:
> Dear all,
> 
> After several hours of downloading, compiling, I have (again) set up a
> qt4/msvc building environment. However, scons fails at the last step:
> 
> link /nologo /debug /map /OUT:debug\qt4\lyx.exe /LIBPATH:debug\libs
> /LIBPATH:C:\lyx-devel\qt-414\lib /LIBPATH:C:\lyx-devel\zlib\lib
> /LIBPATH:C:\lyx-devel\iconv\lib lyxbase_pre.lib mathed.lib insets.lib
> frontends.lib qt4.lib controllers.lib graphics.lib support.lib
> lyxbase_post.lib included_boost_signals.lib included_boost_regex.lib
> included_boost_filesystem.lib included_boost_iostreams.lib
> QtCored4.lib QtGuid4.lib included_intl.lib libiconv.lib ole32.lib
> shlwapi.lib shell32.lib advapi32.lib zdll.lib gdi32.lib ole32.lib
> shlwapi.lib shell32.lib advapi32.lib zdll.lib gdi32.lib
> "debug\common\main.obj
> 
> 
> With error message:
> 
> 
> LIBCMT.lib(dosmap.obj) : error LNK2005: __errno already defined in
> MSVCRT.lib(MS
> VCR80.dll)
> LIBCMT.lib(invarg.obj) : error LNK2005: __invoke_watson already defined
> in MSVCR
> T.lib(MSVCR80.dll)
> LIBCMT.lib(invarg.obj) : error LNK2005: __invalid_parameter_noinfo
> already defin
> ed in MSVCRT.lib(MSVCR80.dll)
> LIBCMT.lib(crt0dat.obj) : error LNK2005: __amsg_exit already defined in
> MSVCRT.l
> ib(MSVCR80.dll)
> LIBCMT.lib(crt0dat.obj) : error LNK2005: __initterm_e already defined in
> MSVCRT.
> lib(MSVCR80.dll)
> LIBCMT.lib(crt0dat.obj) : error LNK2005: _exit already defined in
> MSVCRT.lib(MSV
> CR80.dll)
> LIBCMT.lib(crt0dat.obj) : error LNK2005: __exit already defined in
> MSVCRT.lib(MS
> VCR80.dll)
> LIBCMT.lib(crt0dat.obj) : error LNK2005: __cexit already defined in
> MSVCRT.lib(M
> SVCR80.dll)
> LIBCMT.lib(tidtable.obj) : error LNK2005: __encode_pointer already
> defined in MS
> VCRT.lib(MSVCR80.dll)
> LIBCMT.lib(tidtable.obj) : error LNK2005: __decode_pointer already
> defined in MS
> VCRT.lib(MSVCR80.dll)
> LIBCMT.lib(calloc.obj) : error LNK2005: _calloc already defined in
> MSVCRT.lib(MS
> VCR80.dll)
> LIBCMT.lib(realloc.obj) : error LNK2005: _realloc already defined in
> MSVCRT.lib(
> MSVCR80.dll)
> LIBCMT.lib(crt0.obj) : error LNK2005: _mainCRTStartup already defined in
> MSVCRT.
> lib(crtexe.obj)
> LIBCMT.lib(mlock.obj) : error LNK2005: __unlock already defined in
> MSVCRT.lib(MS
> VCR80.dll)
> LIBCMT.lib(mlock.obj) : error LNK2005: __lock already defined in
> MSVCRT.lib(MSVC
> R80.dll)
> LIBCMT.lib(crt0init.obj) : error LNK2005: ___xi_a already defined in
> MSVCRT.lib(
> cinitexe.obj)
> LIBCMT.lib(crt0init.obj) : error LNK2005: ___xi_z already defined in
> MSVCRT.lib(
> cinitexe.obj)
> LIBCMT.lib(crt0init.obj) : error LNK2005: ___xc_a already defined in
> MSVCRT.lib(
> cinitexe.obj)
> LIBCMT.lib(crt0init.obj) : error LNK2005: ___xc_z already defined in
> MSVCRT.lib(
> cinitexe.obj)
> LIBCMT.lib(hooks.obj) : error LNK2005: "void __cdecl terminate(void)"
> (?terminat
> e@@YAXXZ) already defined in MSVCRT.lib(MSVCR80.dll)
> LIBCMT.lib(winxfltr.obj) : error LNK2005: __XcptFilter already defined
> in MSVCRT
> .lib(MSVCR80.dll)
> LIBCMT.lib(winsig.obj) : error LNK2005: _signal already defined in
> MSVCRT.lib(MS
> VCR80.dll)
> LIBCMT.lib(winsig.obj) : error LNK2005: _raise already defined in
> MSVCRT.lib(MSV
> CR80.dll)
> LIBCMT.lib(setlocal.obj) : error LNK2005: __configthreadlocale already
> defined i
> n MSVCRT.lib(MSVCR80.dll)
> LIBCMT.lib(setlocal.obj) : error LNK2005: _setlocale already defined in
> MSVCRT.l
> ib(MSVCR80.dll)
> LIBCMT.lib(errmode.obj) : error LNK2005: ___set_app_type already defined
> in MSVC
> RT.lib(MSVCR80.dll)
> LIBCMT.lib(strftime.obj) : error LNK2005: _strftime already defined in
> MSVCRT.li
> b(MSVCR80.dll)
> LIBCMT.lib(lconv.obj) : error LNK2005: _localeconv already defined in
> MSVCRT.lib
> (MSVCR80.dll)
> LIBCMT.lib(getenv.obj) : error LNK2005: _getenv already defined in
> MSVCRT.lib(MS
> VCR80.dll)
> LIBCMT.lib(tolower.obj) : error LNK2005: _tolower already defined in
> MSVCRT.lib(
> MSVCR80.dll)
> LIBCMT.lib(strtol.obj) : error LNK2005: _strtol already defined in
> MSVCRT.lib(MS
> VCR80.dll)
> LIBCMT.lib(strtol.obj) : error LNK2005: _strtoul already defined in
> MSVCRT.lib(M
> SVCR80.dll)
> MSVCRT.lib(MSVCR80.dll) : error LNK2005: __close already defined in
> LIBCMT.lib(c
> lose.obj)
> MSVCRT.lib(MSVCR80.dll) : error LNK2005: __write already defined in
> LIBCMT.lib(w
> rite.obj)
> MSVCRT.lib(MSVCR80.dll) : error LNK2005: __read already defined in
> LIBCMT.lib(re
> ad.obj)
> MSVCRT.lib(MSVCR80.dll) : error LNK2005: __open already defined in
> LIBCMT.lib(op
> en.obj)
> LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other
> libs; us
> e /NODEFAULTLIB:library
> LINK : warning LNK4098: defaultlib 'LIBCMT' conflicts with use of other
> libs; us
> e /NODEFAULTLIB:library
> debug\qt4\lyx.exe : fatal error LNK1169: one or more multiply defined
> symbols fo
> und
> scons: *** [debug\qt4\lyx.exe] Error 1169
> scons: building terminated because of errors.
> 
> 
> Does anyone know what is going on? I guess I did not set up the msvc
> environment correctly. This is the latest 1.5.x svn.
> 
> Cheers,
> Bo
> 

Looks like you have mixed different runtime libraries (static/shared).
In MSVCRT.lib are the symbols of MSVCR80.dll, but libcmt is a static
library. Maybe it is enough to add -MDd to the lyx compiler flags.


-- 
Peter Kümmel

Reply via email to