Archived

This topic is now archived and is closed to further replies.

porting my appication to vc 7

This topic is 5146 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi I installed VS .NET and I''m trying to port my VC 6 project to VC 7. I''m having some linker problems: 1) tools.cpp c:\Program Files\Microsoft Visual Studio .NET\Vc7\include\useoldio.h(29) : warning C4995: ''_OLD_IOSTREAMS_ARE_DEPRECATED'': name was marked as #pragma deprecated It''s written in help that old io headers will not be supported by VC 8 for more compatibility. what compatibility are they talking about? if there''s a compatibility it would be to ANSI. what''s microsoft trying to do? 2) lib3ds-120sd.lib(atmosphere.obj) : warning LNK4099: PDB ''vc60.pdb'' was not found with ''C:\Program Files\Microsoft Visual Studio .NET\Vc7\lib\lib3ds-120sd.lib'' or at ''c:\Documents and Settings\codertcd\My Documents\Visual Studio Projects\birdofprey\Debug\vc60.pdb''; linking object as if no debug info this lib file is compiled with older version. but it''s written by someone else and I don''t think needs debugging. how can I get rid of this message? additionally I have some question marks about VC 7 does it require .NET framework or some shitty runtime files? does it produce slower executables than VC 6 is it a good idea to use 7 instead of 6? what advantages 7 have? thanks for your concern serdar

Share this post


Link to post
Share on other sites
Question number 1:

Use < iostream > instead of < iostream.h >. And remember that all functions are in the standard namespace, so it's std::cin instead of just cin. If you don't want to use std:: in front of everything, you could put "using namespace std;" at the top of your cpp file, below the includes. But remember never, do that in header files.

I don't think you can do much about the other warning, if you can't recompile, or have a releasee version of the lib. But the program should work even with that warning.

[edited by - fredizzimo on November 12, 2003 3:26:17 PM]

Share this post


Link to post
Share on other sites
VS.Net is just an IDE, it doesn''t make you use .net or anything like that. The compiler included might make worse code, depending on which version vc6 and which version of vc7 you have (pro, standard, etc). Your first problem is that you are probably using a C++ .h header instead of an extensionless header as the standard specifies. You can probably remove the second warning with a #pragma warning(disable)

Share this post


Link to post
Share on other sites
1. You're #including <iostream.h>. Bad bad bad. NEVER include <iostream.h>; only ever include <iostream>. This is true of other standard library headers, but it is REALLY true of the IOStreams library. (keep in mind that you'll have to refer to cout, cin, etc. in the std namespace once you make that change)

2. Not sure how to disable link-time warnings like that..... check the docs.

quote:
does it require .NET framework or some shitty runtime files?

.NET applications do, but you don't have to make a .NET application just because you're using Visual C++.NET. The runtime DLL is required if you haven't statically linked it in.
quote:
does it produce slower executables than VC 6

VC7 has really nice optimization. It will tend to produce slightly faster executables, though this depends strongly on your coding style.
quote:
is it a good idea to use 7 instead of 6?

There's no good reason I know of not to.
quote:
what advantages 7 have?

Better standards conformance, better optimization, and better IDE and editor (I could go on and on about that).



"Sneftel is correct, if rather vulgar." --Flarelocke

[edited by - sneftel on November 12, 2003 3:26:21 PM]

Share this post


Link to post
Share on other sites
1) This basically means you''re including instead of ..which is deprecated

2) This means (I''m pretty sure) that you''re using a debug version of the lib that was built with VS6. It just means that the debug information in each version is a bit different. Rebuild it with VC7. Release versions of libs shouldn''t matter which version they were built with.

VC7 produces faster binaries than VC6 in a version-version comparison for the most part. This means that VC7 standard is better than VC6 standard and VC7 professional is better than VC6 prof and so on.

Conformance wise, VS.NET 2002 is a bit better than VC6 SP5, and VS.NET 2003 beats the crap out of both of them.

7 has, IMO, a much better IDE.

As far as runtimes, using the .NET framework (writing managed code) requires a runtime, but it will be installed on most machines that you''re running your stuff on already.

Of course, you don''t actually have to use the .NET framework or managed code at all, it has the normal C++ native compilers there also, which work just like binaries you produced using version 6. There is a bit of confusion stemming from their naming conventions, mainly that VS.NET only does .NET applications, which isn''t true.



VSEDebug Visual Studio.NET Add-In. Enhances debugging in ways never thought possible.

Share this post


Link to post
Share on other sites