?
Solved

Error LNK2005: _DllMain@12 already defined

Posted on 2010-09-07
3
Medium Priority
?
990 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

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: …
Jaspersoft Studio is a plugin for Eclipse that lets you create reports from a datasource.  In this article, we'll go over creating a report from a default template and setting up a datasource that connects to your database.
The viewer will learn how to use NetBeans IDE 8.0 for Windows to connect to a MySQL database. Open Services Panel: Create a new connection using New Connection Wizard: Create a test database called eetutorial: Create a new test tabel called ee…
The viewer will learn how to use and create keystrokes in Netbeans IDE 8.0 for Windows.
Suggested Courses

719 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