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

Managed C++/CLI

 
AnswerRe: const char __gc[] to const char [] Pin
Michael Dunn10-Mar-06 6:47
sitebuilderMichael Dunn10-Mar-06 6:47 
Questioncross-include two classes Pin
shaohao9-Mar-06 4:24
shaohao9-Mar-06 4:24 
AnswerRe: cross-include two classes Pin
toxcct9-Mar-06 4:45
toxcct9-Mar-06 4:45 
GeneralRe: cross-include two classes Pin
shaohao9-Mar-06 5:09
shaohao9-Mar-06 5:09 
GeneralRe: cross-include two classes Pin
toxcct9-Mar-06 5:12
toxcct9-Mar-06 5:12 
GeneralRe: cross-include two classes Pin
shaohao10-Mar-06 3:09
shaohao10-Mar-06 3:09 
GeneralRe: cross-include two classes Pin
georgeraafat10-Mar-06 13:43
georgeraafat10-Mar-06 13:43 
Questionhelp with wrapping this code Pin
Fu Manchu9-Mar-06 2:18
Fu Manchu9-Mar-06 2:18 
i thought it would be better to make a new tread for this one.

i am trying to get this code to work, but i don't know what i'm doing wrong..

i know this much....

i have a class library(.net) called fooManaged and its automatical created fooManaged.h. and i created UnManaged.h

in the UnManaged.h file i have this code.....

#include iostream
#include vcclr.h
using namespace std;

class Foo
{
public:
Foo();
~Foo();
void DoSomeFoo();
};

// constructor
Foo::Foo()
{
cout<<"Constructor called!"<<endl;
}
destructor
foo::~foo()=""
{
cout<<"destructor="" called"<<endl;
}

="" some="" method
void="" foo::dosomefoo(void)

{
cout<<"do="" something="" funny!"<<endl;
cout<<"burrrp!"<<endl;
}


in="" foomanaged.h="" i="" have="" this="" code....

="" foomanaged.h

#pragma="" once
using="" namespace="" system;

namespace="" foomanaged
{
public="" __gc="" class="" mfoo
{=""
private:
foo="" *="" _foo;
public:
mfoo();
~mfoo();
void="" manageddosomefoo();
};
="" constructor
mfoo::mfoo()=""
{
_foo="new" foo();
}
="" destructor
mfoo::~mfoo()
{
delete="" _foo;
}

="" mfoo::manageddosomefoo()=""
{
_foo-="">DoSomeFoo();
}

}

the fooManaged.cpp file just has...

#include "stdafx.h"
#include "Unmanagedfoo.h"
#include "fooManaged.h"
#using mscorlib.dll

it all compiles...but there is a big linking error!!

Compiling...
fooManaged.cpp
Linking...
LINK : error LNK2020: unresolved token (0A000005) _CxxThrowException
LINK : error LNK2020: unresolved token (0A000019) free
LINK : error LNK2020: unresolved token (0A00001A) strlen
LINK : error LNK2020: unresolved token (0A00001B) memmove
LINK : error LNK2020: unresolved token (0A00001C) memcpy
LINK : error LNK2020: unresolved token (0A00001D) delete
LINK : fatal error LNK1120: 6 unresolved externals

i must be doing something wrong, some help with this will be very wecome

thanks
AnswerRe: help with wrapping this code Pin
Nemanja Trifunovic9-Mar-06 2:43
Nemanja Trifunovic9-Mar-06 2:43 
GeneralRe: help with wrapping this code Pin
Fu Manchu9-Mar-06 3:24
Fu Manchu9-Mar-06 3:24 
GeneralRe: help with wrapping this code Pin
Nemanja Trifunovic9-Mar-06 3:48
Nemanja Trifunovic9-Mar-06 3:48 
GeneralRe: help with wrapping this code Pin
Fu Manchu9-Mar-06 4:17
Fu Manchu9-Mar-06 4:17 
QuestionCompiling native C files in C++/CLI solution Pin
Judah Gabriel Himango8-Mar-06 16:10
sponsorJudah Gabriel Himango8-Mar-06 16:10 
AnswerRe: Compiling native C files in C++/CLI solution Pin
Nemanja Trifunovic9-Mar-06 1:33
Nemanja Trifunovic9-Mar-06 1:33 
GeneralRe: Compiling native C files in C++/CLI solution Pin
Nish Nishant9-Mar-06 2:53
sitebuilderNish Nishant9-Mar-06 2:53 
GeneralRe: Compiling native C files in C++/CLI solution Pin
Nemanja Trifunovic9-Mar-06 3:50
Nemanja Trifunovic9-Mar-06 3:50 
GeneralRe: Compiling native C files in C++/CLI solution Pin
Nish Nishant9-Mar-06 5:25
sitebuilderNish Nishant9-Mar-06 5:25 
GeneralRe: Compiling native C files in C++/CLI solution Pin
Judah Gabriel Himango9-Mar-06 5:04
sponsorJudah Gabriel Himango9-Mar-06 5:04 
GeneralRe: Compiling native C files in C++/CLI solution Pin
Nish Nishant9-Mar-06 5:26
sitebuilderNish Nishant9-Mar-06 5:26 
GeneralRe: Compiling native C files in C++/CLI solution Pin
Judah Gabriel Himango9-Mar-06 5:36
sponsorJudah Gabriel Himango9-Mar-06 5:36 
GeneralRe: Compiling native C files in C++/CLI solution Pin
Judah Gabriel Himango9-Mar-06 5:00
sponsorJudah Gabriel Himango9-Mar-06 5:00 
QuestionConverting CLR String to LPCSTR Pin
Judah Gabriel Himango8-Mar-06 15:49
sponsorJudah Gabriel Himango8-Mar-06 15:49 
AnswerRe: Converting CLR String to LPCSTR Pin
Nish Nishant8-Mar-06 16:02
sitebuilderNish Nishant8-Mar-06 16:02 
GeneralRe: Converting CLR String to LPCSTR Pin
Judah Gabriel Himango8-Mar-06 16:04
sponsorJudah Gabriel Himango8-Mar-06 16:04 
Questionchecking Parallel Port Pin
karanba8-Mar-06 3:39
karanba8-Mar-06 3:39 

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.