Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1000
  • Last Modified:

Error LNK2005: _DllMain@12 already defined


I'm trying to add a dialog box to an existing dl that doesn't have any. When I do, I get "error LNK2005: _DllMain@12 already defined". I've read that I need to delete the existing DLLMain in my project to get rid of the error. After deleting it, I get error "LNK1149: output filename matches input filename...."

How to I get this to work?
0
apostrophe27
Asked:
apostrophe27
1 Solution
 
Subrat (C++ windows/Linux)Software EngineerCommented:
If ur using MFC and CRT functions, then plz have a look on following link.
http://support.microsoft.com/kb/148652
0
 
sureshmunugotiCommented:
To get resolve this linker error, use the #pragma comment(lib,"YourLibfile.lib")
or you need to change the out put path of you library.
0
 
apostrophe27Author Commented:
I started a new dll project, added my existing code to it, and it works now. I don't know what's different from my original project.

Thanks for trying to help me.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now