473,382 Members | 1,380 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,382 software developers and data experts.

LNK2005 Error - Using more than one form

I keep getting that infernal LNK2005 error when I try to build my program. I
am using VS.NET 2003. Here is the error:

pm error LNK2005: "public: void __clrcall
pm::frmAddOrderItems::SayHello(class System::String __gc *)__gc "
(?SayHello@frmAddOrderItems@pm@@$$FQ$AAMXP$AAVStri ng@System@@@Z) already
defined in frmMain.obj

frmMain is my app's main form and frmAddOrderItems is a form I am displaying
via frmMain using frmAOI->ShowDialog(this)

frmAddOrderItem has a sample function prototyped as void SayHello(String*
strMSG);

and I have defined it later in the namespace.

The error arises when I go I call it in the constructor. this->SayHello("Hey
there!");

Any idea why this raises the LNK2005 error?

Nov 17 '05 #1
0 1136

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Florian Liefers | last post by:
"Hello World\n", i have the following problem: One of my headerfiles for a lib is including <vector>. When i compile the lib, everything is done well. In my application another file is...
1
by: arkam | last post by:
Hi, Here are my link errors : atlsd.lib(ATLComTime.obj) : error LNK2005: "public: __thiscall ATL::COleDateTime::COleDateTime(struct tagVARIANT const &)"...
2
by: bosse | last post by:
Hi, i have got a linker problem, i don't know how to handle; there are three projects in my workspace. In the Project called modules_common is a class called Features. In the second project...
0
by: Taran | last post by:
Hi all, I have this config.h file which has all the declarations for the vars being used in the application. There are no compilation errors but link errors for all the vars declared in this...
1
by: sethuganesh | last post by:
HI, i have ported vc++ 6.0 code to visual studio 2005. During batch build in debug mode i din't get any error.But if i build the same in release mode i am getting the following error. ...
1
nabh4u
by: nabh4u | last post by:
hi, i am getting a link error in my program which states that some variable which i declared in my header file is already defined in the object file. The error is like this: error LNK2005:...
1
by: dewi | last post by:
Dear All, I am trying to compile a C code using Visual C++. Can anyone explain how to solve it? Thank You. #include <math.h> #include <string.h> #include "RV2AJFRONT_NEW.h" #include...
9
by: dewi | last post by:
Dear All, I have several problem about VC++. I succeed to convert Simulink MATLAB to C code using Real-Time Workshop. I am trying to compile a C code using Visual C++ and found the error. Can...
1
by: patelcm22 | last post by:
Hi, I am facing following errors while building my application. Error 4 fatal error LNK1169: one or more multiply defined symbols found C:\Documents and...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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...

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.