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
>
>
/*
 * File:  test1.xpp
 * Copyright (C) 2008 The Institute for System Programming of the Russian Academy of Sciences (ISP RAS)
 */

#include "libsedna.h"
#include <stdio.h>
#include <string.h>

int main()
{
    SednaConnection conn = SEDNA_CONNECTION_INITIALIZER;
    int bytes_read;
    char buf[1024];

	printf("Client has been started.\n");
	int res = SEconnect(&conn, "localhost", "x", "SYSTEM", "MANAGER");
	if(res != SEDNA_SESSION_OPEN) 
	{
	    printf("Session starting failed %s\n", SEgetLastErrorMsg(&conn));
	    return -1;
	}
	else printf("Session started\n");
	
 	res = SEexecute(&conn, "1+1"); 

	if(res != SEDNA_QUERY_SUCCEEDED)
	{  
	    printf("Query failed: \n%s\n", SEgetLastErrorMsg(&conn));  
	    //closing session  
	    SEclose(&conn);  
	    return -1;  
	}  

	while((res = SEnext(&conn)) != SEDNA_RESULT_END)  
	{  
	    if (res == SEDNA_ERROR)  
	    {  
	        printf("Failed to get next result item from server: \n%s\n", SEgetLastErrorMsg(&conn));  
	        SEclose(&conn);  
        return -1;  
	    }  
	    do  
	    {  
	        bytes_read = SEgetData(&conn, buf, 1024 - 1);  
	        if(bytes_read == SEDNA_ERROR)  
	        {  
	            printf("Failed to get result data from server: \n%s\n", SEgetLastErrorMsg(&conn));  
	            SEclose(&conn);  
	            return -1;  
	        }  
	        buf[bytes_read] = '\0';  
	        printf("%s", buf);  
	  
	    }while(bytes_read > 0);  
	    printf("\n");  
	}  
	
	res = SEclose(&conn);
	if(res != SEDNA_SESSION_CLOSED) 
	{
	    printf("Session closing failed %s\n", SEgetLastErrorMsg(&conn));
	    return -1;
	}
	else printf("Session has been closed\n");
	
	
	return 1;
} 	
-------------------------------------------------------------------------
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