Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / Managed C++ / November 2004

Tip: Looking for answers? Try searching our database.

problem converting old code to visual studio .net

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Brett - 06 Oct 2004 13:00 GMT
Hi,

I'm having trouble converting an old project to visual studio C++ .net
v7.1.3088

I've updated one of the header files to use #include <iostream>, and used
the std namspace.
After resolving the missing library by adding "-NODEFAULTLIB:msvcirt.lib" to
the linker command line, I get the following link errors:

libmatpm.lib(init.o) : error LNK2019: unresolved external symbol
"__declspec(dllimport) class ostream_withassign cout"
(__imp_?cout@@3Vostream_withassign@@A) referenced in function "int __cdecl
mwMainCommon(int,char const * *,void (__cdecl*)(int,struct mxArray_tag * *
const,int,struct mxArray_tag * * const),int,struct _mexcpp_information *)"
(?mwMainCommon@@YAHHPAPBDP6AXHQAPAUmxArray_tag@@H1@ZHPAU_mexcpp_information@
@@Z)

libmatpm.lib(handler.o) : error LNK2019: unresolved external symbol
"__declspec(dllimport) class ostream_withassign cout"
(__imp_?cout@@3Vostream_withassign@@A) referenced in function "void __cdecl
DefaultError(char const *,unsigned char)" (?DefaultError@@YAXPBDE@Z)

libmatpm.lib(init.o) : error LNK2019: unresolved external symbol
"__declspec(dllimport) public: class ostream & __thiscall
ostream::operator<<(int)" (__imp_??6ostream@@QAEAAV0@H@Z) referenced in
function "class ostream & __cdecl operator<<(class ostream &,class
mwException const &)" (??6@YAAAVostream@@AAV0@ABVmwException@@@Z)

The file "libmatpm.lib" is a static library that is also kind of dated. Is
there any way I can avoid these errors without recompiling my static
libraries, because I don't have access to them?

Thanks in advance,
Brett
Ronald Laeremans [MSFT] - 06 Oct 2004 22:55 GMT
Sorry, but no. You cannot mix versions of the C and C++ standard libraries
inside one executable image. E.g. in the case of iostreams, the
implementation is completely different.

Ronald Laeremans
Visual C++

> Hi,
>
[quoted text clipped - 33 lines]
> Thanks in advance,
> Brett
Brett - 08 Oct 2004 01:09 GMT
and there's no way I can use the previous versions of header files:
<iostream.h>?

Brett.

> Sorry, but no. You cannot mix versions of the C and C++ standard libraries
> inside one executable image. E.g. in the case of iostreams, the
[quoted text clipped - 44 lines]
>> Thanks in advance,
>> Brett
Ronald Laeremans [MSFT] - 09 Oct 2004 01:11 GMT
Not any supported way at least. And not one that I would personally want to
use in an app that shipped.

Ronald

> and there's no way I can use the previous versions of header files:
> <iostream.h>?
[quoted text clipped - 50 lines]
>>> Thanks in advance,
>>> Brett
Guest - 03 Nov 2004 19:17 GMT
I have the same problem, did you find the solution please?
> Hi,
>
[quoted text clipped - 31 lines]
> Thanks in advance,
> Brett

User submitted from AEWNET (http://www.aewnet.com/)

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.