[openamq-dev] OpenAMQ and Visual Studio 2005

Martin Sustrik sustrik at imatix.com
Fri Feb 8 10:43:21 CET 2008


Hi Jorg,

The reason why we are not supporting VS2005 is that each version of MSVC 
has different way of defining projects and writing a build system to 
support all of them is just too tedious.

Therefore, if you manage to build OpenAMQ with MSVC2005, it would be 
nice if you can contribute the project files so that other people can 
use it.

However, as far as I understand you've managed to build OpenAMQ project 
itself and the problem you have concerns only the client application you 
are trying to build. This shouldn't be a problem. The problem you are 
experiencing stems from the fact that you are trying to link your app 
with DLL version of CRT rather than with static CRT. Note that OpenAMQ 
does not support DLL CRT.

Therefore, try to use "Multi-threaded debug" runtime library rather than 
"Multi-threaded debug DLL".

Martin

Jörg Fischer wrote:
> Hi,
>
> I've got some question concerning the compatibility of OpenAMQ and 
> Visual Studio 2005.
> On your web page you state, that 'Note that Visual Studio 2005 
> (including the Express Edition)
> is not currently supported.' Can anyone say when VS 2005 will be supported?
>
> Right now I'm trying to integrate OpenAMQ in my VS 2005 project despite 
> it's not
> supported. Yes, it's urgent ;) I even get quite far, since sending and 
> receiving works.
> The problem seems to be located in the compiler- and linker-settings. 
> Based on the
> wiki tutorial 'Building client applications using MSVC on Windows' I 
> created a project.
> It works with the following settings:
>  * Use MFC                    = Use Standard Windows Libraries
>  * Runtime Library           = Multi-threaded (Debug) DLL
>  * Ignore Specific Library = MSVCRTD.LIB
>
> But since MSVCRTD.LIB is ignored, some functions from this library
> are not available, e. g. adding the following code:
>    #include <assert.h>
>    // ...
>    assert(pName);
> results in the following error:
>    error LNK2001: unresolved external symbol __imp___wassert
>
> The other option would be not to ignore MSVCRTD.LIB. This yields
> the more errors: 
>    LIBCMTD.lib(crt0dat.obj) : error LNK2005: _exit already defined in MSVCRTD.lib(MSVCR80D.dll)
> I've copied the complete list of these errors at the end of this mail.
> My question now is, whether I've misconfigured the compiler- and linker-
> settings or is this the reason why OpenAMQ doesn't support VS 2005.
>
> Thanks,
>
> Jörg Fischer
>
>
> --------------------------------------------------------------------------
> 2>Linking...
> 2>LIBCMTD.lib(crt0dat.obj) : error LNK2005: _exit already defined in MSVCRTD.lib(MSVCR80D.dll)
> 2>LIBCMTD.lib(crt0dat.obj) : error LNK2005: __amsg_exit already defined in MSVCRTD.lib(MSVCR80D.dll)
> 2>LIBCMTD.lib(crt0dat.obj) : error LNK2005: __initterm_e already defined in MSVCRTD.lib(MSVCR80D.dll)
> 2>LIBCMTD.lib(dbgheap.obj) : error LNK2005: _malloc already defined in MSVCRTD.lib(MSVCR80D.dll)
> 2>LIBCMTD.lib(dbgheap.obj) : error LNK2005: __malloc_dbg already defined in MSVCRTD.lib(MSVCR80D.dll)
> 2>LIBCMTD.lib(dbgheap.obj) : error LNK2005: _realloc already defined in MSVCRTD.lib(MSVCR80D.dll)
> 2>LIBCMTD.lib(dbgheap.obj) : error LNK2005: _free already defined in MSVCRTD.lib(MSVCR80D.dll)
> 2>LIBCMTD.lib(dbgheap.obj) : error LNK2005: __free_dbg already defined in MSVCRTD.lib(MSVCR80D.dll)
> 2>LIBCMTD.lib(dbgheap.obj) : error LNK2005: __CrtSetCheckCount already defined in MSVCRTD.lib(MSVCR80D.dll)
> 2>LIBCMTD.lib(fflush.obj) : error LNK2005: _fflush already defined in MSVCRTD.lib(MSVCR80D.dll)
> 2>LIBCMTD.lib(crt0init.obj) : error LNK2005: ___xi_a already defined in MSVCRTD.lib(cinitexe.obj)
> 2>LIBCMTD.lib(crt0init.obj) : error LNK2005: ___xi_z already defined in MSVCRTD.lib(cinitexe.obj)
> 2>LIBCMTD.lib(crt0init.obj) : error LNK2005: ___xc_a already defined in MSVCRTD.lib(cinitexe.obj)
> 2>LIBCMTD.lib(crt0init.obj) : error LNK2005: ___xc_z already defined in MSVCRTD.lib(cinitexe.obj)
> 2>LIBCMTD.lib(hooks.obj) : error LNK2005: "void __cdecl terminate(void)" (?terminate@@YAXXZ) already defined in MSVCRTD.lib(MSVCR80D.dll)
> 2>LIBCMTD.lib(winxfltr.obj) : error LNK2005: ___CppXcptFilter already defined in MSVCRTD.lib(MSVCR80D.dll)
> 2>LIBCMTD.lib(winsig.obj) : error LNK2005: _signal already defined in MSVCRTD.lib(MSVCR80D.dll)
> 2>LIBCMTD.lib(winsig.obj) : error LNK2005: _raise already defined in MSVCRTD.lib(MSVCR80D.dll)
> 2>LIBCMTD.lib(dbghook.obj) : error LNK2005: __crt_debugger_hook already defined in MSVCRTD.lib(MSVCR80D.dll)
> 2>LIBCMTD.lib(tidtable.obj) : error LNK2005: __encode_pointer already defined in MSVCRTD.lib(MSVCR80D.dll)
> 2>LIBCMTD.lib(tidtable.obj) : error LNK2005: __encoded_null already defined in MSVCRTD.lib(MSVCR80D.dll)
> 2>LIBCMTD.lib(tidtable.obj) : error LNK2005: __decode_pointer already defined in MSVCRTD.lib(MSVCR80D.dll)
> 2>LIBCMTD.lib(sprintf.obj) : error LNK2005: _sprintf already defined in MSVCRTD.lib(MSVCR80D.dll)
> 2>LIBCMTD.lib(dosmap.obj) : error LNK2005: __errno already defined in MSVCRTD.lib(MSVCR80D.dll)
> 2>LIBCMTD.lib(mlock.obj) : error LNK2005: __lock already defined in MSVCRTD.lib(MSVCR80D.dll)
> 2>LIBCMTD.lib(mlock.obj) : error LNK2005: __unlock already defined in MSVCRTD.lib(MSVCR80D.dll)
> 2>LIBCMTD.lib(vsprintf.obj) : error LNK2005: _vsprintf already defined in MSVCRTD.lib(MSVCR80D.dll)
> 2>LIBCMTD.lib(stricmp.obj) : error LNK2005: __stricmp already defined in MSVCRTD.lib(MSVCR80D.dll)
> 2>LIBCMTD.lib(printf.obj) : error LNK2005: _printf already defined in MSVCRTD.lib(MSVCR80D.dll)
> 2>LIBCMTD.lib(getenv.obj) : error LNK2005: _getenv already defined in MSVCRTD.lib(MSVCR80D.dll)
> 2>LIBCMTD.lib(tolower.obj) : error LNK2005: _tolower already defined in MSVCRTD.lib(MSVCR80D.dll)
> 2>LIBCMTD.lib(strnicmp.obj) : error LNK2005: __strnicmp already defined in MSVCRTD.lib(MSVCR80D.dll)
> 2>   Creating library D:\bmi\Debug\communication.lib and object D:\bmi\Debug\communication.exp
> 2>LINK : warning LNK4098: defaultlib 'MSVCRTD' conflicts with use of other libs; use /NODEFAULTLIB:library
> 2>LINK : warning LNK4098: defaultlib 'LIBCMTD' conflicts with use of other libs; use /NODEFAULTLIB:library
> 2>LIBCMTD.lib(crt0.obj) : error LNK2019: unresolved external symbol _main referenced in function ___tmainCRTStartup
>
>
> _______________________________________________
> openamq-dev mailing list
> openamq-dev at lists.openamq.org
> http://lists.openamq.org/mailman/listinfo/openamq-dev
>   



More information about the openamq-dev mailing list