Solved

Error LNK2005: _DllMain@12 already defined

Posted on 2010-09-07
3
987 Views
Last Modified: 2013-12-14

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
Comment
Question by:apostrophe27
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 9

Expert Comment

by:Subrat (C++ windows/Linux)
ID: 33624048
If ur using MFC and CRT functions, then plz have a look on following link.
http://support.microsoft.com/kb/148652
0
 
LVL 1

Expert Comment

by:sureshmunugoti
ID: 33633843
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
 

Accepted Solution

by:
apostrophe27 earned 0 total points
ID: 33666117
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

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Programmer's Notepad is, one of the best free text editing tools available, simply because the developers appear to have second-guessed every weird problem or issue a programmer is likely to run into. One of these problems is selecting and deleti…
Here is a helpful source code for C++ Builder programmers that allows you to manage and manipulate HTML content from C++ code, while also handling HTML events like onclick, onmouseover, ... Some objects defined and used in this source include: …
THe viewer will learn how to use NetBeans IDE 8.0 for Windows to perform CRUD operations on a MySql database.
The viewer will learn how to synchronize PHP projects with a remote server in NetBeans IDE 8.0 for Windows.

751 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question