Sign in to follow this  
manmanman

[.net] Need urs help...My first POST here

Recommended Posts

manmanman    122
HERE IS MY CODE IN VC++ NET 2005... class library trying to use it in C#.net NO problem....BUT problem when i tried to overload on + operator please tell what is wrong SEE THE CODE OF dll(vc++) + testing code(c#) + errors I`m NEW in VC++ .net //////////////////////////////// ////// Vc++ code DLL file//// //////////////////////////////// namespace AByte { public ref class AESByte { // TODO: Add your methods for this class here. public : /// Variable int real; int imaginary; /// contructors AESByte(int real, int imaginary) //constructor { this->real = real; this->imaginary = imaginary; } //// Operation + - * / AESByte^ operator +(AESByte^ c1); }; AESByte^ operator +(AESByte^ c1) { return gcnew AESByte(c1->real, c1->imaginary ); } } //////////////////////////////////////// //////////C# where i`m using my DLL///// /////////////////////////////////////// using AByte; : : : AESByte s1 = new AESByte(4,4); AESByte s2 = new AESByte(5,3); // AESByte s3=s1+s2 ; /////////////////////////////////////// //////////ERROR during compiling//////// /////////////////////////////////////// Error 1 error LNK2020: unresolved token (06000004) AByte.AESByte::op_Addition AByte.obj Error 2 fatal error LNK1120: 1 unresolved externals F:\4thYear\AES\AES_windows\Debug\AByte.dll

Share this post


Link to post
Share on other sites
Guest Anonymous Poster   
Guest Anonymous Poster
really the reference is add :(

and VC# is completing me when u write AESBYTE. a list appear and so on...

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this