By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,236 Members | 1,929 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,236 IT Pros & Developers. It's quick & easy.

compilation problem: LIBID already defined in...

P: n/a
I reorganized my VC6 MFC project a bit, and ended up having to rebuild
my precompiled header file. I'm not sure if that is relevant or not. I
can't get past the following error, however:

MISO_i.obj : error LNK2005: _LIBID_MISOLib already defined in MISO.obj

(MISO being the name of the application.)

Any ideas?

Jul 23 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
sh************@gmail.com wrote:
I reorganized my VC6 MFC project a bit, and ended up having to rebuild
my precompiled header file. I'm not sure if that is relevant or not. I
can't get past the following error, however:

MISO_i.obj : error LNK2005: _LIBID_MISOLib already defined in MISO.obj

(MISO being the name of the application.)

Any ideas?


Not really. Precompiled headers, MFC, are off-topic here. It is
possible to speculate that your symbol has multiple definition, and
the cause of it could be that you placed it in a header that is now
included in more than one translation unit. If that's the case, see
if declaring it 'extern' helps. You will also need to define it in
one of the units without 'extern'.

V
Jul 23 '05 #2

P: n/a
I'm very familiar with a LNK2005 error resulting from symbols that *I*
defined more than once, and with using 'extern' to circumvent that
problem.

That's not what's happening here, though. LIBID_MISOLib isn't a symbol
or variable, it's a library that the compiler is creating. Thus, I'm
clueless as to the cause of the linker error.

Jul 23 '05 #3

P: n/a
Oops. :)

You're right. Obviously it was a globally -- and multiply -- defined
numeric value. Fixed.

Jul 23 '05 #4

P: n/a
sh************@gmail.com wrote:
I'm very familiar with a LNK2005 error resulting from symbols that *I*
defined more than once, and with using 'extern' to circumvent that
problem.

That's not what's happening here, though. LIBID_MISOLib isn't a symbol
or variable, it's a library that the compiler is creating. Thus, I'm
clueless as to the cause of the linker error.


If your linker says that something is multiply defined, it _is_ a symbol.
There is nothing except a symbol that can be multiply defined. Period.

Apparently something in your MISO_i.obj is the result of defining that
symbol, as well as in MISO.obj. That's what your linker is telling you.
It's a different story whether you can do anything about it.

If it's not your symbol, it must come from a header you include directly
or indirectly. Check all headers for that symbol. Rebuild all. Blow
away all precompiled headers before doing that...

If that doesn't help, contact the creators of the library you think is
the culprit. Post to microsoft.public.vc.language if you think you need
more explanation about compiler-specific ways dealing with libraries.

V
Jul 23 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.