C compiler for windows
C compiler for windows
Hi!
I am looking for a good C comliler for windows. Any suggestions.
I am looking for a good C comliler for windows. Any suggestions.
Thanks
<a href="http://k.domaindlx.com/nxrb/">Fahad</a>
<a href="http://k.domaindlx.com/nxrb/">Fahad</a>
- carbonBased
- Member
- Posts: 382
- Joined: Sat Nov 20, 2004 12:00 am
- Location: Wellesley, Ontario, Canada
- Contact:
Re: C compiler for windows
lcc-win32, mingw, cygwin, etc.
I've used cygwin and was impressed with it. Provides a nice posix(ish) shell, as well.
--Jeff
I've used cygwin and was impressed with it. Provides a nice posix(ish) shell, as well.
--Jeff
-
- Member
- Posts: 132
- Joined: Wed Nov 03, 2004 12:00 am
- Location: Austria
- Contact:
Re: C compiler for windows
for what kind of use ?
OOP , or osdev ?
OOP -> VC++,BorlandC++
osdev -> take the linux to windows ports
OOP , or osdev ?
OOP -> VC++,BorlandC++
osdev -> take the linux to windows ports
- carbonBased
- Member
- Posts: 382
- Joined: Sat Nov 20, 2004 12:00 am
- Location: Wellesley, Ontario, Canada
- Contact:
Re: C compiler for windows
I've used none of them for osDev (all my osDev has been on a unix box), but they are all fully capable. Technically speaking, so are the Borland and MS compilers, but I find there's more osDev related tools and information for GCC ports.
I would recommend not just a unix compiler, but an entire unix-like OS to build on (cygwin is great for windows users in this sense).
Why? The compiler is only one part. The other tools that unix provides are also very usefull to have when developing an OS.
--Jeff
I would recommend not just a unix compiler, but an entire unix-like OS to build on (cygwin is great for windows users in this sense).
Why? The compiler is only one part. The other tools that unix provides are also very usefull to have when developing an OS.
--Jeff
Re: C compiler for windows
VC++ (or intel, but that one costs -- expensive)
-
- Member
- Posts: 144
- Joined: Tue Oct 26, 2004 11:00 pm
- Location: Australia
Re: C compiler for windows
I use Dev-Cpp
It's pretty handy as an editor, but that's pretty much all I use it for.
For a compiler I use DJGPP which is a port of the gcc to windows. It's very handy.
I use NASM for my low level stuff. Every OSdever needs to know assembler (you can't get by without it unfortunately).
I use PARTCOPY to install my OS.
I use Bochs to test my OS. Bochs is a PC emulator which lets you run any OS ontop of windows or linux. It's not quite the same as a real pc, but you get the benefit of integrated debugging features which are ESSENTIAL for all OSdevers alike.
It's pretty handy as an editor, but that's pretty much all I use it for.
For a compiler I use DJGPP which is a port of the gcc to windows. It's very handy.
I use NASM for my low level stuff. Every OSdever needs to know assembler (you can't get by without it unfortunately).
I use PARTCOPY to install my OS.
I use Bochs to test my OS. Bochs is a PC emulator which lets you run any OS ontop of windows or linux. It's not quite the same as a real pc, but you get the benefit of integrated debugging features which are ESSENTIAL for all OSdevers alike.
Last edited by Da_Maestro on Tue Jan 03, 2006 12:00 am, edited 1 time in total.
Two things are infinite: The universe and human stupidity. But I'm not quite sure about the universe.
--- Albert Einstein
--- Albert Einstein
- kataklinger
- Member
- Posts: 381
- Joined: Fri Nov 04, 2005 12:00 am
- Location: Serbia
Re: C compiler for windows
MS compile with free VS 2005 Express Edition is good development enviroment. I was using MS at first but now I'm using Intel's compiler. Ther is option for NASM so it can generate VS style error messages.
About PARTCOPY: you cannot write on HDDs under Windows XP.
About PARTCOPY: you cannot write on HDDs under Windows XP.
Why can't it be OOP OS development? I'm using C++ for kernel.for what kind of use ?
OOP , or osdev ?
OOP -> VC++,BorlandC++
osdev -> take the linux to windows ports
-
- Member
- Posts: 144
- Joined: Tue Oct 26, 2004 11:00 pm
- Location: Australia
Re: C compiler for windows
About Partcopy:
I stick to using diskettes/disk images when developing
I don't want to risk having my hard disk corrupted when I write to the wrong sector
I stick to using diskettes/disk images when developing
I don't want to risk having my hard disk corrupted when I write to the wrong sector
Two things are infinite: The universe and human stupidity. But I'm not quite sure about the universe.
--- Albert Einstein
--- Albert Einstein
Re: C compiler for windows
not true, DJGPP is a 32bit compiler, running in a psudo-32bit environment emulated on a 16bit emulation, within a true 32bit windows environment:For a compiler I use DJGPP which is a port of the gcc to windows. It's very handy.
basicaly
windows tries very hard to provide a 16bit RMode environment, (within the normal 32bit environment) and convince DJGPP that it is alone in a 16bit environment,
then DJGPP tries very hard to break out of the protected environment windows has created for it, and create a 32bit environment (inside the 16bit environment) for GCC to run in (GCC is a 32bit program)
instead of simply running GCC natively within the existing true-32bit environment, it is running in a emulated-32bit environment, inside an emulated 16bit environment, inside a true 32bit environment
this extra complication and overhead (and the fact that it doesn't always work correctly under winXP) is why most people advise avoiding DJGPP
-
- Member
- Posts: 144
- Joined: Tue Oct 26, 2004 11:00 pm
- Location: Australia
Re: C compiler for windows
JAAman what are you takling about?
DJGPP uses the windows DPMI server to do all it's 32-bit programming. It is running in a true 32-bit environment when it executes. Just read the README files!
DJGPP uses the windows DPMI server to do all it's 32-bit programming. It is running in a true 32-bit environment when it executes. Just read the README files!
Two things are infinite: The universe and human stupidity. But I'm not quite sure about the universe.
--- Albert Einstein
--- Albert Einstein
Re: C compiler for windows
yes thats exactly my point
DPMI exist within a 16bit environment, DPMI has nothing to do with windows, it is part of windows 16bit emulation code (and was originally part of DOS)
DPMI is a method of allowing 32bit programs to run in a 16bit environment, any program running in a true 32bit environment will not use DPMI
DPMI exist within a 16bit environment, DPMI has nothing to do with windows, it is part of windows 16bit emulation code (and was originally part of DOS)
DPMI is a method of allowing 32bit programs to run in a 16bit environment, any program running in a true 32bit environment will not use DPMI
-
- Member
- Posts: 144
- Joined: Tue Oct 26, 2004 11:00 pm
- Location: Australia
Re: C compiler for windows
No that's not how DPMI works.
DPMI is a library suite/set of system calls that are used to either:
1. Create a 32-bit environment on top of a 16-bit environment for protected mode apps (DOS)
2. Break out of a 16-bit emulated environment and run instead in a DPMI controlled 32-bit environment.
DJGPP running on windows (any version 9x and above) uses option 2. Windows has an integrated DPMI server. When a program running in 16-bit VM86 mode calls the DPMI interface, Windows will turn off VM86 and start the program in DPMI mode.
One thing you should note is that DPMI is NOT an emulator. It is a protected mode interface. It can interface with a pre-created environment (windows) or you can have a server (such as CWSDPMI) to create a 32-bit environment for the app to run in.
Last note: Another kind of protected mode interface, called Go32, was abandoned for this very reason. It would only ever create a protected mode interface. Running Go32 programs in windows causes them to crash (unless you are using one of the later versions, which uses DPMI to emulate Go32). They crash because they are doing exactly what you say DPMI does (which it doesn't). Why is it impossible to create a 32-bit environemnt inside VM86? The intel docs have than answer (look at the differences between real mode and VM86 mode)
It is possible to emulate a 32-bit environment inside a 16-bit environment inside a 32-bit environment. Use Bochs
DPMI is a library suite/set of system calls that are used to either:
1. Create a 32-bit environment on top of a 16-bit environment for protected mode apps (DOS)
2. Break out of a 16-bit emulated environment and run instead in a DPMI controlled 32-bit environment.
DJGPP running on windows (any version 9x and above) uses option 2. Windows has an integrated DPMI server. When a program running in 16-bit VM86 mode calls the DPMI interface, Windows will turn off VM86 and start the program in DPMI mode.
One thing you should note is that DPMI is NOT an emulator. It is a protected mode interface. It can interface with a pre-created environment (windows) or you can have a server (such as CWSDPMI) to create a 32-bit environment for the app to run in.
Last note: Another kind of protected mode interface, called Go32, was abandoned for this very reason. It would only ever create a protected mode interface. Running Go32 programs in windows causes them to crash (unless you are using one of the later versions, which uses DPMI to emulate Go32). They crash because they are doing exactly what you say DPMI does (which it doesn't). Why is it impossible to create a 32-bit environemnt inside VM86? The intel docs have than answer (look at the differences between real mode and VM86 mode)
It is possible to emulate a 32-bit environment inside a 16-bit environment inside a 32-bit environment. Use Bochs
Last edited by Da_Maestro on Fri Jan 06, 2006 12:00 am, edited 2 times in total.
Two things are infinite: The universe and human stupidity. But I'm not quite sure about the universe.
--- Albert Einstein
--- Albert Einstein
- kataklinger
- Member
- Posts: 381
- Joined: Fri Nov 04, 2005 12:00 am
- Location: Serbia
Re: C compiler for windows
He jus says that. It works in 32bit env. on top of 16bit dos box on 32bit operating system
So it looks like this 32->16->32! It is little too much.
So it looks like this 32->16->32! It is little too much.
-
- Member
- Posts: 144
- Joined: Tue Oct 26, 2004 11:00 pm
- Location: Australia
Re: C compiler for windows
no no
DPMI on windows works like this:
1. 16-bit program starts
2. 16-bit program makes call to DPMI interface to start 32-bit mode
3. windows pulls program out of 16-bit mode altogether and restarts it in DPMI mode
so infact DPMI does this:
32->32
yes there is a little bit of emulation in there, but there is no 16-bit code involved.
When DPMI is running on DOS, the story is different. Since DOS doesn't have 32-bit mode, the DPMI server (usually CWSDPMI) handles everything.
DPMI on DOS looks like this:
16->32
DPMI on windows works like this:
1. 16-bit program starts
2. 16-bit program makes call to DPMI interface to start 32-bit mode
3. windows pulls program out of 16-bit mode altogether and restarts it in DPMI mode
so infact DPMI does this:
32->32
yes there is a little bit of emulation in there, but there is no 16-bit code involved.
When DPMI is running on DOS, the story is different. Since DOS doesn't have 32-bit mode, the DPMI server (usually CWSDPMI) handles everything.
DPMI on DOS looks like this:
16->32
Two things are infinite: The universe and human stupidity. But I'm not quite sure about the universe.
--- Albert Einstein
--- Albert Einstein