Link to home
Start Free TrialLog in
Avatar of ChiliPequin
ChiliPequin

asked on

Fatal Error LNK1181: cannot open file mfc30.lib

Hi Experts,

I get this error when I build an MFC application in release mode at a couple of PC's. At these machine, I get a clean build in debug mode.  On some other PC's where this application resides, I don't even have the mfc30.dll, yet the build in release mode is clean.  How can I avoid this error?  I am using Visual Studio 6.0 C++ on Windows XP.

Thanks in advance.
ASKER CERTIFIED SOLUTION
Avatar of tampnic
tampnic
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ChiliPequin
ChiliPequin

ASKER

Hi Experts,

Thank you very much for your fast response.

I have the Professional version installed.  
I copy the same project from the machine that works to this machine.
I use VC++6, so I don't think it use MFC30.

I do suspect that one of the third party controls I use built under the old version MFC30.LIB.  There are a few of these controls. The application is built clean in debug mode, however.  

I will update as soon as I find out.



SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Hi sarabande,

Thanks so much for your advice.  I will download depends.exe and try to find out if there is a component that uses mfc30.lib.  What's strange is that at one of my PC, I do not have mfc30.lib nor mfc30.dll, yet the same application is built clean and run fine in both debug and release mode.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Hi Zoppo,

The third-party controls I use are gtmask32, gtdate32, gtnum32.  I have downloaded the dependency walker program and run it on the PC that does not have the problem.  I do not see any component using mfc30.  I try to run it on the PC with problem using the debug dll, I do not see any component using mfc30.  It seems like the dependency walker only shows the DLL'S.  It does not show any LIB file.  I am going to deinstall Visual Studio and reinstall it.

Thanks.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Hi Sarabande,

Thanks so much for your advice.  You are right, I de-install VS then re-install.  But the problem still persists.  I think I know the lib files that cause this error.  When I replace these lib files with the their debug version in the link tab, the link error mfc30.lib is gone, but I now get the warning LNK4098 for the mfc42d lib files.  I run depends.exe to check the suspected lib files, but I have not found any reference to MFC30.DLL.  The only thing I notice is that these DLL's have only MFC32U.DLL and not MFC32.DLL.  I will update as soon as I find anything new.
Sorry for the typo.  I mean these DLL's have only MFC42U.DLL and not MFC42.DLL.
Hi experts,

Thank you all for your advice on this error.  Your opinion has helped me learned a lot.  I use the workaround on the PC with problem (use the debug lib of the third party component to buid the release with warning) for now.  

Your help is greatly appreciated.