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

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

P: n/a
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
Oct 26 '08 #1
Share this Question
Share on Google+
12 Replies


P: n/a
Anna Smidt wrote:
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
Oct 26 '08 #2

P: n/a
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
Oct 27 '08 #3

P: n/a
If anybody still has ideas, please let me know. I find this all a bit
strange.
Thanks,
Anna
Oct 27 '08 #4

P: n/a
Anna Smidt wrote:
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.

--
David Wilkinson
Visual C++ MVP
Oct 27 '08 #5

P: n/a
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
Oct 27 '08 #6

P: n/a
Anna Smidt wrote:
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
Oct 27 '08 #7

P: n/a
Anna Smidt wrote:
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
Have you checked the additional dependencies of all the projects?

[What do you mean by "additional include"?]
>Maybe you should tell us right from the beginning exactly what you
have done here.

Where should I start?
.... from the beginning.

--
David Wilkinson
Visual C++ MVP
Oct 27 '08 #8

P: n/a
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
Oct 28 '08 #9

P: n/a
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
>Where should I start?

... 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
Oct 28 '08 #10

P: n/a
Anna Smidt wrote:
>
>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
>>Where should I start?

... 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?

--
David Wilkinson
Visual C++ MVP
Oct 28 '08 #11

P: n/a
Anna Smidt wrote:
>
>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
>>Where should I start?

... 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 Wilkinson
Visual C++ MVP
Oct 28 '08 #12

P: n/a
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
Oct 29 '08 #13

This discussion thread is closed

Replies have been disabled for this discussion.