linker errors: LNK2005

D

dullboy

I have a non-MFC project which generated some linker errors
"uuid.lib(ieguids.obj) : error LNK2005: _IID_Ixxx already defined in
xxx.obj.
_IID_Ixxx is an user-defined ID and xxx.obj is a user obj. I tried to
add uuid.lib in setting/link/input/ignored libraries, but it didn't
work. Any suggestion would be appreciated!
 
M

Martijn Lievaart

I have a non-MFC project which generated some linker errors
"uuid.lib(ieguids.obj) : error LNK2005: _IID_Ixxx already defined in
xxx.obj.
_IID_Ixxx is an user-defined ID and xxx.obj is a user obj. I tried to
add uuid.lib in setting/link/input/ignored libraries, but it didn't
work. Any suggestion would be appreciated!

Most of the time, this means you defined something in a header that should
go into one translation unit only (one source file). For instance:

---- someheader.h

void f()
{
}

This defines f in every source file that includes the header. Either make
it inline, or move it to a source file and replace the above with a
function declaration (``void f();'').

However, uuid.lib, iirc, has something to do with COM, so you'ld probably
best ask in a Windows/MFC/COM/.net oriented group.

HTH,
M4
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,763
Messages
2,569,562
Members
45,038
Latest member
OrderProperKetocapsules

Latest Threads

Top