Sign in to follow this  
ezdookie

A question about C++ 2008

Recommended Posts

Hello all, I can't found a topic where i can post... so... i make a new one... Few weeks ago i've started a game project.. i was programming with C++ 6.0 with DirectX SDK Aug 2008 pack.. but when i was trying to setup DirectInput in my game i got problems.. I was searching information and i found that Directx SDK Aug 2008 pack is not supported with c++ 6.0... so.. i have to start again with a new language or with previous versions of directx sdk... But.. i have one question if i start with visual studio 2008 (Visual c++ 2008)... I know C# needs .NET framework for run... so.. that is a difficulty for gamers if they don't know wtf is that.. so.. Visual c++ 2008 needs something for can run?? i hope you guys can understand me.. i am not good with english.. Thank you all

Share this post


Link to post
Share on other sites
Quote:
Original post by ezdookie
so.. i have to start again with a new language or with previous versions of directx sdk...


I think you're getting a few things muddled up. The "C++ 6" and "C++ 2008" you're referring to is probably the IDE you're using, NOT the language itself.

Microsoft Visual C++ 6.0 and Microsoft Visual Studio 2008 still use the same C++ language. Visual Studio 2008 just has some extra utilities to help you do your coding (better Intellisense, code wizards, etc).

You don't have to learn a new language, Visual Studio is just an IDE to write your code in and help you compile it. Think of Visual Studio as a glorified Notepad.exe.

Share this post


Link to post
Share on other sites
@ezdookie I believe you can statically link the run-time library to your executable. It is under Project Properties->C/C++->Code Generation->Runtime library.
@deadstar This is not entirely correct. Actually the compiler that was used in VC6 was created before the official C++ standard was published and does not follow it 100%.

Share this post


Link to post
Share on other sites
Quote:
Original post by ezdookie
ok thanks... one question more... if i make an executable with visual c++ 2008, is it compatible with older versions of windows?? like windows 98??


That depends entirely on what you link into the executable. If you write a plain-vanilla hello-world application that just prints something to the TTY, then yes it'll work.

But if you use features in your code that are only supported under WinXP, for example, then it will not work. I'm pretty sure DX10 is not compatible with Win98, but feel free to correct me if I'm wrong.

Again - the difference is the IDE. You would still have the same problems with an older version of Visual Studio. I can easily write a program in VC++ 6 that will not be compatible with older versions of Windows.

One last thing, I do believe there's a linker option in Visual Studio to optimize for Windows 98.

Share this post


Link to post
Share on other sites
Just wanted to point out that the Win98 "optimization" is deprecated and will be removed in future IDE versions. Also, OS version compatibility has nothing to do with the VS2008 IDE or the MSVC++ Compiler but rather with the APIs/Libraries you use.

Share this post


Link to post
Share on other sites
Quote:
Original post by Cypherjb
[...]Also, OS version compatibility has nothing to do with the VS2008 IDE or the MSVC++ Compiler but rather with the APIs/Libraries you use.
That isn't entirely true because the MSVC++ compiler requires the use of a runtime[1] and the runtime MS provides may use windows API functions that are not provided by previous OS versions. I'm not certain, but I believe the runtime that comes with VS 2008 will not work on windows 98 for that reason.

[1] It is practically impossible to make your own C++ runtime that will work 100% correctly and implement all the functionality because VC++ has tons of undocumented functions and structures it requires the runtime to provide and/or use.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this