Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

LINK : fatal error LNK1104: cannot open file "MyLib.lib"

Status
Not open for further replies.

Mthales

Technical User
Feb 27, 2004
1,181
GB
Hi there,
I am probably making an obvious mistake here but here goes.

I am trying to create a DLL. I used the MFC dll application project wizard and have added in my code. When I come to build it I get LINK : fatal error LNK1104: cannot open file "MyLib.lib" where MyLib is the name of the dll I'm trying to make.

The MSDN info for the error number doesn't say anything that seems useful to me cause it's talking about adding in other librarys not making a new on so I'm very confused.

Could anyone please offer me any help or advice on this.
Thanks
M
 
OK with the help of a much wiser collegue I found the solution to this problem.
I was overriding the name of the lib from my source by using a:
#ifndef _DEBUG
#pragma comment(lib, "MyLib.lib")
#else
#pragma comment(lib, "MyLibD.lib")
#endif

but that is not what my project settings were telling it to make. OOps!

M
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top