468,771 Members | 1,929 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,771 developers. It's quick & easy.

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 1007

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Florian Liefers | last post: by
2 posts views Thread by bosse | last post: by
reply views Thread by Taran | last post: by
9 posts views Thread by dewi | last post: by
1 post views Thread by CARIGAR | last post: by
1 post views Thread by Marin | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.