Question

fatal error LNK1104: cannot open file 'LIBC.lib...

Asked by: Gabriela1

Hi guys,

I am trying to add a new library to my project and I have this error

fatal error LNK1104: cannot open file 'LIBC.lib...
 

I tried to find thie library..but I only found this file in matlab, and ssdk for smart devices.So what should I do?

This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.

Subscribe now for full access to Experts Exchange and get

Instant Access to this Solution

  • Plus...
  • 30 Day FREE access, no risk, no obligation
  • Collaborate with the world's top tech experts
  • Unlimited access to our exclusive solution database
  • Never be left without tech help again

Subscribe Now

Asked On
2009-10-19 at 08:18:02ID24823803
Topics

Microsoft Visual C++

,

C++ Programming Language

Participating Experts
2
Points
500
Comments
38

Trusted by hundreds of thousands everyday for fast, accurate and reliable tech support.

  • "The time we save is the biggest benefit of Experts Exchange to Warner Bros. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange." Mike Kapnisakis, Warner Bros.
  • "Our team likes having a resource that is more secure than just using Google and most experts using this service really know their stuff. It's nice to look here first versus using Google." Dayna Sellner, Lockheed Martin
  • "Anytime that I've been stumped with a problem, 9 out of 10 times Experts Exchange has either the accepted solution or an open discussion of the potential solution to the problem." Kenny Red, eBay Inc.

See what Experts Exchange can do for you.

Got a question?

We've got the answer.

Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.

Screenshot of Experts Exchange Knowledgebase

Need individual assistance?

Our experts are ready to help.

If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.

Screenshot of Experts Exchange Knowledgebase

Want to learn from the best?

Read articles from industry experts.

Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.

Screenshot of an Article

Working on a long term project?

Store your work and research.

Save solutions to your questions, answers you’ve discovered through searching plus helpful articles in your personal knowledgebase for easy future access.

Screenshot of Experts Exchange Knowledgebase

Access the answers to your technology questions today.

Subscribe Now

30-day free trial. Register in 60 seconds.

What Makes Experts Exchange Unique?

Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Trusted by the world's most respected brands.

image of each brand's logo

Faithfully serving IT professionals since 1996.

Experts Exchange Logo

Try it out and discover for yourself.

Subscribe Now

30-day free trial. Register in 60 seconds.

Related Solutions

  1. Fatal Error
    Why the system error(fatal error) is accompanied with a blue screen?
  2. fatal error
    Dear all, I try to new a very simple dialog based project and then compile,however,I encounter the following error even re-install visual c++ many times.Do you know what is the problem?Thanks! Compiling resources... Compiling... StdAfx.cpp fatal error C1083: Cannot open co...
  3. fatal errorlnk1104
    I am working on vc++ application .when i complie the project i get this error fatal error lnk1104 cannot open mythread.lib. Mythread.lib is generated by the static library project included in the project and the path of mythread.lib is ./mythread/mythread.lib pls help me i...
  4. fatal error
    I get the following error when i build the project SNMPSession.cpp(5) : fatal error C1107: could not find assembly 'System.Net.DLL': please specify the assembly search path using /AI or by setting the LIBPATH environment variable What can be the problem??

Free Tech Articles

  1. WARNING: 5 Reasons why you should NEVER fix a computer for free.
    It is in our nature to love the puzzle. We are obsessed. The lot of us. We love puzzles. We love the challenge. We thrive on finding the answer. We hate disarray. It bothers us deep in our soul. W...
  2. SCCM OSD Basic troubleshooting
    SCCM 2007 OSD is a fantastic way to deploy operating systems, however, like most things SCCM issues can sometimes be difficult to resolve due to the sheer volume of logs to sift through and the dispe...
  3. Migrate Small Business Server 2003 to Exchange 2010 and Windows 2008 R2
    This guide is intended to provide step by step instructions on how to migrate from Small Business Server 2003 to Windows 2008 R2 with Exchange 2010. For this migration to work you will need the fo...
  4. Create a Win7 Gadget
    This article shows you how to create a simple "Gadget" -- a sort of mini-application supported by Windows 7 and Vista. Gadgets can be dropped anywhere on the desktop to provide instant information, ...
  5. Outlook continually prompting for username and password
    There have been a lot of questions recently regarding Outlook prompting for a username and password whilst using Exchange 2007. There are a few reasons why this would happen and I will try to cover t...
  6. Backup Exchange 2010 Information Store using Windows Backup
    There seems to be quite a lot of confusion around the ability to backup Exchange 2010 using the built in Windows Backup feature. This stems from the omission of this feature prior to Exchange 2007 s...

Cloud Class Webinars

  1. Avoiding Bugs in Microsoft Access
    Alison Balter takes and in-depth look at avoiding bugs in Access. In this webinar you will learn about using the immediate window to debug your applications, invoking the debugger, using breakpoints to troubleshoot, stepping through code, setting the next statement to execute, ...
  2. Top 10 Best New Features in Visio 2010
    Scott Helmers gives live demonstrations of the top 10 new features in Visio 2010. This webinar will teach you how to create compelling diagrams by adding shapes to the page with a single click, linking the shapes in a diagram to data in Excel (or SQL Server, or SharePoint), ...
  3. IT Consultant Business Secrets Revealed
    Michael Munger, Experts Exchange tech pro and IT consultant, pulls back the curtain on his very successful businesses and answers question on every IT consultant and business owner should know about. He shares secrets on what he did to solve the 5 most common problems in IT, ...
  4. Disaster Recovery and Business Continuity
    Quest CTO, Mike Billon, gives an overview of the steps involved in building a dunamic disaster recovery plan. Through case studies and an examination of software/hardware tooles for monitoring and testing, you'll gain a better understandin of where you are, where you want ...
  5. Organize Your Visio Diagrams with Containers and Lists
    Scott Helmers uses cross functional flowcharts, wireframe diagrams, data graphic legends and seating charts to teach you: how to ustilize all three new structured diagram components in Visio 2010, the best practices for organizeing shapes in previous version of Visio, how to organize ...
  6. How to Us Objects, Properties, Events and Methods in Microsoft Access
    Alison Dalter gives an in-depbth look at objects, properties, events and methods in Microsoft Access. In this webinar you will learn about using the object browser, referring to objects, working with properties and methods, working with object variables, understanding the ...

Join the Community

Give a Little. Get a Lot.

Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.

Join the Community

Answers

 

by: jkrPosted on 2009-10-19 at 08:21:45ID: 25605983

'libc.lib' usually comes with VC++ and should be located in your 'Lib' directory, check your Visual Studio installation directory. Also Make sure that this folder is listed in either your 'LIB' environment variable or VC++'s global settings. For the latter, go to "Tools|Options", select "Projects and Solutions", "VC++ Directories" and select "Library files" from the drop-down box.

 

by: Gabriela1Posted on 2009-10-19 at 08:31:27ID: 25606108

'libc.lib' usually comes with VC++ and should be located in your 'Lib' directory, check your Visual Studio installation directory.

There is no libc.lib. I have VS 2008.

 

by: pgnatyukPosted on 2009-10-19 at 08:33:37ID: 25606128

I think you can try to ignore this library:

Project -> Properties -> Configuration Properties -> Linker -> Input Ignore Specific Library: libc.lib

New library - does it mean that library was created in VS 2003?
If yes, please check these links:

http://social.msdn.microsoft.com/Forums/en-US/vcgeneral/thread/22f1d8b8-9abb-4a32-b5f7-565dc396e0aa

http://social.msdn.microsoft.com/forums/en-US/vcgeneral/thread/45a46d37-5e20-4e1a-87e7-9f9f65986f6a/

 

by: jkrPosted on 2009-10-19 at 08:35:39ID: 25606152

>> There is no libc.lib. I have VS 2008.

This is most unlikely. Just double checked that, it should be there. If not, there's something wrong with your installation. Also, could you maybe post your linker settings?

 

by: pgnatyukPosted on 2009-10-19 at 08:38:33ID: 25606196

I'm not sure, but libc is an old C run-time library for the so called single threaded model.
So, if I'm right, this option (C Run-Time Library) should be changed in the project for Multi-Threaded (/Md).

 

by: Gabriela1Posted on 2009-10-19 at 08:49:27ID: 25606317

I'm not sure, but libc is an old C run-time library for the so called single threaded model.
So, if I'm right, this option (C Run-Time Library) should be changed in the project for Multi-Threaded (/Md).


I have Multithreaded Debug DLL.

 

by: jkrPosted on 2009-10-19 at 08:52:29ID: 25606350

Maybe the new library you're adding is compiled using the static CRT. In that case you'll have to change your linker settings to that also, or you'll get linker errors.

 

by: Gabriela1Posted on 2009-10-19 at 08:55:20ID: 25606372

Linker Settings

Adiitional library directories

C:\Documents and Settings\ogvalent\Desktop\I90Controller_V2\I90Controller_DRI\RL_Toolbox_Windows_Source_20b\external_library

C:\Program Files\matlab704\bin\win32

C:\Program Files\matlab704\extern\lib\win32\microsoft
C:\Documents and Settings\ogvalent\Desktop\I90Controller_V2\I90Controller_DRI\RL_Toolbox_Windows_Source_20b\RL_Toolbox_Windows_Source_20b\Debug

Output file
.\Debug/I90Controller.exe.

 

by: pgnatyukPosted on 2009-10-19 at 08:55:36ID: 25606374

Have you tried to add this libc to the ignore libraries list?

 

by: Gabriela1Posted on 2009-10-19 at 09:09:01ID: 25606478

Have you tried to add this libc to the ignore libraries list?

I did it and now it is ok.

Maybe the new library you're adding is compiled using the static CRT. In that case you'll have to change your linker settings to that also, or you'll get linker errors.

It is compiled with multi threadeddebug ; so it is not  Multithreaded Debug DLL.

Now I have a linker error

Torch3.lib(general.obj) : error LNK2019: unresolved external symbol __iob referenced in function "void __cdecl Torch::error(char const *,...)" (?error@Torch@@YAXPBDZZ)
1>.\Debug/I90Controller.exe : fatal error LNK1120: 1 unresolved externals

 

by: pgnatyukPosted on 2009-10-19 at 09:17:56ID: 25606558

It's good.
"Torch" is not from the C Run-Time library.
:)

 

by: Gabriela1Posted on 2009-10-19 at 09:19:51ID: 25606571

Should I close this question and open another one about this?

 

by: pgnatyukPosted on 2009-10-19 at 09:22:29ID: 25606594

 

by: jkrPosted on 2009-10-19 at 09:24:02ID: 25606606

>>"Torch" is not from the C Run-Time library.

But '__iob' is - ignoring the reference to 'libc.lib' causes this error. '__iob' also is not listed in the errors in that othre Q.

 

by: pgnatyukPosted on 2009-10-19 at 09:24:59ID: 25606613

Torch3.lib - what is this? do you have a source code maybe?
Sorry, I've never seen RL Toolbox.

 

by: Gabriela1Posted on 2009-10-19 at 09:29:25ID: 25606655

You already have it:
http://www.experts-exchange.com/Programming/Editors_IDEs/C_CPP_CS/Visual_CPP/Q_24819659.html

it was exactly about the touch

Yes..but nobody answered me on that question so that is why I opened another one. I did what they told me to do in that question and nothing changed...I still have the error.

 

by: Gabriela1Posted on 2009-10-19 at 09:30:12ID: 25606662

Torch3.lib - what is this? do you have a source code maybe?


I don't have any sourrce code only the .lib . And people told me to added to my project and that is what I did.

 

by: pgnatyukPosted on 2009-10-19 at 09:31:29ID: 25606671

ok.
You don't call any error method in your code?

 

by: Gabriela1Posted on 2009-10-19 at 09:31:30ID: 25606672

>>"Torch" is not from the C Run-Time library.

But '__iob' is - ignoring the reference to 'libc.lib' causes this error. '__iob' also is not listed in the errors in that othre Q.


so I have this error because i am ingoring the libc.lib ? What can I do if this is the case?

 

by: pgnatyukPosted on 2009-10-19 at 09:32:13ID: 25606677

 

by: pgnatyukPosted on 2009-10-19 at 09:34:47ID: 25606698

The problematic function is declared as:
void error(const char* msg, ...);

 

by: jkrPosted on 2009-10-19 at 09:35:59ID: 25606706

OK, this is a wild idea, but what happens if you add the following to your code?

#include <stdio.h>
 
char _bufin[_INTERNAL_BUFSIZ];
/*
 * FILE descriptors; preset for stdin/out/err (note that the __tmpnum field
 * is not initialized)
 */
FILE _iob[_IOB_ENTRIES] = {
        /* _ptr, _cnt, _base,  _flag, _file, _charbuf, _bufsiz */
 
        /* stdin (_iob[0]) */
 
        { _bufin, 0, _bufin, _IOREAD | _IOYOURBUF, 0, 0, _INTERNAL_BUFSIZ },
 
        /* stdout (_iob[1]) */
 
        { NULL, 0, NULL, _IOWRT, 1, 0, 0 },
 
        /* stderr (_iob[3]) */
 
        { NULL, 0, NULL, _IOWRT, 2, 0, 0 },
 
};

                                              
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:

Select allOpen in new window

 

by: Gabriela1Posted on 2009-10-19 at 09:37:28ID: 25606717

I think this is the source code:
http://en.pudn.com/downloads115/sourcecode/math/detail484646_en.html


I have it already sorry about that. I already build the RL toolbox library.

 

by: Gabriela1Posted on 2009-10-19 at 09:38:15ID: 25606723

OK, this is a wild idea, but what happens if you add the following to your code?

Where chould I added? in the I90Controller.cpp?

 

by: pgnatyukPosted on 2009-10-19 at 09:38:35ID: 25606725

It will be very bad if we add this function to your code?
just
void error(const char* msg, ...)
{}
somewhere in a cpp-file.

 

by: jkrPosted on 2009-10-19 at 09:39:57ID: 25606739

>>Where chould I added? in the I90Controller.cpp?

In any of your source files, which one does not really matter.

 

by: pgnatyukPosted on 2009-10-19 at 09:42:17ID: 25606750

really does not matter

 

by: pgnatyukPosted on 2009-10-19 at 09:43:41ID: 25606758

I'm late with all my comments here :)
So I'm leaving

 

by: Gabriela1Posted on 2009-10-19 at 09:43:55ID: 25606761

It will be very bad if we add this function to your code?
just
void error(const char* msg, ...)
{}
somewhere in a cpp-file.

I have the same error.

 

by: Gabriela1Posted on 2009-10-19 at 09:45:54ID: 25606776

OK, this is a wild idea, but what happens if you add the following to your code?
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
 #include <stdio.h>
 
char _bufin[_INTERNAL_BUFSIZ];
/*
 * FILE descriptors; preset for stdin/out/err (note that the __tmpnum field
 * is not initialized)
 */
FILE _iob[_IOB_ENTRIES] = {
        /* _ptr, _cnt, _base,  _flag, _file, _charbuf, _bufsiz */
 
        /* stdin (_iob[0]) */
 
        { _bufin, 0, _bufin, _IOREAD | _IOYOURBUF, 0, 0, _INTERNAL_BUFSIZ },
 
        /* stdout (_iob[1]) */
 
        { NULL, 0, NULL, _IOWRT, 1, 0, 0 },
 
        /* stderr (_iob[3]) */
 
 
I did it but I have error

rror C2065: '_INTERNAL_BUFSIZ' : undeclared identifier
1>c:\documents and settings\ogvalent\desktop\i90controller_v2\i90controller_dri\rl_toolbox_windows_source_20b\rl_toolbox_windows_source_20b\caction.cpp(51) : error C2065: '_IOYOURBUF' : undeclared identifier
1>c:\documents and settings\ogvalent\desktop\i90controller_v2\i90controller_dri\rl_toolbox_windows_source_20b\rl_toolbox_windows_source_20b\caction.cpp(51) : error C2065: '_INTERNAL_BUFSIZ' : undeclared identifier
1>Build log was saved at "file://c:\Documents and Settings\ogvalent\Desktop\I90Controller_V2\I90Controller_DRI\Debug\BuildLog.htm"

 

by: pgnatyukPosted on 2009-10-19 at 09:54:50ID: 25606848

Please stop. Please remove all changes you did in the code and remove libc from the ignore library list.
Probably you have VS 2008 Express Edition.
I think, you just need to install this SDK:
http://msdn.microsoft.com/en-us/windows/bb980924.aspx


 

by: pgnatyukPosted on 2009-10-19 at 09:59:25ID: 25606897

Have you tried to add libcmt.lib to the dependecies? I mean "Additional Libraries" in the project settings.

 

by: Gabriela1Posted on 2009-10-19 at 11:04:25ID: 25607500

Please stop. Please remove all changes you did in the code and remove libc from the ignore library list.
Probably you have VS 2008 Express Edition.
I think, you just need to install this SDK:


I have professional edition. Which one i should install? It is for wind 7, and vist I have win xp.

 

by: Gabriela1Posted on 2009-10-19 at 11:07:40ID: 25607539

Have you tried to add libcmt.lib to the dependecies? I mean "Additional Libraries" in the project settings.


I did and have these errors

1>msvcrtd.lib(MSVCR90D.dll) : error LNK2005: __invalid_parameter already defined in libcmt.lib(invarg.obj)
1>msvcrtd.lib(MSVCR90D.dll) : error LNK2005: "public: virtual __thiscall std::exception::~exception(void)" (??1exception@std@@UAE@XZ) already defined in libcmt.lib(stdexcpt.obj)
1>msvcrtd.lib(MSVCR90D.dll) : error LNK2005: "public: __thiscall std::exception::exception(void)" (??0exception@std@@QAE@XZ) already defined in libcmt.lib(stdexcpt.obj)
1>msvcrtd.lib(MSVCR90D.dll) : error LNK2005: "public: __thiscall std::exception::exception(class std::exception const &)" (??0exception@std@@QAE@ABV01@@Z) already defined in libcmt.lib(stdexcpt.obj)
1>msvcrtd.lib(MSVCR90D.dll) : error LNK2005: "public: __thiscall std::exception::exception(char const * const &)" (??0exception@std@@QAE@ABQBD@Z) already defined in libcmt.lib(stdexcpt.obj)
1>msvcrtd.lib(MSVCR90D.dll) : error LNK2005: _atoi already defined in libcmt.lib(atox.obj)
1>msvcrtd.lib(MSVCR90D.dll) : error LNK2005: _isspace already defined in libcmt.lib(_ctype.obj)
1>msvcrtd.lib(ti_inst.obj) : error LNK2005: "private: __thiscall type_info::type_info(class type_info const &)" (??0type_info@@AAE@ABV0@@Z) already defined in libcmt.lib(typinfo.obj)
1>msvcrtd.lib(ti_inst.obj) : error LNK2005: "private: class type_info & __thiscall type_info::operator=(class type_info const &)" (??4type_info@@AAEAAV0@ABV0@@Z) already defined in libcmt.lib(typinfo.obj)
1>msvcrtd.lib(MSVCR90D.dll) : error LNK2005: __setmbcp already defined in libcmt.lib(mbctype.obj)
1>libcmt.lib(_file.obj) : error LNK2005: ___iob_func already defined in msvcrtd.lib(MSVCR90D.dll)
1>libcmt.lib(fflush.obj) : error LNK2005: _fflush already defined in msvcrtd.lib(MSVCR90D.dll)
1>LINK : warning LNK4098: defaultlib 'msvcrtd.lib' conflicts with use of other libs; use /NODEFAULTLIB:library
1>.\Debug/I90Controller.exe : fatal error LNK1169: one or more multiply defined symbols found
1>Build log was saved at "file://c:\Documents and Settings\ogvalent\Desktop\I90Controller_V2\I90Controller_DRI\Debug\BuildLog.htm"
1>I90Controller - 13 error(s), 1 warning(s)

 

by: pgnatyukPosted on 2009-10-19 at 12:18:17ID: 25608102

So try to ignore msvcrtd library - this is the debug version of the C Run-Time library. Next - ignore libcmt.

 

by: Gabriela1Posted on 2009-10-19 at 12:35:10ID: 25608234

So try to ignore msvcrtd library - this is the debug version of the C Run-Time library. Next - ignore libcmt.


now I have 1403 errors.

Torch3.lib(DiskXFile.obj)error LNK2019: unresolved external symbol __pclose referenced in function "public: virtual __thiscall Torch::DiskXFile::~DiskXFile(void)" (??1DiskXFile@Torch@@UAE@XZ)..

similar to this one

 

by: pgnatyukPosted on 2009-10-19 at 14:10:50ID: 25609096

I think it is easier to find a fixed version of this RX Toolbox library or install VS 6 or 2003 then to fix all errors you have.
Can you go back and recover a situation with 1-2 compilation errors?

 

by: Gabriela1Posted on 2009-10-19 at 14:21:58ID: 25609172

I think it is easier to find a fixed version of this RX Toolbox library or install VS 6 or 2003 then to fix all errors you have.

I have only this version..so i do not know where I can find another one. I have to work with VS 2008, because I have my whole project that is working only with VS 2008.

Can you go back and recover a situation with 1-2 compilation errors?

Yes, Idid that and now I have ignored the libc.lib. And I have this error

1>Torch3.lib(general.obj) : error LNK2019: unresolved external symbol __iob referenced in function "void __cdecl Torch::error(char const *,...)" (?error@Torch@@YAXPBDZZ)
1>.\Debug/I90Controller.exe : fatal error LNK1120: 1 unresolved externals

This RL Toolbox I builf it and there is an example there. After building it I tried the example and it worked. I checked their settings in Properties - C++ and Linker settings, and they are ignoring libc.lib. I have the same settings in my own project but is still not working. Should I build also torch3.lib? and if so...how whould I do it?

20120131-EE-VQP-002

3 Ways to Join

30-Day Free Trial

The Experts

98% positive feedback on 31,087 answers since March 2000. angeliii is a Microsoft Most Valuable Professional for his work with MS SQL Server & Develoment.

He has also proven his knowledge of Visual Basic Programming, PHP Scripting and Oracle Databases.

The Experts

97% positive feedback on 10,752 answers since July 2000. lrmoore has more than 18 years experience in the networking industry.

The six-time Mircosoft MVPs specialties include firewalls, virtual private networking, and network management.

Testimonials

"...and excellent source for support... Kind of like having your very own IT dept." Electriciansnet

Testimonials

"I was apprehensive at signing up at first. However... it has already made my life as an IT administrator much easier." JaCrews

Testimonials

"WOW! You guys have great, active, and knowledgeable people on here." moore50

Business Clients

Business Clients

In the Press

"If you’ve got a question... Experts Exchange can supply an answer.”

In the Press

"...an invaluable aid for both IT professionals and those who require tech support."

In the Press

"where IT professionals provide quick answers on just about any topic"

Business Account Plans

Loading Advertisement...