LNK2020 Problem 
Author Message
 LNK2020 Problem

Hi!

I have some C/C++ programs that were written and fully tested under Visual
Studio 6.0.  Now I'm trying to build them under Visual Studio .NET 2002
with "/clr" option.

I got the following error message when building in release mode while there
is no error in debug mode:
LINK : error LNK2020: unresolved token (0A000050) d4tagSync

Here is part of my source code:
// in the .H file
__declspec(dllexport) int __stdcall d4tagSync(user_defined_struct_1 *,
user_defined_struct_2 *);
// in the .C file
int d4tagSync(user_defined_struct_1 *st1, user_defined_struct_2 *st2)
{
  .......

Quote:
}

Another question, MSDN Library says "The use of dllexport or dllimport on
classes is not permitted under /clr build in VC++ .NET".  How can I export
Class from a DLL now?

Thanks in advance.

Neo



Sun, 18 Sep 2005 14:01:33 GMT  
 LNK2020 Problem

--------------------

Quote:

> Subject: LNK2020 Problem
> Hi!

> I have some C/C++ programs that were written and fully tested under Visual
> Studio 6.0.  Now I'm trying to build them under Visual Studio .NET 2002
> with "/clr" option.

> I got the following error message when building in release mode while
there
> is no error in debug mode:
> LINK : error LNK2020: unresolved token (0A000050) d4tagSync

> Here is part of my source code:
> // in the .H file
> __declspec(dllexport) int __stdcall d4tagSync(user_defined_struct_1 *,
> user_defined_struct_2 *);
> // in the .C file
> int d4tagSync(user_defined_struct_1 *st1, user_defined_struct_2 *st2)
> {
>   .......
> }

> Another question, MSDN Library says "The use of dllexport or dllimport on
> classes is not permitted under /clr build in VC++ .NET".  How can I export
> Class from a DLL now?

> Thanks in advance.

> Neo

The /clr option compiles C++ code for the managed .Net runtime environment.
To get familiar with what Managed C++ is, you can visit one of the below
sites:

http://www.gotdotnet.com/team/cplusplus/
http://www.codeproject.com/managedcpp/

In addition there are several books on the market which explain the .Net
environment and the languages targetting it.

--
Tanveer Gani, Visual C++ Team
This posting is provided AS IS with no warranties, and confers no rights.



Sat, 24 Sep 2005 02:01:41 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. LINK : error LNK2020: unresolved token (0A000055) (managed to unmanaged)

2. LNK2020 errors

3. LNK2020 - unresolved token (0A000182) SEP_PASTE.Paste

4. LINK : error LNK2020: unresolved token (060000EA) CMCNetToken::.ctor

5. LNK2020 : typeinfo not found, but no RTTI anywhere!!!

6. Visual C++.NET:Problems of Abstract Class & LNK2020 Error

7. problems problems problems

8. Problems, problems, problems!

9. Problems, problems problems

10. Problems, Problems, Problems

11. VC6 to VC7 migration problem (problem with ATL and MFC)

 

 
Powered by phpBB® Forum Software