[great-users] Link errors

Vijayaraghavan Kalyanapasupathy vijayaraghavan.k at isis.vanderbilt.edu
Sat Mar 13 14:31:33 CST 2004


Hi All,

I build up a basic UDM application. Its as basic an application as one write: The code is as below:

<QUOTE>

#include "stdafx.h"

// UDM includes

#include "UdmBase.h"
#include "UdmGme.h"

// End UDM includes

int main(int argc, char *argv[])
{
	try
	{
		
		return 0;
	}
	catch(udm_exception e)
	{
		cout<<"Exception: "<<e.what()<<"\n";
	}
	catch(std::exception e)
	{
		cout<<"Exception: "<<e.what()<<"\n";
	}
	catch(...)
	{
		cout<<"Unknown exception: \n";
	}
	return -1;
}

</QUOTE>

When compiled with the library and header paths setup I get the following errors:

<QUOTE>

Linking...

stlport_vc6.lib(stlport_vc646.dll) : error LNK2005: "public: __thiscall _STL::allocator<char>::~allocator<char>(void)" (??1?$allocator at D@_STL@@QAE at XZ) already defined in UdmGme_D.lib(UdmGme.obj)

stlport_vc6.lib(stlport_vc646.dll) : error LNK2005: "public: __thiscall _STL::allocator<char>::allocator<char>(void)" (??0?$allocator at D@_STL@@QAE at XZ) already defined in UdmGme_D.lib(UdmGme.obj)

Debug/3dmint.exe : fatal error LNK1169: one or more multiply defined symbols found
Error executing link.exe.

3dmint.exe - 3 error(s), 0 warning(s)

</QUOTE>

Presumably, there is a clash between the STLPort libs and the Udm libs. If I hide the STLPort libraries (by the simple act of moving them to another location from VCxx\lib) I get the following errors:

<QUOTE>

--------------------Configuration: 3dmint - Win32 Debug--------------------
Linking...
LINK : fatal error LNK1104: cannot open file "stlport_vc6.lib"
Error executing link.exe.

3dmint.exe - 1 error(s), 0 warning(s)

</QUOTE>

My Project\Settings\Link\Object libraries/Modules is setup as follows:

<QUOTE>

UdmBase_D.lib UdmUtil_D.lib UdmGme_D.lib UdmDom_D.lib xerces-c_2D.lib zlibD.lib

</QUOTE>

(Debug config).

Any suggestions?

thanx,
vijai.


More information about the great-users mailing list