Click here to Skip to main content
15,895,084 members
Home / Discussions / Managed C++/CLI
   

Managed C++/CLI

 
GeneralRe: Installing Managed C++ Pin
alias4720-Aug-06 21:29
alias4720-Aug-06 21:29 
GeneralRe: Installing Managed C++ Pin
Christian Graus20-Aug-06 21:52
protectorChristian Graus20-Aug-06 21:52 
GeneralRe: Installing Managed C++ Pin
Nish Nishant21-Aug-06 1:07
sitebuilderNish Nishant21-Aug-06 1:07 
GeneralRe: Installing Managed C++ Pin
Christian Graus21-Aug-06 1:21
protectorChristian Graus21-Aug-06 1:21 
GeneralRe: Installing Managed C++ Pin
Nish Nishant21-Aug-06 1:30
sitebuilderNish Nishant21-Aug-06 1:30 
QuestionNative classes in managed assemblies Pin
Xpnctoc17-Aug-06 15:38
Xpnctoc17-Aug-06 15:38 
AnswerRe: Native classes in managed assemblies Pin
Nish Nishant17-Aug-06 15:47
sitebuilderNish Nishant17-Aug-06 15:47 
GeneralRe: Native classes in managed assemblies [modified] Pin
Xpnctoc17-Aug-06 16:22
Xpnctoc17-Aug-06 16:22 
I made my original post without the code in front of me, so I had the wrong class name. In the error messages below, CClass32 is the native class in the DLL I am calling (a.k.a. "MyClass" in the original post). The errors were generated building the calling app with a project refernce to the DLL built with the /clr switch. When the DLL is built with no CLR support, the calling app builds with no errors or warnings.

Also, sorry for the misinformation. I forgot I got out of console mode and tried plugging this into a windows form. In the form class, I declared a private variable "pc" as a pointer to CClass32. I put a call to pc->DoSomething() in the destructor because the whole project is just a learning test (so I was too lazy to set up a button click event in the form). That's why these error messages look like they do. I don't actually expect to execute the app. But I do need to understand this whole process and need this test to build before I embark on porting one of my very large c++ 6.0 projects into a semi-managed .NET application.

Having said that, here are the errors:

Error 1 error LNK2028: unresolved token (0A000017) "public: int __thiscall CClass32::DoSomething(void)" (?DoSomething@CClass32@@$$FQAEHXZ) referenced in function "private: __clrcall CLIGLTest2::Form1::~Form1(void)" (??1Form1@CLIGLTest2@@$$FA$AAM@XZ) CLIGLTest2.obj

Error 2 error LNK2019: unresolved external symbol "public: int __thiscall CClass32::DoSomething(void)" (?DoSomething@CClass32@@$$FQAEHXZ) referenced in function "private: __clrcall CLIGLTest2::Form1::~Form1(void)" (??1Form1@CLIGLTest2@@$$FA$AAM@XZ) CLIGLTest2.obj

Error 3 fatal error LNK1120: 2 unresolved externals C:\Files\VsNet 2005\CLIGLTest2\Debug\CLIGLTest2.exe 1

When I add in the form constructor the code pc = new CClass32(); the errors are doubled, producing similar messages saying that the symbol "public: __thiscall CClass32::CClass32(void)" is not defined. So it's like the DLL doesn't even exist as far as the calling app is concerned. But as I said, I used the IDE to point to the DLL where CClass32 is defined, so I know it's not a malformed #using directive or something.


-- modified at 22:38 Thursday 17th August, 2006
GeneralRe: Native classes in managed assemblies [modified] Pin
Nish Nishant18-Aug-06 1:48
sitebuilderNish Nishant18-Aug-06 1:48 
GeneralRe: Native classes in managed assemblies Pin
Xpnctoc18-Aug-06 4:58
Xpnctoc18-Aug-06 4:58 
GeneralRe: Native classes in managed assemblies Pin
led mike18-Aug-06 7:23
led mike18-Aug-06 7:23 
GeneralRe: Native classes in managed assemblies Pin
Xpnctoc18-Aug-06 8:26
Xpnctoc18-Aug-06 8:26 
GeneralRe: Native classes in managed assemblies Pin
Nish Nishant18-Aug-06 7:43
sitebuilderNish Nishant18-Aug-06 7:43 
GeneralRe: Native classes in managed assemblies Pin
Xpnctoc18-Aug-06 9:01
Xpnctoc18-Aug-06 9:01 
GeneralRe: Native classes in managed assemblies Pin
Nish Nishant18-Aug-06 9:04
sitebuilderNish Nishant18-Aug-06 9:04 
GeneralRe: Native classes in managed assemblies Pin
Xpnctoc18-Aug-06 9:20
Xpnctoc18-Aug-06 9:20 
Questionmsgbox, quick questio Pin
Droze17-Aug-06 10:57
Droze17-Aug-06 10:57 
AnswerRe: msgbox, quick questio Pin
Christian Graus17-Aug-06 18:01
protectorChristian Graus17-Aug-06 18:01 
GeneralRe: msgbox, quick questio Pin
Nish Nishant18-Aug-06 1:51
sitebuilderNish Nishant18-Aug-06 1:51 
GeneralRe: msgbox, quick questio Pin
Droze18-Aug-06 4:18
Droze18-Aug-06 4:18 
GeneralRe: msgbox, quick questio Pin
Christian Graus18-Aug-06 11:41
protectorChristian Graus18-Aug-06 11:41 
GeneralRe: msgbox, quick questio Pin
Nish Nishant18-Aug-06 11:44
sitebuilderNish Nishant18-Aug-06 11:44 
GeneralRe: msgbox, quick questio [modified] Pin
Christian Graus18-Aug-06 12:14
protectorChristian Graus18-Aug-06 12:14 
Questionproblems with "new" Pin
Wheatbread17-Aug-06 8:42
Wheatbread17-Aug-06 8:42 
AnswerRe: problems with "new" Pin
led mike17-Aug-06 8:47
led mike17-Aug-06 8:47 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.