Author Topic: LINK : fatal error LNK1104: cannot open file 'LIBC.lib'  (Read 15755 times)

Fenrir

  • Rogueliker
  • ***
  • Posts: 473
  • Karma: +1/-2
  • The Monstrous Wolf
    • View Profile
LINK : fatal error LNK1104: cannot open file 'LIBC.lib'
« on: July 23, 2010, 12:51:50 AM »
I setup PDCurses correctly in VC++ 2008, but I'm getting this error message.

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

I'll be damned if I know why this is happening. I don't think it's karma. Fenrir looks thoughtful for a minute. Well, there was that one time in Tijuana─ The great wolf glances around and grins sheepishly. Anyway, anyone know what to do about this off the top of your heads, or do I need to give more information?

corremn

  • Rogueliker
  • ***
  • Posts: 700
  • Karma: +0/-0
  • SewerJack Extraordinaire
    • View Profile
    • Demise RogueLike Games
Re: LINK : fatal error LNK1104: cannot open file 'LIBC.lib'
« Reply #1 on: July 23, 2010, 01:37:33 AM »
Visual C cant find the c library to link to.  

I would suggest to try and remove this from you linker settings. (properties/Linker/Input/aditional dependancies.
IIRC Visual C 9.0 will not have this library.  Should be linking to msvcrt.lib anyway.


Did you convert from a VC6 project per chance?
« Last Edit: July 23, 2010, 06:36:27 AM by corremn »
corremn's Roguelikes. To admit defeat is to blaspheme against the Emperor.  Warhammer 40000 the Roguelike

Fenrir

  • Rogueliker
  • ***
  • Posts: 473
  • Karma: +1/-2
  • The Monstrous Wolf
    • View Profile
Re: LINK : fatal error LNK1104: cannot open file 'LIBC.lib'
« Reply #2 on: July 23, 2010, 02:02:10 AM »
It isn't a conversion. The odd thing is that it compiled and linked fine before I added a class by right clicking on the "source" folder and clicking "Class..." in the "Add" menu; which is something I've never done.  I don't know why that would be a problem.

All that is in Additional Dependencies is "pdcurses.lib" as it should be.

corremn

  • Rogueliker
  • ***
  • Posts: 700
  • Karma: +0/-0
  • SewerJack Extraordinaire
    • View Profile
    • Demise RogueLike Games
Re: LINK : fatal error LNK1104: cannot open file 'LIBC.lib'
« Reply #3 on: July 23, 2010, 06:40:38 AM »
I dont know, Visual Studio should *not* be trying to find this lib.

Anyway start the project from scratch and see if it happens again.
corremn's Roguelikes. To admit defeat is to blaspheme against the Emperor.  Warhammer 40000 the Roguelike

Fenrir

  • Rogueliker
  • ***
  • Posts: 473
  • Karma: +1/-2
  • The Monstrous Wolf
    • View Profile
Re: LINK : fatal error LNK1104: cannot open file 'LIBC.lib'
« Reply #4 on: July 23, 2010, 01:14:10 PM »
Bah. It's gremlins. I still get the error.

All I did was set up PDCurses by setting Additional Dependencies to "pdcurses.lib," setting Additional Include Directories and Additional Library Directories to "C:\pdc25_vc_w32".

UPDATE:
I set the Additional Dependencies to "curses.lib" instead and it worked. I still don't know what just happened here, but, as long as it works─ Thanks for the help, corremn.

Etinarg

  • Rogueliker
  • ***
  • Posts: 424
  • Karma: +1/-1
  • Idea archivist and game tinkerer.
    • View Profile
    • Gedankenweber Blog (German)
Re: LINK : fatal error LNK1104: cannot open file 'LIBC.lib'
« Reply #5 on: July 23, 2010, 01:38:20 PM »
Is it possible that pdcurses.lib itself was compiled so that it depends on libc.lib, and the linker recognizes this dependency?

I haven't been using VC so far, so this is pure guessing.
« Last Edit: July 23, 2010, 01:45:08 PM by Hajo »

corremn

  • Rogueliker
  • ***
  • Posts: 700
  • Karma: +0/-0
  • SewerJack Extraordinaire
    • View Profile
    • Demise RogueLike Games
Re: LINK : fatal error LNK1104: cannot open file 'LIBC.lib'
« Reply #6 on: July 23, 2010, 02:16:45 PM »
Yeah it will be there somewhere.

maybe
Code: [Select]
#pragma comment(lib, "libc.lib") in the code.
corremn's Roguelikes. To admit defeat is to blaspheme against the Emperor.  Warhammer 40000 the Roguelike