Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > .NET General

Vista - Linker error when linking unmanaged library with manged exe

Reply
 
Old 02-18-2009   #1 (permalink)
Saad


 
 

Linker error when linking unmanaged library with manged exe

Hi,

I have an unmanaged static library which im linking into a managed
exe. The unmanaged library is being build by VS 2005 with old syntax
check enabled and no clr option. The managed exe is also build by VS
2005 with old syntax enabled and clr option enabled.

Now, i have added one function in one of the classes of the library,
and i try to call it from the managed exe, and the linker is giving me
the following error:-

error LNK2028: unresolved token (0A000168) "public: bool __thiscall
CStorageEx::isFunc(void)" (?isFunc@xxxxxx@@$$FQAE_NXZ) referenced
in function "public: virtual class System::String ^ __clrcall
Project::ManagedClass::get_Func(void)" (?
get_Func@xxxxxx@Project@@$$FU$AAMP$AAVString@xxxxxx@@XZ)
error LNK2019: unresolved external symbol "public: bool __thiscall
CStorageEx::isFunc(void)" (?isFunc@xxxxxx@@$$FQAE_NXZ) referenced
in function "public: virtual class System::String ^ __clrcall
Project::ManagedClass::get_Func(void)" (?
get_Func@xxxxxx@Project@@$$FU$AAMP$AAVString@xxxxxx@@XZ)

The error is removed if i FIRST call the newly added function in the
unmanaged library, and then use it in the managed exe.

Now im unable to understand the reason......
Y is it happening? .......
Please any solutions.......??

Thanks,
Saad

My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
Library Linker error when budiling a .DLL code in .NET 2008 .NET General
/SUBSYSTEM:NATIVE linker option not available?? .NET General
Dispose Unmanaged resources .NET General
Implementing Unmanaged Interface in C# .NET General
Linking Error error LNK2001 and LNK1120 Vista General


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46