Sign in to follow this  
Norborb

Compiler question

Recommended Posts

Ok this question has been bothering me forever. I understand that to make a windows game you need a windows compilier. Now obviously windows is an OS. Ok, I also looked up console game development out of curiosity. I looked at this thing called Not Yaroze, the alternitive to Net Yaroze. Not Yaroze said you need an MIPS compilier to make games. Now I looked up MIPS. MIPS is a brand of processor. Now heres my question, Do compiliers compile for processors or Operating Systems... or BIOS's or whatever. Help me im really confused! I know I sound like a n00b, cause i am, but i checked the tutorials and their answer was hazy was best.

Share this post


Link to post
Share on other sites
Compilers compile code for either really. the core of the compiler will of course write code for that architure(x86,x64,mips,ect) but in order to run the code compiled on an os you will need to make it friendly to the os' application loader. this is usually done with librarys provided by your os(with a few exeption with windows). so your program will have to follow a system api to get it to run on say linux,windows, or mac os.

also not that with a few compilers you can compile code without linking using systems librarys and this is usually done to acually write an os. which is a very complicated process since you have to know your hardware inside and out down to the last device protocol.

bios come into play when you don't have an operating system. they provide.. well bios (basic input and output) to help stabalize the system. these provide very basic video,keyboard, and drive support.

for console development it pretty much depends on the concole you want to develope for. modern consoles like ps2 or xbox you will definatly need much more resources then just a compiler because the copy on the xbox can really piss you off and the 3d acceleration on both will cause problems because them by themselves contain there own ISA and or API. most developers use development kits provided by the company the company that manifacures the console. I dont know about ps2 but ps3 is supposed to have a graphics api really close to opengl. xbox of course uses directx(its microsoft what else would they use). making console games can be really hard unless you acually have the devkit supplied by the manifacure. which usually contains a compiler, and a good set of librarys, and a modified console.

Share this post


Link to post
Share on other sites
So what your saying is, the libraries i use determine what os my game runs on but my compilier determines what processor it will run on?

Share this post


Link to post
Share on other sites
pretty much. each processor has there own instruction set. and each os has there own librarys written for a processor. you can't just mix and match librarys though of course the library it self is written for that processor. if you look at the elf loader used in unix systems it makes more sense.

if you look at the GCC compiler you will notice that on its web site its ported for a large list of processors, all for a unix operating system. then you look at the ming32 compiler, its the same compiler but includes different librarys and is linked against the windows operating system instead of a unix based operating system.

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