473,408 Members | 1,973 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,408 software developers and data experts.

HELP for error LNK 2005

Hi i am working on a graphical user interface deisgn programme. when i compile the file i i get the following output with the mentioned errors:

1>------ Rebuild All started: Project: guiq, Configuration: Debug Win32 ------
1>Deleting intermediate and output files for project 'guiq', configuration 'Debug|Win32'
1>Compiling...
1>stdafx.cpp
1>Compiling...
1>Custom Message.cpp
1>guiq.cpp
1>Generating Code...
1>Compiling...
1>sip.cpp
1>Compiling managed resources...
1>Read in 0 resources from "d:\Profiles\srekhi\My Documents\Visual Studio 2005\Projects\guiq\guiq\sip.resx"
1>Writing resource file... Done.
1>Read in 0 resources from "d:\Profiles\srekhi\My Documents\Visual Studio 2005\Projects\guiq\guiq\Custom Message.resx"
1>Writing resource file... Done.
1>Compiling resources...
1>Linking...
1>Custom Message.obj : MSIL .netmodule or module compiled with /GL found; restarting link with /LTCG; add /LTCG to the link command line to improve linker performance
1>LINK : warning LNK4075: ignoring '/INCREMENTAL' due to '/LTCG' specification
1>guiq.obj : error LNK2005: "struct HINSTANCE__ * hInst" (?hInst@@3PAUHINSTANCE__@@A) already defined in guiq.obj
1>guiq.obj : error LNK2005: "wchar_t * szTitle" (?szTitle@@3PA_WA) already defined in guiq.obj
1>guiq.obj : error LNK2005: "wchar_t * szWindowClass" (?szWindowClass@@3PA_WA) already defined in guiq.obj
1>guiq.obj : error LNK2005: "int __stdcall About(struct HWND__ *,unsigned int,unsigned int,long)" (?About@@YGHPAUHWND__@@IIJ@Z) already defined in guiq.obj
1>guiq.obj : error LNK2005: "long __stdcall WndProc(struct HWND__ *,unsigned int,unsigned int,long)" (?WndProc@@YGJPAUHWND__@@IIJ@Z) already defined in guiq.obj
1>guiq.obj : error LNK2005: "int __cdecl InitInstance(struct HINSTANCE__ *,int)" (?InitInstance@@YAHPAUHINSTANCE__@@H@Z) already defined in guiq.obj
1>guiq.obj : error LNK2005: "unsigned short __cdecl MyRegisterClass(struct HINSTANCE__ *)" (?MyRegisterClass@@YAGPAUHINSTANCE__@@@Z) already defined in guiq.obj
1>guiq.obj : error LNK2005: _wWinMain@16 already defined in guiq.obj
1>LINK : warning LNK4098: defaultlib 'MSVCRTD' conflicts with use of other libs; use /NODEFAULTLIB:library
1>d:\Profiles\srekhi\Desktop\FTP\Debug\guiq.exe : fatal error LNK1169: one or more multiply defined symbols found
1>Build log was saved at "file://d:\Profiles\srekhi\My Documents\Visual Studio 2005\Projects\guiq\guiq\Debug\BuildLog.htm"
1>guiq - 9 error(s), 2 warning(s)
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========


i am using microsoft visual studio 2005 standard edition and language is C++

Could anyone please help me by guiding me on how to remove these errors please.

thanks

Sahil
Sep 7 '07 #1
1 5289
weaknessforcats
9,208 Expert Mod 8TB
You have a lot of redefinition errors:
1>guiq.obj : error LNK2005: "struct HINSTANCE__ * hInst" (?hInst@@3PAUHINSTANCE__@@A) already defined in guiq.obj
for example. Do you have multiple global variables of the same name? Read this.

The LNK4075 is caused by Custom Message.cpp which refers to MSIL which leads me to believe this is Managed C++ and you are using the /clr option and may be caused by the LNK2005 errors.

Exactly what kind of project have you set up??
Sep 7 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

8
by: MattP | last post by:
Ok, with the help of some examples found on the web and some minor modifications on our own, we have a simple and working encrypt and decrypt solution. It runs as a service, watches for files with...
3
by: ChrisWinterscheid | last post by:
We are running DB2 8.1 on AIX 5.2. DB2level shows: DB21085I Instance "db2inst1" uses "32" bits and DB2 code release "SQL08016" with level identifier "02070106". Informational tokens are "DB2...
5
by: NG | last post by:
Hi, We are having DB2-V7.2 DB on AIX 5.2 machine. Recently we upgraded our system to fixpack 13 and activated activate AIX asynchronous IO function. Our DB is going to crash recovery with...
14
by: Marcus | last post by:
I have a function that simply returns TRUE if it can connect to a particular Sql Server 2005 express, or FALSE if it cannot. I am getting some strange error codes returned when the computer that...
7
by: rn5a | last post by:
This is the second time I am asking this question in this newsgroup since I haven't got a solution or response from anyone in my previous post & I need to resolve this issue desperately. Sorry for...
1
by: Brad Isaacs | last post by:
I am working with ASP.NET 2.0 and using an SQL Server 2000 database. I am using Visual Studio 2005 and developing on my Local machine. I am working with Login controls ASP.Configuration, I...
4
by: Brad Isaacs | last post by:
I am working with ASP.NET 2.0 and using an SQL Server 2000 database. I am using Visual Studio 2005 and developing on my Local machine. I am working with Login controls ASP.Configuration, I...
1
by: JavaNme | last post by:
I need someone to debug the following errors for me, so that i can run the program. 1>------ Build started: Project: TheBankProject, Configuration: Debug Win32 ------ 1>Compiling... 1>BANK.cpp...
0
by: aboutjav.com | last post by:
Hi, I need some help. I am getting this error after I complete the asp.net register control and click on the continue button. It crashed when it tries to get it calls this Profile property ...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.