cannot open file 'LIBC.lib', /VERBOSE not revealing anything

  • Thread starter Thread starter Anna Smidt
  • Start date Start date
A

Anna Smidt

Hello again,

I am trying to convert a VC6 project to VC9, and the linker tells me
that it cannot open file 'LIBC.lib'.
But I didn't find this lib referenced or added anywhere.
I used the linker option /VERBOSE:LIB, to have the compiler logging
which component needs it. But in Build.log it only mentions the error
mentioned above, it doesn't tell me any further details.
How would you go on now, please?

Thanks.
Anna
 
Anna said:
Hello again,

I am trying to convert a VC6 project to VC9, and the linker tells me
that it cannot open file 'LIBC.lib'.
But I didn't find this lib referenced or added anywhere.
I used the linker option /VERBOSE:LIB, to have the compiler logging
which component needs it. But in Build.log it only mentions the error
mentioned above, it doesn't tell me any further details.
How would you go on now, please?

Thanks.
Anna

What if you create a dummy, no-op .lib or .obj file
named libc.lib, and put it where link can find it ?

--PA
 
What if you create a dummy, no-op .lib or .obj file
named libc.lib, and put it where link can find it ?

--PA

I don't know yet how to create a .lib file, but I used a .LIB file that
I found somewhere on my hard drive. It had nothing to do with my
project. I renamed it to LIBC.LIB and put it in my app's folder. The
compiler complained:

LINK : warning LNK4098: defaultlib 'LIBC' conflicts with use of other
libs; use /NODEFAULTLIB:library

But there is no critical error anymore, and for the first time ever the
app compiled. :-)

But it's really strange to me what's going wrong with that LIBC.LIB, and
I don't really want to solve the problem by just giving the compiler/
linker a file that's named as it expects it. I am wondering why it wants
a file that it won't use.

Anna
 
If anybody still has ideas, please let me know. I find this all a bit
strange.
Thanks,
Anna
 
Anna said:
If anybody still has ideas, please let me know. I find this all a bit
strange.

Anna:

Libc.lib is the old single-threaded static-linked C runtime library. This is no
longer used in recent versions of Visual C++. Static-linked projects should use
the multi-threaded library LibMT.lib.

Did you look in

Project Properties->Configuration Properties->Linker->Input->Additional Dependencies

? If you see libc.lib there, remove it.

Otherwise, is all the source code for your project contained within the project,
or are you linking some compiled libraries? It seems to be it must be the
latter, because Visual Studio 2008 itself will never try to link Libc.lib.

Maybe you should tell us right from the beginning exactly what you have done here.
 
Did you look in
Project Properties->Configuration Properties->Linker->Input->Additional
Dependencies

? If you see libc.lib there, remove it.

There are no references to this file. Neither under Additional
Dependencies nor within the source code.
Otherwise, is all the source code for your project contained within the
project, or are you linking some compiled libraries? It seems to be it
must be the latter, because Visual Studio 2008 itself will never try to
link Libc.lib.

In the solution there are 3 projects, and the last one has 1 of the 3 as
an additional include
Maybe you should tell us right from the beginning exactly what you have
done here.

Where should I start?

Anna
 
Anna said:
Where should I start?

Well maybe tell us why nobody in your
company can help you in the transition from VB to c++,
or why they won't invite a consultant to start the
project quickly, and in the right way?
Not nice of them to let a lady struggling alone :)

--PA
 
Anna said:
There are no references to this file. Neither under Additional
Dependencies nor within the source code.

In the solution there are 3 projects, and the last one has 1 of the 3 as
an additional include

Have you checked the additional dependencies of all the projects?

[What do you mean by "additional include"?]
Where should I start?

.... from the beginning.
 
I am a hobby programmer, I don't have a company! I am working in a
university, but that doesn't have anything what I do in VB6 or C++ for fun.

Anna
 
Have you checked the additional dependencies of all the projects?

Yes, dozens of times.

I have the following additional dependencies:

-Custom:
cv.lib
cxcore.lib
highgui.lib
odbc32.lib
odbccp32.lib

-Inherited:
kernel32.lib
user32.lib
gdi32.lib
winspool.lib
comdlg32.lib
advapi32.lib
shell32.lib
ole32.lib
oleaut32.lib
uuid.lib
odbc32.lib
odbccp32.lib

[What do you mean by "additional include"?]

I meant project->properties->C++->Additional include directories
... from the beginning.
I saw an interesting project once written in C++. I didn't know any C++,
so I came here and was helped very nicely.
See my 30 previous posts :-)

I will try to fight a little for myself now and if I find out where the
linker's wish for LIBC.lic comes from I will post it.
I think I cannot put all the facts in words because I acted rudely on
this app and would do many things different if I had to do it again.

Anna
 
Anna said:
Have you checked the additional dependencies of all the projects?

Yes, dozens of times.

I have the following additional dependencies:

-Custom:
cv.lib
cxcore.lib
highgui.lib
odbc32.lib
odbccp32.lib

-Inherited:
kernel32.lib
user32.lib
gdi32.lib
winspool.lib
comdlg32.lib
advapi32.lib
shell32.lib
ole32.lib
oleaut32.lib
uuid.lib
odbc32.lib
odbccp32.lib

[What do you mean by "additional include"?]

I meant project->properties->C++->Additional include directories
... from the beginning.
I saw an interesting project once written in C++. I didn't know any C++,
so I came here and was helped very nicely.
See my 30 previous posts :-)

I will try to fight a little for myself now and if I find out where the
linker's wish for LIBC.lic comes from I will post it.
I think I cannot put all the facts in words because I acted rudely on
this app and would do many things different if I had to do it again.

Anna:

Well, I really think you should have started out with something simpler, like
writing your own simple programs, reading a C++ book, working through the
examples, that sort of thing.

You say "if I had to do it again". Why don't you just start again, if you think
you may have messed the project up?

I don't know anything about OpenCV, but about these files:

cv.lib
cxcore.lib
highgui.lib

How were these compiled? Presumably they are import libraries for DLL's of the
same name?
 
Anna said:
Have you checked the additional dependencies of all the projects?

Yes, dozens of times.

I have the following additional dependencies:

-Custom:
cv.lib
cxcore.lib
highgui.lib
odbc32.lib
odbccp32.lib

-Inherited:
kernel32.lib
user32.lib
gdi32.lib
winspool.lib
comdlg32.lib
advapi32.lib
shell32.lib
ole32.lib
oleaut32.lib
uuid.lib
odbc32.lib
odbccp32.lib

[What do you mean by "additional include"?]

I meant project->properties->C++->Additional include directories
... from the beginning.
I saw an interesting project once written in C++. I didn't know any C++,
so I came here and was helped very nicely.
See my 30 previous posts :-)

I will try to fight a little for myself now and if I find out where the
linker's wish for LIBC.lic comes from I will post it.
I think I cannot put all the facts in words because I acted rudely on
this app and would do many things different if I had to do it again.

Anna:

This attempt to link libc.lib should not be there, but you might try going to

Project Properties->Configuration Properties->Linker->Input->Ignore Specific Library

and typing libc.lib there.
 
David,

thanks. I recompiled OpenCV and DirectShow, maybe that's already where
the trouble started regarding LIBC.lib.
Yes, I will do everything from the start again.
I have a C++ book, but I learn quicker when I dive right into a project
and can learn from others. In the book problems don't occur.
I will try to set LIBC.lib up to be ignored, but that's only a hack like
renaming another file to LIBC.lib, isn't it?
I will try to understand it by redoing everything now.

Anna
 
Back
Top