471,115 Members | 1,495 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,115 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 1055

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

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.