By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,725 Members | 1,209 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,725 IT Pros & Developers. It's quick & easy.

MFC42D.LIB Linker Error

P: n/a
I am in the process of converting a Visual C++ 6.0 project to Visual Studio
2005. The conversion is almost complete, but in the linking phase, I get
the error:

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

It seems to be looking for a file from Visual C++ 6.0. I have checked the
project settings and can't find any reference to "mfc42d.lib".

Marathoner
Jan 9 '07 #1
Share this Question
Share on Google+
5 Replies


P: n/a
Some '#pragma comment(lib, "'mfc42d.lib")' in source code?
--
Cholo Lennon
Bs.As.
ARG
"marathoner" <ra******@msn.com.invalidwrote in message
news:Of**************@TK2MSFTNGP02.phx.gbl...
I am in the process of converting a Visual C++ 6.0 project to Visual
Studio
2005. The conversion is almost complete, but in the linking phase, I get
the error:

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

It seems to be looking for a file from Visual C++ 6.0. I have checked the
project settings and can't find any reference to "mfc42d.lib".

Marathoner


Jan 9 '07 #2

P: n/a
I didn't find any reference to mfc42d.lib in the source code.

Marathoner
"Cholo Lennon" <ch*********@hotmail.comwrote in message
news:e1**************@TK2MSFTNGP06.phx.gbl...
Some '#pragma comment(lib, "'mfc42d.lib")' in source code?
--
Cholo Lennon
Bs.As.
ARG
"marathoner" <ra******@msn.com.invalidwrote in message
news:Of**************@TK2MSFTNGP02.phx.gbl...
>I am in the process of converting a Visual C++ 6.0 project to Visual
Studio
>2005. The conversion is almost complete, but in the linking phase, I get
the error:

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

It seems to be looking for a file from Visual C++ 6.0. I have checked
the
project settings and can't find any reference to "mfc42d.lib".

Marathoner



Jan 9 '07 #3

P: n/a
I wasn't able to find the setting to exclude the old MFC libraries from
linking. Can you tell me how to find this option?

Marathoner
"Joe McCollough" <Jo***********@discussions.microsoft.comwrote in message
news:57**********************************@microsof t.com...
>I had a similar problem when converting from VS 2003 to VS 2005. I had to
set the project properties to exclude the old mfc library and include the
correct one.

"marathoner" wrote:
>I didn't find any reference to mfc42d.lib in the source code.

Marathoner
"Cholo Lennon" <ch*********@hotmail.comwrote in message
news:e1**************@TK2MSFTNGP06.phx.gbl...
Some '#pragma comment(lib, "'mfc42d.lib")' in source code?
--
Cholo Lennon
Bs.As.
ARG
"marathoner" <ra******@msn.com.invalidwrote in message
news:Of**************@TK2MSFTNGP02.phx.gbl...
I am in the process of converting a Visual C++ 6.0 project to Visual
Studio
2005. The conversion is almost complete, but in the linking phase, I
get
the error:

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

It seems to be looking for a file from Visual C++ 6.0. I have checked
the
project settings and can't find any reference to "mfc42d.lib".

Marathoner




Jan 9 '07 #4

P: n/a
May be you are linking your program with some library compiled with VC6

--
Cholo Lennon
Bs.As.
ARG

"marathoner" <ra******@msn.com.invalidwrote in message
news:Oz*************@TK2MSFTNGP03.phx.gbl...
I didn't find any reference to mfc42d.lib in the source code.

Marathoner
"Cholo Lennon" <ch*********@hotmail.comwrote in message
news:e1**************@TK2MSFTNGP06.phx.gbl...
Some '#pragma comment(lib, "'mfc42d.lib")' in source code?
--
Cholo Lennon
Bs.As.
ARG
"marathoner" <ra******@msn.com.invalidwrote in message
news:Of**************@TK2MSFTNGP02.phx.gbl...
I am in the process of converting a Visual C++ 6.0 project to Visual
Studio
2005. The conversion is almost complete, but in the linking phase, I
get
the error:

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

It seems to be looking for a file from Visual C++ 6.0. I have checked
the
project settings and can't find any reference to "mfc42d.lib".

Marathoner



Jan 9 '07 #5

P: n/a
Thanks, that solved the problem.

Marathoner
"Joe McCollough" <Jo***********@discussions.microsoft.comwrote in message
news:EA**********************************@microsof t.com...
Right click on the project in solution explorer, and select Properties.
In
the Properties dialog, select Configuration Properties - Linker - Input.
Add
the MFC 8 library to "Additional Dependencies" and add the MFC 4.2 library
to
Ignore Specific Library.

"marathoner" wrote:
>I wasn't able to find the setting to exclude the old MFC libraries from
linking. Can you tell me how to find this option?

Marathoner
"Joe McCollough" <Jo***********@discussions.microsoft.comwrote in
message
news:57**********************************@microso ft.com...
>I had a similar problem when converting from VS 2003 to VS 2005. I had
to
set the project properties to exclude the old mfc library and include
the
correct one.

"marathoner" wrote:

I didn't find any reference to mfc42d.lib in the source code.

Marathoner
"Cholo Lennon" <ch*********@hotmail.comwrote in message
news:e1**************@TK2MSFTNGP06.phx.gbl...
Some '#pragma comment(lib, "'mfc42d.lib")' in source code?
--
Cholo Lennon
Bs.As.
ARG
"marathoner" <ra******@msn.com.invalidwrote in message
news:Of**************@TK2MSFTNGP02.phx.gbl...
I am in the process of converting a Visual C++ 6.0 project to
Visual
Studio
2005. The conversion is almost complete, but in the linking phase,
I
get
the error:

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

It seems to be looking for a file from Visual C++ 6.0. I have
checked
the
project settings and can't find any reference to "mfc42d.lib".

Marathoner





Jan 9 '07 #6

This discussion thread is closed

Replies have been disabled for this discussion.