473,385 Members | 1,838 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

C++ debug compiler errors

I am trying to compile my C++ programs in debug mode in Visual NET 2003 and keep getting the following message
fatal error LNK1104: cannot open file 'mfc70d.lib
I cannot find this program anywhere in my Windows 2003 Server operating system. Also, I cannot find MFC42D.DLL anywhere in the system. How can I test in debug mode without it? What is causing these errors and how do I get around it
Dave Uphof

Nov 17 '05 #1
5 9257
Dave wrote:
I am trying to compile my C++ programs in debug mode in Visual NET 2003 and keep getting the following message:
fatal error LNK1104: cannot open file 'mfc70d.lib'
I cannot find this program anywhere in my Windows 2003 Server operating system. Also, I cannot find MFC42D.DLL anywhere in the system. How can I test in debug mode without it? What is causing these errors and how do I get around it?
Dave Uphoff


Was this program initially compiled using VC++7.0? You say you're using
..NET 2003 so that means it should be linking with mfc71d.lib. If you
were using VC++7.0 then trying to link with mc70d.lib makes sense. If
you're using 7.1 then goto the project settings->linker->input and look
for the file mfc70.lib and change it to mfc71.lib.

--
sashan
http://www.cs.auckland.ac.nz/~sgov008/

Nov 17 '05 #2
Sashan
Thanks for your reply. My program was originally compiled with Visual C++ 6.0, then 7.0 with NET 2002 and now 7.1 with NET 2003. I don't see any reference to mfc70.lib in the Input section for the linker properties. How do I change something I can't find? Can I just add mfc71.lib to my list of linker inputs? For some reason the compiler thinks I am compiling with 7.0 when I am actually using 7.1.
Dave
Nov 17 '05 #3
Dave wrote:
Sashan;
Thanks for your reply. My program was originally compiled with Visual C++ 6.0, then 7.0 with NET 2002 and now 7.1 with NET 2003. I don't see any reference to mfc70.lib in the Input section for the linker properties. How do I change something I can't find? Can I just add mfc71.lib to my list of linker inputs? For some reason the compiler thinks I am compiling with 7.0 when I am actually using 7.1.
Dave


Well I'm confused as well. I don't think adding mfc71d.lib to the list
of inputs will help though, since the linker will still look for
mfc70d.lib. Check the command line passed to the linker (project
settings->linker->command line). Maybe mfc70d.lib is mentioned there.

--
sashan
http://www.cs.auckland.ac.nz/~sgov008/

Nov 17 '05 #4


----- Jeff Partch [MVP] wrote: ----

[CUT
I'm confused by the overall issue of mismatched versions as well, but Afx.
uses #pragma comment(lib, "") to embed the appropriate library search recor
in the *.obj


...And I think this will get you more confused:
I have the same problem and never installed .NET 2002 but only .NET 2003. I open afx.h and found this
#ifdef _DEBU
#pragma comment(lib, "mfc71d.lib"
#pragma comment(lib, "mfcs71d.lib"
#els
#pragma comment(lib, "mfc71.lib"
#pragma comment(lib, "mfcs71.lib"
#endi

Now I ask you: why does VC7 try to compile with mfc70.lib? I searched my disk for a file containing mfc70.lib and result in a "0 files found" message.
Regedit (just for a try) return no key/data/value on an mfc70 searc
Maybe something wrong in the .net 2003 italian version
My job is stopped for this reason and i've patched copying and renaming the mfc71.lib into mfc70.lib and things gone right but i don't like this
Thanks for attentio

ZaZy - D.P.E. Development Team
Nov 17 '05 #5
On Wed, 5 May 2004 03:26:06 -0700, "ZaZy"
<an*******@discussions.microsoft.com> wrote:
I have the same problem and never installed .NET 2002 but only .NET 2003. I open afx.h and found this:
#ifdef _DEBUG
#pragma comment(lib, "mfc71d.lib")
#pragma comment(lib, "mfcs71d.lib")
#else
#pragma comment(lib, "mfc71.lib")
#pragma comment(lib, "mfcs71.lib")
#endif

Now I ask you: why does VC7 try to compile with mfc70.lib? I searched my
disk for a file containing mfc70.lib and result in a "0 files found"
message.
Regedit (just for a try) return no key/data/value on an mfc70 search
Maybe something wrong in the .net 2003 italian version?
My job is stopped for this reason and i've patched copying and renaming
the mfc71.lib into mfc70.lib and things gone right but i don't like
this!


You included in your project an obj file or a lib file which was
compiled with .NET 2002. Object files contain records that tell the
linker which files to look for.

Jeff Bean
CWC Software
Nov 17 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Christian Graf | last post by:
Hi, (sorry if this post might occur two times, but I can't find my first one from yesterday evening in this group) I have a bigger VC++6.0 project which is successfully compiled into a DLL. I...
1
by: Christian Graf | last post by:
Hi, I have a bigger VC++6.0 project which is successfully compiled into a DLL. It's compiled with full conformance with the ANSI C standard (symbol __STDC__). I had to combine this code with my...
7
by: Techno Learner | last post by:
Sorry for the lame question but, what's the difference between Debug and Release versions?
4
by: emma middlebrook | last post by:
I have a question regarding asserting ... here's some code: string GetAssertMessage() { ... prepare a message string and return it... } void SomeMethod() { ...
3
by: songie D | last post by:
I, like I'm sure a lot of people, make some modifications, then press F5 to do a build and run in one go, clicking 'yes' to Do you want to build first. Sometimes, there are warnings but not errors....
1
by: Jonathan Turkanis | last post by:
Dear All, My latest library leads to a lot of internal errors and compiler limit errors (C1001, C1055, C1067) when compiled on VC7.1 with /Zi or /ZI. The library compiles on GCC 3.4.1, Comeau...
5
by: David++ | last post by:
Hi there, I have built a DLL in Visual C++ 6. When I build the DLL it builds fine for the debug version of the DLL (and this DLL works fine), however, I seem unable to build a Release version of...
1
by: adhingra | last post by:
I stumbled upon something which does not make sense "Debug class methods are not automatically suppressed by the managed c++ compiler when the project is build in release mode" Create a a...
7
by: tommaso.gastaldi | last post by:
It would be useful, sometimes, when debugging, to disable all the try /catch one has in the program (clearly not commenting them out). Any info or hint on that? -tom
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.