libcimtd.lib not found  
Author Message
JohnRobbins





PostPosted: Visual C++ Express Edition, libcimtd.lib not found Top

I have managed to compile an earlier WTL based program built under VC6 to compile with Express but I have got the following linker errors.

LINK : fatal error LNK1104: cannot open file 'libcimtd.lib'

The application is multithreaded and I would like to be able to run it in debug mode. The code uses the new iostream library.

On the property pages, the runtime library is defined as "Multi-threaded Debug (/MTd)"

Should the Express installation have included libcimtd.lib And I am not sure why the linker is invoking libcmtd.lib.

Any help would be appreciated

John Robbins.



Visual Studio Express Editions21  
 
 
Jonathan Caves - MSFT





PostPosted: Visual C++ Express Edition, libcimtd.lib not found Top

libcmtd.lib is the static multithreaded debug C runtime library.

libcmitd.lib is the static multithreaded debug C++ old iostreams (iostream.h as opposed to iostream) library - this does library not exist in Visual C++ 8.0. I suspect that there might be a #pragma comment somewhere in your code that is causing the linker to pull in this library - either that or you are linking against an old static library that has a dependency on this file.



 
 
JohnRobbins





PostPosted: Visual C++ Express Edition, libcimtd.lib not found Top

Thanks for your response.

To try and simplify the problem I used the WTL wizard to generate a simple dialog box and then used the Cancel button code to try and invoke a fstream object thus

at the top of maindlg.h I added

#include <fstream>

using namespace std;

I modified OnCancel as follows

LRESULT OnCancel(WORD /*wNotifyCode*/, WORD wID, HWND /*hWndCtl*/, BOOL& /*bHandled*/)

{

// CloseDialog(wID);

ifstream ifs;

// ifs.open("C:\\Documents and Settings\\John\\My Documents\\Visual Studio 2005\\Projects\\CompilerSettings.txt");

return 0;

The result included the following linker errors

fstream_test.cpp

Linking...

Debug\fstream_test.exe : fatal error LNK1120: 5 unresolved externals


 
 
nobugz





PostPosted: Visual C++ Express Edition, libcimtd.lib not found Top

For some reason, your project is not linking msvcprtd.lib, the standard DLL import library for the STL classes. Project + properties, Linker, Input, click the Additional Dependencies box, then the '...' button and ensure the "Inherit from parent" checkbox is turned on.

To get the previous problem resolved, put "libcmtd.lib libcimtd.lib" in the Ignore Specific Library box.


 
 
JohnRobbins





PostPosted: Visual C++ Express Edition, libcimtd.lib not found Top

Hi,

Thanks for your response. The "Inherit from parent" was already turned on and I have put your suggested entries into the Ignore Specific Library but all to no avail - I still get the same error messages.

I tried adding #include <iostream> before the #include <ifstream> but that generated even more messages.

I did make a small console app to write to a file and it of course worked fine.

Any more suggestions before I give up I would really like to try and get the stream classes working in this type of application, though.

Thanks

John.


 
 
nobugz





PostPosted: Visual C++ Express Edition, libcimtd.lib not found Top




 
 
nobugz





PostPosted: Visual C++ Express Edition, libcimtd.lib not found Top

Got your project. I'm sorry to say that I got a clean compile. I had to download WTL, got it from here. I unzipped the archive into vc\wtl and added the vc\wtl\include path to my include folders.

Urm, now that I'm thinking about it, you need ATL to compile WTL. VC-Express doesn't come with ATL. Sorry, I needed that whack myself...


 
 
JohnRobbins





PostPosted: Visual C++ Express Edition, libcimtd.lib not found Top

Thanks for taking a look at the code.

The version I sent you had the lines in OnCancel that used fstream commented out as at the time I was even having a problem with the #include line at the top of the file.

Could you please if you have time uncomment the line - maybe make the referenced file something relevant to your system and see if the executable works.

I had included a path in the Addition Include Directories to include "C:\Program Files\Microsoft Platform SDK\Include\atl"

Thanks so much for your help

John Robbins


 
 
nobugz





PostPosted: Visual C++ Express Edition, libcimtd.lib not found Top

Removed the comments, still no problem. The version of ATL that comes with the Platform SDK is suitable for 64-bit Windows only. I'm afraid you'll have to move up to the retail version of VS2005 to do any WTL programming...



 
 
JohnRobbins





PostPosted: Visual C++ Express Edition, libcimtd.lib not found Top

Thanks for the quick response.

When you compiled and ran the application OK was that with Express or with one of the other IDEs

I started to use Express mainly because there was an article on CodeProject that had got Express working with WTL after changing a couple of lines of code concerning windows thunking. I don't think however the author had used any streams functions though.

The only reason I have been persevering with WTL is that I have quite a large data acquisition application with a lot of graphics that I would hate to have to do all over again.

But maybe I have to.

John.


 
 
nobugz





PostPosted: Visual C++ Express Edition, libcimtd.lib not found Top

I used VS2005 Professional. I couldn't run the app, some strange problem with the manifest and it can't find the CRT DLL. I didn't look into it too much...