Ivan, this is a dirty hack. Have you confirmed that libsedna doesn't break
silently when linked that way?

By the way, MSVCRT and LIBCMT are generally incompatible. If libsedbnamt was
compiled to use static multithreaded runtime, it should be linked with
static multithreaded runtime (LIBCMT), not dll runtime (MSVCRT).

I believe there exists 2 adequite solutions to the problem, both of them
requires MODIS effort.

(a) Change makefiles to build another libsednaXX (dll runtime) along with
existing libsedna (static runtime) and libsednamt (static multithreaded
runtime). Btw, where are libsednad (static debug runtime) and libsednamtd
(static debug multithreaded runtime)? It looks like single-threaded static
runtime could be safely ignored (no plain LIBC in recent MSVC), so you can
switch libsedna from LIBC to MSVCRT without much complaints, if keeping the
number of libsedna-s low is important:)

(b) Build the single libsedna. Let us choose the variation of runtime (add
another configurable parameter or something).



WBR, Mejedi

2008/12/4 Ivan Shcheklein <[EMAIL PROTECTED]>

> Hi Khaled,
>
> Try to pass * /NODEFAULTLIB:LIBCMT.LIB*  option to the linker.
> You can use it directly (if you directly call linker) or pass it through *
> /link* option (if linker is called via cl):
>
> *cl /MDd /Od /Zi /W3 test1.cpp libsednamt.lib Advapi32.lib Ws2_32.lib
> /link /NODEFAULTLIB:LIBCMT.LIB
>
>
> *Ivan Shcheklein,
> Sedna Team
>
>
>
>
> On Wed, Dec 3, 2008 at 1:57 AM, khaled mammou <[EMAIL PROTECTED]>wrote:
>
>>
>>
>> ----- Message transféré ----
>> *De :* khaled mammou <[EMAIL PROTECTED]>
>> *À :* Ivan Shcheklein <[EMAIL PROTECTED]>
>> *Envoyé le :* Mardi, 2 Décembre 2008, 13h54mn 07s
>>
>> *Objet :* Re : [Sedna-discussion] VS2008: libsedna in Multithreaded DLL
>> (/MD)?
>>
>>  Hi Ivan,
>> Here the log:
>>
>> 1>Compiling manifest to resources...
>>
>> 1>Microsoft (R) Windows (R) Resource Compiler Version 6.0.5724.0
>>
>> 1>Copyright (C) Microsoft Corporation. All rights reserved.
>>
>> 1>Linking...
>>
>> 1>LIBCMT.lib(_file.obj) : error LNK2005: ___iob_func already defined in
>> MSVCRTD.lib(MSVCR90D.dll)
>>
>> 1>LIBCMT.lib(crt0dat.obj) : error LNK2005: __amsg_exit already defined in
>> MSVCRTD.lib(MSVCR90D.dll)
>>
>> 1>LIBCMT.lib(crt0dat.obj) : error LNK2005: __initterm_e already defined in
>> MSVCRTD.lib(MSVCR90D.dll)
>>
>> 1>LIBCMT.lib(crt0dat.obj) : error LNK2005: _exit already defined in
>> MSVCRTD.lib(MSVCR90D.dll)
>>
>> 1>LIBCMT.lib(crt0dat.obj) : error LNK2005: __exit already defined in
>> MSVCRTD.lib(MSVCR90D.dll)
>>
>> 1>LIBCMT.lib(crt0dat.obj) : error LNK2005: __cexit already defined in
>> MSVCRTD.lib(MSVCR90D.dll)
>>
>> 1>LIBCMT.lib(fflush.obj) : error LNK2005: _fflush already defined in
>> MSVCRTD.lib(MSVCR90D.dll)
>>
>> 1>LIBCMT.lib(crt0init.obj) : error LNK2005: ___xi_a already defined in
>> MSVCRTD.lib(cinitexe.obj)
>>
>> 1>LIBCMT.lib(crt0init.obj) : error LNK2005: ___xi_z already defined in
>> MSVCRTD.lib(cinitexe.obj)
>>
>> 1>LIBCMT.lib(crt0init.obj) : error LNK2005: ___xc_a already defined in
>> MSVCRTD.lib(cinitexe.obj)
>>
>> 1>LIBCMT.lib(crt0init.obj) : error LNK2005: ___xc_z already defined in
>> MSVCRTD.lib(cinitexe.obj)
>>
>> 1>LIBCMT.lib(tidtable.obj) : error LNK2005: __encode_pointer already
>> defined in MSVCRTD.lib(MSVCR90D.dll)
>>
>> 1>LIBCMT.lib(tidtable.obj) : error LNK2005: __decode_pointer already
>> defined in MSVCRTD.lib(MSVCR90D.dll)
>>
>> 1>LIBCMT.lib(hooks.obj) : error LNK2005: "void __cdecl terminate(void)"
>> (?terminate@@YAXXZ) already defined in MSVCRTD.lib(MSVCR90D.dll)
>>
>> 1>LIBCMT.lib(winxfltr.obj) : error LNK2005: __XcptFilter already defined
>> in MSVCRTD.lib(MSVCR90D.dll)
>>
>> 1>LIBCMT.lib(invarg.obj) : error LNK2005: __invoke_watson already defined
>> in MSVCRTD.lib(MSVCR90D.dll)
>>
>> 1>LIBCMT.lib(invarg.obj) : error LNK2005: __invalid_parameter already
>> defined in MSVCRTD.lib(MSVCR90D.dll)
>>
>> 1>LIBCMT.lib(errmode.obj) : error LNK2005: ___set_app_type already defined
>> in MSVCRTD.lib(MSVCR90D.dll)
>>
>> 1>LIBCMT.lib(mlock.obj) : error LNK2005: __unlock already defined in
>> MSVCRTD.lib(MSVCR90D.dll)
>>
>> 1>LIBCMT.lib(mlock.obj) : error LNK2005: __lock already defined in
>> MSVCRTD.lib(MSVCR90D.dll)
>>
>> 1>LIBCMT.lib(setlocal.obj) : error LNK2005: __configthreadlocale already
>> defined in MSVCRTD.lib(MSVCR90D.dll)
>>
>> 1>LIBCMT.lib(setlocal.obj) : error LNK2005: _setlocale already defined in
>> MSVCRTD.lib(MSVCR90D.dll)
>>
>> 1>LIBCMT.lib(dosmap.obj) : error LNK2005: __errno already defined in
>> MSVCRTD.lib(MSVCR90D.dll)
>>
>> 1>LIBCMT.lib(strftime.obj) : error LNK2005: _strftime already defined in
>> MSVCRTD.lib(MSVCR90D.dll)
>>
>> 1>LIBCMT.lib(stricmp.obj) : error LNK2005: __stricmp already defined in
>> MSVCRTD.lib(MSVCR90D.dll)
>>
>> 1>LIBCMT.lib(getenv.obj) : error LNK2005: _getenv already defined in
>> MSVCRTD.lib(MSVCR90D.dll)
>>
>> 1>LIBCMT.lib(tolower.obj) : error LNK2005: _tolower already defined in
>> MSVCRTD.lib(MSVCR90D.dll)
>>
>> 1>LIBCMT.lib(strnicmp.obj) : error LNK2005: __strnicmp already defined in
>> MSVCRTD.lib(MSVCR90D.dll)
>>
>> 1>LINK : warning LNK4098: defaultlib 'MSVCRTD' conflicts with use of other
>> libs; use /NODEFAULTLIB:library
>>
>> 1>LINK : warning LNK4098: defaultlib 'LIBCMT' conflicts with use of other
>> libs; use /NODEFAULTLIB:library
>>
>> 1>LIBCMT.lib(crt0.obj) : error LNK2019: unresolved external symbol _main
>> referenced in function ___tmainCRTStartup
>>
>> 1>C:\Documents and
>> Settings\kmammou\Desktop\CAMS\ServerCOLLADA\Debug\ServerCOLLADA.exe : fatal
>> error LNK1120: 1 unresolved externals
>>
>> 1>Build log was saved at "file://c:\Documents and
>> Settings\kmammou\Desktop\CAMS\ServerCOLLADA\ServerCOLLADA\Debug\BuildLog.htm"
>>
>> 1>ServerCOLLADA - 30 error(s), 2 warning(s)
>>
>> ========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========
>>
>> I am using llibsednamt.lib with wxWidget under visual studio 2008.
>> wxWidget is compiled in Multi-threaded Debug DLL (/MDd) mode
>> my project is compiled in Multi-threaded Debug DLL (/MDd) mode
>>
>> Thankyou for the help.
>>
>> Khaled
>>
>>  ------------------------------
>> *De :* Ivan Shcheklein <[EMAIL PROTECTED]>
>> *À :* khaled mammou <[EMAIL PROTECTED]>
>> *Cc :* [email protected]
>> *Envoyé le :* Mardi, 2 Décembre 2008, 7h41mn 58s
>> *Objet :* Re: [Sedna-discussion] VS2008: libsedna in Multithreaded DLL
>> (/MD)?
>>
>> Hi Khaled,
>>
>> To help you we need the compilation log of your ptoject.
>>
>> Ivan Shcheklein,
>> Sedna Team
>>
>> On Tue, Dec 2, 2008 at 2:35 PM, khaled mammou <[EMAIL PROTECTED]>wrote:
>>
>>> Hi all,
>>> I am using VS2008.
>>> Please, how to compile the libsedna with the Multi threaded DLL (/MD)
>>> configuration instead of the Multi threaded (/MT) mode.
>>> In fact, i am using in my project other libraries compiled in /MD and I
>>> obtain link errors when I try to link with the /MT version of the
>>> libsednamt.lib
>>>
>>> Thank you in advance for your help.
>>>
>>> Khaled
>>>
>>>
>>>
>>>
>>> -------------------------------------------------------------------------
>>> This SF.Net email is sponsored by the Moblin Your Move Developer's
>>> challenge
>>> Build the coolest Linux based applications with Moblin SDK & win great
>>> prizes
>>> Grand prize is a trip for two to an Open Source event anywhere in the
>>> world
>>> http://moblin-contest.org/redirect.php?banner_id=100&url=/
>>> _______________________________________________
>>> Sedna-discussion mailing list
>>> [email protected]
>>> https://lists.sourceforge.net/lists/listinfo/sedna-discussion
>>>
>>
>>
>>
>>
>> -------------------------------------------------------------------------
>> This SF.Net email is sponsored by the Moblin Your Move Developer's
>> challenge
>> Build the coolest Linux based applications with Moblin SDK & win great
>> prizes
>> Grand prize is a trip for two to an Open Source event anywhere in the
>> world
>> http://moblin-contest.org/redirect.php?banner_id=100&url=/
>> _______________________________________________
>> Sedna-discussion mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/sedna-discussion
>>
>>
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's
> challenge
> Build the coolest Linux based applications with Moblin SDK & win great
> prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Sedna-discussion mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/sedna-discussion
>
>
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Sedna-discussion mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sedna-discussion

Reply via email to