LNK1254 when porting from VC6 to VC.NET

  • Thread starter Gilles Orazi dot orazi at varianinc dot com
  • Start date
G

Gilles Orazi dot orazi at varianinc dot com

Hi,

I am having troubles to port C++ code to .NET.
I want to write a set of managed wrapper classes to my old unmanaged code.

Everything compiles fine but I get a strange link error:

LINK : fatal error LNK1254: métadonnées du symbole
'??$find@Viterator@?$vector@Viterator@?$_Tree@V?$_Tmap_traits@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V?$shared_ptr@VContainer@dhpl@@@boost@@U?$less@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@V?$allocator@U?$pair@$$CBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V?$shared_ptr@VContainer@dhpl@@@boost@@@std@@@2@$0A@@std@@@std@@V?$allocator@Viterator@?$_Tree@V?$_Tmap_traits@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V?$shared_ptr@VContainer@dhpl@@@boost@@U?$less@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@V?$allocator@U?$pair@$$CBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V?$shared_ptr@VContainer@dhpl@@@boost@@@std@@@2@$0A@@std@@@std@@@3@@std@@V1?$_Tree@V?$_Tmap_traits@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V?$shared_ptr@VContainer@dhpl@@@boost@@U?$less@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@V?$allocator@U?$pair@$$CBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V?$shared_ptr@VContainer@dhpl@@@boost@@@std@@@2@$0A@@std@@@3@@std@@$$FYA?AViterator@?$vector@Viterator@?$_Tree@V?$_Tmap_traits@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V?$shared_ptr@VContainer@dhpl@@@boost@@U?$less@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@V?$allocator@U?$pair@$$CBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V?$shared_ptr@VContainer@dhpl@@@boost@@@std@@@2@$0A@@std@@@std@@V?$allocator@Viterator@?$_Tree@V?$_Tmap_traits@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V?$shared_ptr@VContainer@dhpl@@@boost@@U?$less@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@V?$allocator@U?$pair@$$CBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V?$shared_ptr@VContainer@dhpl@@@boost@@@std@@@2@$0A@@std@@@std@@@3@@0@V120@0ABV1?$_Tree@V?$_Tmap_traits@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V?$shared_ptr@VC
ontainer@dhpl@@@boost@@U?$less@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@V?$allocator@U?$pair@$$CBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V?$shared_ptr@VContainer@dhpl@@@boost@@@std@@@2@$0A@@std@@@0@@Z'
non cohérentes avec la table des symboles COFF

Wow ! What a symbol !!

Any hint ?

Thanks by advance.
Gilles.
 
C

Carl Daniel [VC++ MVP]

Gilles said:
Hi,

I am having troubles to port C++ code to .NET.
I want to write a set of managed wrapper classes to my old unmanaged
code.

Everything compiles fine but I get a strange link error:

Are you quite certain that you've recompiled _everything_ that you're trying
to link? If there's even a single C++ module that uses STL, boost, MFC or
ATL that was compiled with VC6, it won't link successfully with the balance
of the modules compiled with VC7{.1}.

-cd
 
G

Gilles Orazi

Are you quite certain that you've recompiled _everything_ that you're
trying
to link? If there's even a single C++ module that uses STL, boost, MFC
or
ATL that was compiled with VC6, it won't link successfully with the
balance of the modules compiled with VC7{.1}.

Thanks a lot for your answer. Unfortunately, I recompiled all my .lib file
and get the same error. :-(

In the meantime I found the KB822329 where it is recommended to compile non
clr file without the /clr option. By doing that in a makefile it works
fine. But I was not able to compile some specific files of my project
without the /clr option: I tried change the "C++/General/compile as managed
code" option of these file (the name of this option may not be correct
because I have a french language version). I then get a compilation error
that says I should set the /clr switch.

Any hint ?

Thanks by advance
Gilles.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top