473,320 Members | 2,071 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

LNK2001 and managed C++ WinForm App

I created a WinForm App with the wizard for VC++ in VS.net
2003.
Then I tried to use a traditional C++ class in this
project, i.e. one that has a .h and a .cpp file. I've put
a __gc in front of the class, because I want to have it
garbage collected.

E.g.:

..h:

__gc class Test {
void Start(void);
}

..cpp:
#include "StdAfx.h"
#include ".\test2.h"
#using <mscorlib.dll>

Test::Start(void)
{
// do something here
return;
}
But the linker only gives me an "LNK2001: unresolved
external symbol blabla::Test::Start(void)"

When I move the code completely to the header file
everything works fine. But unfortunately this also
happens, when I use C Classes without "__gc", and I don't
want to have ALL my methods to be inline.

Has anyone an idea how I can get rid of the "LNK2001"?

Nov 16 '05 #1
0 1019

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: | last post by:
I'm having difficulty embedding a managed C++ control in Internet Explorer. I'm using the same object syntax in the html as I would for a c# control, but IE doesn't seem to find the control in the...
0
by: keith | last post by:
In an managed assembly class, I need to use malloc() and other C functions. But when compiling, it generated errors like error LNK2001: unresolved external symbol "void * __cdecl malloc(unsigned...
6
by: William F. Kinsley | last post by:
I am thinking of porting an existing MFC application to MC++ and I have created a simple MFC application to test the environment. My sample MFC application is compilied with the /clr switch. I...
2
by: Urs Vogel | last post by:
Hi I have a C++ interop project, which links fine with VS2003, but after converting it to VS2005, it compiles everything withour errors/warnugs, but I get the following linker message. ...
5
by: eberesche | last post by:
Hello, as a novice in ASN.1 I have me to a project in C ++ under use of ASN.1 - structures risquély. One of my colleagues means, this would deal something with masochism ;-). Result should be a DLL...
6
by: sadegh | last post by:
Hi I have a problem with my program in VC++6 When I compile it, the following errors are listed. I spend a lot of time on the groups.google.com to find its reason, but none of comments could...
1
by: mahricky | last post by:
i have the following error msg when i buid one of my cpp projects in visual studio 6. pls help me, it's very urgent. extures.obj : error LNK2001: unresolved external symbol "public: __thiscall...
0
by: =?Utf-8?B?SmF5?= | last post by:
Hello, I'm running into a linking problem when trying to build a dll like so... step1: native C++ library & managed c++ = managed c++ dll (this one builds fine) step 2: managed c++ dll (the...
0
by: Ryan Gaffuri | last post by:
hlink72@hotmail.com (Eric) wrote in message news:<ab8d8b14.0308220550.54fb5f22@posting.google.com>... LNK1120 is a standard C++ error. you using Visual C++? Means your references a class that...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.