Archived

This topic is now archived and is closed to further replies.

Night Elf

Visual Studio .NET 2003 problem

Recommended Posts

I had a DirectX program running using VS.NET 2002. I uninstalled it and installed VS.NET 2003. Now, when I try to build my program I get a linker error:
Battle fatal error LNK1104: can''t open file ''libci.lib''
I never referenced such file. Maybe something I''m using needs it, I don''t really know what that library is for. And it appears that it''s not included with VS.NET 2003. Have I forgotten to install something or should I do something else to make VS.NET 2003 build my app?

Share this post


Link to post
Share on other sites
first, you should try restarting your computer if you haven't already done so.

libci.lib is the library for the old iostream functions (used VC++ versions before 4.2). I think you should be linking to libcp.lib.

It's possible that the old iostream library was remove is VC++ .net 2003. However, the real problem may be in how you including your headers for standard c++ library functions.

if you do the following:
#include <iostream.h>
you're linking to the old library

the proper way is:
#include <iostream>
and here your linking to the new library



Link to MSDN article on C Runtime Libraries



digital radiation


[edited by - directrix on August 8, 2003 12:41:35 PM]

Share this post


Link to post
Share on other sites
quote:

first, you should try restarting your computer if you haven''t already done so.


I hadn''t restarted my computer. I did so, but it hasn''t helped.

quote:

libci.lib is the library for the old iostream functions (used VC++ versions before 4.2). I think you should be linking to libcp.lib.


The weird thing is that I''m not using any iostream functions...

quote:

It''s possible that the old iostream library was remove is VC++ .net 2003. However, the real problem may be in how you including your headers for standard c++ library functions.

if you do the following:
#include <iostream.h>
you''re linking to the old library

the proper way is:
#include <iostream>
and here your linking to the new library


I''m not including iostream. Any other ideas on what can be causing this problem?

I can compile the DirectX 9 samples as I could with the 2002 version. The only "strange" thing I''m using are some STL classes (string, array and list). And I''m including them like:

#include <string>

No ".h".

Share this post


Link to post
Share on other sites
In case someone else runs into this problem, I managed to solve it:

I went to the project''s Properties and under Linker\Input I added libci.lib to the "Ignore Specific Library" property.

I don''t know why I had to do this, I just know it solved the problem.

Share this post


Link to post
Share on other sites
I looked into the problem a bit more and I found a proper solution:

I changed #include <stdlib.h> for #include <cstdlib> and #include <stdio.h> for #include <cstdio>.

It appears that I was including some old libraries after all...

Share this post


Link to post
Share on other sites