|
||
|
GP Mailing List
ATXGPSIG List
|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: help
On Thu, 28 Oct 1999, Jonathan Smith wrote: > Sorry about all the questions, but I have one question(hopefully I can > phrase it right). Heehee.. don't worry about questions. ;) Personally, it helps me to remember some things which I have taken for granted as a "given". It gives me a mental prompt to do more looking into of things. So it's a good thing. Though one wonders whether or not an FAQ for this ML might be a good idea. > Lets say I write my program in notepad, a microsoft text editor, for > c/c++. If I were to compile it using the visual c++ 6 compiler, are > you saying that it would only work for windows? Basically, if you compiled it with MS VC/C++, it will pretty much run only on Windows. That's correct. But that is because the targets for VC/C++ is usually targetted at producing "exe" type files with links to MS specific graphical interface libraries and the like. Those will naturally not run on any other system/os without emulation or hacking. What you write in notepad will compile on other OS's and compilers, so long as your code is valid and correct syntax-wise. > Is there anyway I can get a different compiler to compile my > program(written in notepad)for a different os without having to > purchase a whole software package? Notepad isn't the problem. VC/C++ is. Notepad has NO restrictions other than perhaps the differences between UNIX type text files and DOS/WIN text files. > If c/c++ works for almost all operating systems, why don't everyone > just get it instead of purchasing visual c/c++? Oh, and what version > of visual c/c++ and visual basic is it in visual studio? Thanks all. Depends on the version you are buying, but I think it is currently 6.0. People won't get other compilers because they specifically want to program for the Windows environment. Ie, windows apps or windows games. They have also been convinced that MS is the one and only way to go. There's nothing wrong with going with MS... but there's also nothing wrong with going with other OS's. For the Dos/Windows environment, as I've mentioned before, there are other IDE's and compilers.. both GPL and commercial are available. For Linux, there are also GPL and commercial compilers for c/c++. The thing to keep in mind is: - What does your compiler accept as "legal" or "correct" code? Is that the same as what another compiler will consider as legal and correct? - Libraries between OS's and platforms will almost always be different, so porting will be a pain since you will need to find an equivelant package or port the libraries yourself. However, there are several cross-platform API's available, but despite that,you will still need to deal with the OS of choice and the GUI of choice. For MS, that is the Win95/98/NT environment and the quirks which come with each version and variant of those versions. DirectX would be your defacto library unless you are thinking of going custom. There is also PLIB, Crystal Space, and ClanLib. For Linux, you have the Linux operating system which is basically unix. You also have the GUI which is usually an X11 compatible X window server. Most likely XFree86 with window managers using either GTK, QT, Motif/Motiv, or something similar. Graphical libraries are more varied but are in various stages of development. You have PLIB, Crystal Space, ClanLib, as well as others. For you will have to deal with OS level and GUI level quirks between os's and platforms. Java gets around this by being more isolated from the hardware through abstraction. With all these little details, most people just want to program their game. For Windows users, MS VC/C++ seems to make sense and it does for most. For others, they seek packages which they feel will serve them better. Once again, it comes down to what you are comfortable with and where you plan on taking your code. For most, VC/C++ will do the trick. For others, they would prefer 3rd party IDE's and compilers like those from Metrowerks. Or opensource/gpl compilers like DJGPP(dos) GCC(*nix). Note: I'm leaving out IDE's like those from Sun MicroSystems or the Mac based compilers and the like since I'm not familiar with them or they are extremely expensive. Hope the above helps... C/C++ is the same regardless of OS. The syntax considered to be acceptable or correct will vary depending on the compiler you are using. (In this respect, Steve Jobs and MS agree.. 'think differently'.) The libraries will almost always be different between OS's and platforms unless there the library you are using is cross-platform. Have fun, Wing. ================================================================= The GameProgrammer.Com mailing list is for the open discussion of any topic related to the art, science, and business of programming games. This list is especially tolerant of beginners. We were all beginners once To SUBSCRIBE or UNSUBSCRIBE please visit: http://gameprogrammer.com/mailinglist.html
|
|