473,320 Members | 2,158 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.

STL Link Errors converting from VC7 to VC8

I am converting a DLL project from VC7 to VC8. The project is a managed
C++ DLL. The project uses a non managed C++ library compiled an
linked in VC7 which uses the STL.

I just about got everything to link with the exception of some STL link
errors.
Here is an example of one of the errors:

error LNK2001: unresolved external symbol "public: void __thiscall
std::_String_base::_Xran(void)const

How do I resolve this?
Bruce
Nov 28 '06 #1
2 1861
Bruce wrote:
I am converting a DLL project from VC7 to VC8. The project is a
managed C++ DLL. The project uses a non managed C++ library
compiled an linked in VC7 which uses the STL.

I just about got everything to link with the exception of some STL
link errors.
Here is an example of one of the errors:

error LNK2001: unresolved external symbol "public: void __thiscall
std::_String_base::_Xran(void)const

How do I resolve this?
Recompile the native C++ library (or is it a DLL?) with VC8. In general,
you can't mix C++ standard library versions in a single link, nor can you
transport Standard Library objects (like std::string) across a DLL boundary
if there are different versions on the two sides (e.g. use VC7 to compile a
DLL and VC8 ot use it - likely won't work if there are std::string
parameters/return types to functions exported by the DLL).

-cd
Nov 28 '06 #2
Carl Daniel [VC++ MVP] wrote:
>
Recompile the native C++ library (or is it a DLL?) with VC8. In general,
you can't mix C++ standard library versions in a single link, nor can you
transport Standard Library objects (like std::string) across a DLL boundary
if there are different versions on the two sides (e.g. use VC7 to compile a
DLL and VC8 ot use it - likely won't work if there are std::string
parameters/return types to functions exported by the DLL).

-cd

Thanks Carl.

It is not a DLL lib but a static lib. But I guess your information
still applies?
I do also have a VC& DLL version of the lib. It does not export
anything from STL. Should this lib still work from VC8?

Bruce
Nov 29 '06 #3

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

Similar topics

2
by: Brian | last post by:
Hi there, I am converting a large PL/SQL project into Transact-SQL and have hit an issue as follows: I have a PL/SQL procedure that converts a string to a date. The procedure does not know...
3
by: Quintus Snapper | last post by:
Hi All, I'm having a problem with an anchor link in IE which is working inconsistantly and I can't figure out why. On the following website: http://www.friendlyrentals.com/ If you click...
1
by: Paul | last post by:
Hello, I am converting an Access database on our network to a sql 2000 backend and keeping access as the front end. The access database has evolved and been a solution to collect data but now...
10
by: Gary Hughes | last post by:
I'm getting the following error when attempting to link a managed C++ dll. I can't find any reference to these errors with google. Can anyone help? I've included the class definition causing the...
4
by: Mike Woinoski | last post by:
(I'm new to VS, so please forgive me if this is a faq.) I'm writing some Java web services and need to test them with C++ clients. I can use either a Windows Form application or an MFC application....
5
by: Bruce | last post by:
I am getting a lot of link errors when compiling in the debug build but not release. I am compiling a CLR managed code class library. I believe the link errors are actually being caused by a...
4
sangeetha jagannathan
by: sangeetha jagannathan | last post by:
hi i am converting a project from vc++ 6.0 to vc++ 7.1(visual c++ .NET 2003), while compiling i bet a lot of linking errors, can u help me fix it the errors that i encountered are Linking......
6
by: desktop | last post by:
Each time I compile my program I get something like this: g++ -trigraphs -o draw main.cpp -lGL -lGLU -lglut -lX11 -lm -I../src In file included from solution/print.h:6, from...
1
by: =?Utf-8?B?SG93YXJkIFBpbnNsZXk=?= | last post by:
I'm trying to convert a Web Site to the Web Application project model and I'm running into compile errors that do not seem to be covered by the guidance I found at "Converting a Web Site Project to...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
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)...
0
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...

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.