PDA

View Full Version : vc++6-code to vc++7-code = error


Extrawurst
10-09-2003, 11:00 AM
i just compiled a program that i was able to compile under vc++6 without any problem, but under vc++7 i get some "unresolved external symbols"-linker errors. and they mean some "std::_Xran()"-stuff i dont understand! whats wrong with it ?

here the complete error-message:
---------------------------------------------
application_c.obj : error LNK2019: unresolved external symbol "void __cdecl std::_Xran(void)" (?_Xran@std@@YAXXZ) referenced in function "public: class std::basic_string,class std::allocator > & __thiscall std::basic_string,class std::allocator >::assign(class std::basic_string,class std::allocator > const &,unsigned int,unsigned int)" (?assign@?$basic_string@DU?$char_traits@D@std@@V?$ allocator@D@2@@std@@QAEAAV12@ABV12@II@Z)
---------------------------------------------

Dia Kharrat
10-09-2003, 12:51 PM
I believe the reason for that is some stl library mismatch. Because you converted the project from vc6 to vc7, you are probably still using the old vc6 stl. So you are using vc6's stl and linking it to vc7 using its stl.

Extrawurst
10-09-2003, 01:31 PM
i only use the following headers:

#include <math.h>
#include <vector>
#include <windows.h>
#include <algorithm>
#include <time.h>
#include <gl\gl.h>
#include <gl\glu.h>
#include <gl\glaux.h>


please help me!

Extrawurst
10-09-2003, 01:35 PM
well actually i don't know where to look to get to know wich libraries i use, i'm very new with msVc++ 7

DrunkenCoder
10-09-2003, 01:52 PM
Try cleaning or rebuilding your project under the build menu select Rebuild Solution

Extrawurst
10-09-2003, 03:58 PM
i don't know why but at first the project ran after cleaning up und rebuilding, but now after i coded a bit i now have this (linker)error:

------------------------------------------
application_c.obj : error LNK2001: unresolved external symbol "public: virtual class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __thiscall CException::GenerateText(void)" (?GenerateText@CException@@UAE?AV?$basic_string@DU ?$char_traits@D@std@@V?$allocator@D@2@@std@@XZ)

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

Dia Kharrat
10-09-2003, 04:09 PM
Try cleaning up and rebuilding again...

What are the changes you made that made that linkage error appear?

Extrawurst
10-09-2003, 04:15 PM
ohhhhhhhhhhhh my god, i think im too tierd now, please don't shoot me, i really didn't realize until now, that i simply deleted the function the linker was searching for. that was a terrible mistake!

bladder
10-09-2003, 10:59 PM
OH TEH HUMANITY!!!!

alia
10-14-2003, 06:53 PM
Hi everyone!
Since your on the topic of vc7, how does the IDE compare to vc6?? Is the thread debugging improved?? better watchpoints?? So far i have only ever heard negative things about it.. ie IDE leaves no space to actually code in - takes lots of HDD space etc... debugging multithreaded apps in vc6 is very cumbersome (i find anyway)

Is it worth the upgrade?

Alia

Dia Kharrat
10-14-2003, 08:27 PM
I think there's a drastic improvement over vc6.
The vc7 compiler was rewritten competely; it's completly optimized and produces much faster and efficient code. Also, the STL templates were rewritten and are now virtually bug-free. vc6's STL library was full of bugs. The IDE is also integrated with the other .net languages, whereas vc6 used it's "own" ide.
Also, intellisense and debugging have improved quite a bit.

But that's true: it does take a lot of space, but having a 160 GB harddisk doesn't matter much). These days, most computers are coming with 80GB+ hard drives.

Also, vc7 doesn't work with win98, but who has win98 nowadays?

One thing missing is integrating D with visual studio .net (can be called vd7 :D ). I don't think that's hard to do, since visual studio.net is very "pluggable".

I'm not sure if windows emulators for linux can emulate visual studio. has anyone tried?

davepermen
10-14-2003, 08:41 PM
there is some info on how to plug D into vc7.0.. doesn't work for vc7.1 again, though..

i've switched away from vc.net completely. i don't need to waste those gigabytes on my hd..

alia
10-14-2003, 11:14 PM
Yeah, well i wont be going towards .net unless work forces us... and definately not for gamedev. But its important to know what im missing out on! :blush:

A.