• Create Account

## FREE win32 C++ compiler?

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

18 replies to this topic

### #1Zeb  Members

Posted 23 June 2001 - 08:28 PM

Can anyone tell me where to find a free compiler? This is the main issue, I''m broke and I don''t think I can learn a language without having the capability of using it. Also, and this may be a bit stupid... I know *nothing* about C++, other than the fact that it''s what the pros use, so I should use it too... and one of the articles for beginners here said I should start by learning it with DOS, to avoid the complications of Windows... but the same article said Windows is what to use if you want a lot of people to see your game... So, I want to start out with Windows which I''ll ultimately be using anyway and just learn it, because learning with DOS which I''ll never need is a complication itself, why circumnavigate my goal? Is this a bad idea? Is Windows *way* more complicated than DOS? I know as a newbie I shouldn''t try to tackle too much or I''ll never get anything done, but I don''t think I''m being impatient, I think I''m just being efficient & logical... what do you think? Z e L b u l v o n

### #2Zeb  Members

Posted 23 June 2001 - 08:38 PM

PS, can someone tell me how to preserve the spacing of my signature, and maybe add colors? Yes, I''m trying to learn C++ when I can''t even remember simple HTML... you wanna make sumfin uv it?

Z
e
L b
u
l v
o
n

Posted 23 June 2001 - 08:48 PM

Well I think so the right path to windows programming is throught learning c++ in dos. Windows is not tough but it builds on the concepts u learn in c++ in dos. dos programmes work sequentially while windows programmes waits for the event(mouse handling or keys or pressing the buttons etc..) but it still uses those c++ basic concepts. so get ur self in c++ first. And once u r good at it shifting towards windows is not difficult. I havent seen ne body going for win32 progamming directly at least in my life.

Ur question abt the compiler is a very interesting one. search on the net. search on google .I myself use VC so dont know abt other free compilers.

so dont get hasty. just work on c++. be THE expert in vc. it will help u ne where . it will help u learn java, win32 programming, other microsoft technologies like COM, MTS name ne thing. Name ne thing n u can learn IF U KNOW C++.

LUQI
"Only two things are infinite, the universe and human stupidity, and I''m not sure about the former." - Albert Einstein

### #4lucid  Members

Posted 23 June 2001 - 09:01 PM

most people who use free compilers use either borland or one of the gcc related ones...

check out borlands free compiler...
http://www.borland.com/bcppbuilder/freecompiler/

as for the gcc related ones...
search for DevC++ its one of them(used it for a while, interface that is similar to VC++, but there are more, just look around at a download site... search for gcc or something...

Posted 23 June 2001 - 09:15 PM

First: The free compiler
Borland offers its old IDE''s (a program that manages an entire project, often it also lets you do specific tasks more easily, like drawing windows) as a free download on www.borland.com , in the "museum" departement. They also have the compiler of their newest IDE as a free download, here you can download only the compiler. This is what I use (I speak plain C though, and I don''t use the win32 api, so I don''t need their expensive IDE).

Second: What to learn first
I think you''d better start off with console applications, apps that run in a DOS box. It keeps your mind on programming, you can always add an interface later (if the program is structured enough!!).

Third: What to do when I know C++ in a DOS box
Here you got quite a few options, you can go right into win32 programming, or you can learn a specific graphics library like OpenGL or directX. With OpenGL, you can use Glut, which is a wrapper around the basic input functions of the os. The main advantage is that you don''t need to mess around with hundreds of lines of code just to read mouse and keyboard, or to create your windows and make them ready for drawing. The disadvantage then is that it''s slightly slower.

Hope it helps...
Wouter

### #6Dactylos  Members

Posted 23 June 2001 - 09:30 PM

The main gcc (Gnu Compiler Collection) ports for Win32 are MinGW32 (Minimalist Gnu for Win32) and Cygwin (Cygnus Win-something-something).

As for your whitespace-in-signature question: Either use non-breakable spaces, written in html as: "&nbsp;" (not including the quotation marks). Or you can enclose your sig in a <pre> and </pre> pair ("pre" is for "preformatted text"). There are probably a few more ways to do it, but I don''t know very much html.

### #7Rottbott  Members

Posted 23 June 2001 - 10:08 PM

www.bloodshed.net have an excellent IDE which (I believe) uses the MingW compiler, or a port of it or something. That''s what I use.

Rottbott

### #8Null and Void  Members

Posted 23 June 2001 - 11:10 PM

quote:
Original post by Zeb
Also, and this may be a bit stupid... I know *nothing* about C++, other than the fact that it''s what the pros use, so I should use it too... and one of the articles for beginners here said I should start by learning it with DOS, to avoid the complications of Windows... but the same article said Windows is what to use if you want a lot of people to see your game... So, I want to start out with Windows which I''ll ultimately be using anyway and just learn it, because learning with DOS which I''ll never need is a complication itself, why circumnavigate my goal? Is this a bad idea? Is Windows *way* more complicated than DOS? I know as a newbie I shouldn''t try to tackle too much or I''ll never get anything done, but I don''t think I''m being impatient, I think I''m just being efficient & logical... what do you think?

As has been pointed out, DevC++ is an excellent free IDE that uses the MinGW32 port of GCC. You can download it at bloodshed.net.

Next: Don''t learn C/C++ for DOS. Learn standard C/C++, which just happens to be in a console. After you know the language, then you should learn the Win32 API. Otherwise you''ll just be confused, since the Win32 API expects you to already know how to use C/C++.

[Resist Windows XP''s Invasive Production Activation Technology!]

### #9Zeb  Members

Posted 27 June 2001 - 06:12 AM

Ok, I got my sig spaced properly, thanx for the 'pre' tag, Dactylos

I downloaded Dev-C++, for lack of a more definitive reason, kuz I don't care for the name "Borland". It looks like it has a tutorial, which I'm about to look at once I'm done writing this.

Null and Void (I love your handle, BTW), Dev-C++ says it can do console, windows, and DLL apps, and maybe some others. What are the distinctions between these? What does console mean exactly, and can a console app run in Windows, without DOS?

How long does it take people, on average, to learn the C++ language? Will it take me longer since I'm so confused on the fundamentals?

Tassadar wrote: "I think you'd better start off with console applications, apps that run in a DOS box. It keeps your mind on programming, you can always add an interface later (if the program is structured enough!!)."

So... console apps... don't have an interface? Not even text?

Tassadar also wrote: "you can go right into win32 programming, or you can learn a specific graphics library like OpenGL or directX."

OpenGL or directX? Is or the operative word, or can you use both?

Ahmad Luqman wrote: "dos programmes work sequentially while windows programmes waits for the event(mouse handling or keys or pressing the buttons etc..) but it still uses those c++ basic concepts."

Ok, umm... I used to use QBasic a little, and it had something called Inkey$, which let my programs respond to keystrokes (only I'd hardly call the things I made "programs"). QBasic ran in DOS, but it had Inkey$... so are QBasic files DOS programs or Windows Programs?

There were a bunch of words people used that I wanted deffinitions to, but I can't seem to find them now... API? I think I saw a def of API in the dictionary of this site, but it didn't make sense. Ok, API, console, I guess that's all

Oh, I just wanna say how rad I think this community is, and how grateful I am to have found it ~happy tears~
 Z  eL b ul vo nColin Powell - "Finding the Russian scientists maybe a problem being that Russia does not have a SocialSecurity System, as here in America, that allows us tomonitor, track down and capture an American citizen."

Edited by - Zeb on June 27, 2001 2:00:06 PM

### #10Julio  Members

Posted 27 June 2001 - 06:24 AM

for learning purposes, I would highly recomend DJGPP. just search for it on any search engine and you''ll find it''s homepage. It''s dos-based, but that means you don''t have to mess around with all that windows code. then, once you get a hang of the language, you can get something like dev-c++ or a similar compiler. I would recomend something more supported, however, like vc++ or borland.

HHSDrum@yahoo.com

### #11Kwizatz  Members

Posted 27 June 2001 - 06:37 AM

I think there is enought said, bloodsheed is a good Ide, but my personal pick is MingW32 in conjunction with XEmacs because XEmacs is the same thing you use in Linux (if eventualy you want to move to a real OS) and porting mingw32 to crosscompile on linux is a matter of running a script, so you could (I do sometimes) develop for windows from linux, and you get familiar with how things are done in Linux, I have to say, I saw VC++ crash many times, Emacs or XEmacs has NEVER crashed on me, and I run in in windows too!

I am currently developing a game with this combination, and is quite good for me. (yes you can compile directx apps with mingw32 -ftable-thunks )

see ya, contact me if you need any help setting them up.

Edited by - kwizatz on June 27, 2001 1:38:41 PM

Edited by - kwizatz on June 27, 2001 1:51:10 PM

Posted 27 June 2001 - 06:45 AM

quote:
So... console apps... don''t have an interface? Not even text?

They can do simple in- and output, but if you want to have more control than what text strings alone can offer, you''d either have to write (complex) functions to directly read and write from system devices, like the mouse or SVGA card, or you can use the I/O functions of a more advanced API, and then you''ll no longer need the console.

quote:
OpenGL or directX? Is or the operative word, or can you use both?

Usually you use one of the two, but DirectX can be used to set up a fullscreen OpenGL window IIRC, I don''t use directX, it''s too much C++ and I just use plain C.
OpenGL only offers output to the screen, input can be done with GLUT or with win32, or even DirectInput, sound can be done with DirectSound or win32 PlaySound function. In other words, DirectX is a combination of API''s for different purposes, OpenGL is only used for drawing.

I''m sorry if I didn''t make myself clear enough the first time...
Wouter

### #13merlin9x9  Members

Posted 27 June 2001 - 06:50 AM

Null and Void, I thank you once again for being one of the only people around here intelligent enough to recognize that console != DOS.

### #14Zeb  Members

Posted 27 June 2001 - 12:02 PM

quote:
"OpenGL or directX? Is or the operative word, or can you use both?"
Tassadar: Usually you use one of the two, but DirectX can be used to set up a fullscreen OpenGL window IIRC
What does IIRC mean?

quote:
I'm sorry if I didn't make myself clear enough the first time... Wouter
No time for sorrow,
save it for 'morrow

I just made that up, I must be subconsiously plagerizing someone

quote:
Merlin9x9: Null and Void, I thank you once again for being one of the only people around here intelligent enough to recognize that console != DOS.
N&V does seem very intelligent to me too "!=" means "does not equal"? Damn, I can't find a slashed equal sign in the character map

 Z  eL b ul vo nColin Powell - "Finding the Russian scientists may be a problem beingthat Russia does not have a Social Security System, as here in America,that allows us to monitor, track down and capture an American citizen."

Edited by - Zeb on June 27, 2001 7:48:42 PM

### #15Silent  Members

Posted 27 June 2001 - 12:25 PM

I would recommend buying C++ How To Program 3rd edition by Deitel & Deitel and using the Intro edition of VC++ on the CD. Borland C++ 5.5 can be downloaded at borland.com (like others said). As far as it being better to learn C++ in DOS, that''s complete bull sorry. You will learn C++ much better with a 32bit compiler and making mainly apps for the Win32 console.

### #16Dactylos  Members

Posted 27 June 2001 - 12:27 PM

IIRC = "If I Recall Correctly"

API = "Application Programming Interface", basically a term for reffering to a library of related functions (ex: DirectDraw is a 2d graphics API; Winsock is a networking API; etc...)

And yes, != means "not equal", its the C/C++ way of writing it.

Tassadar: You should not use DirectX to setup a surface for OpenGL rendering. This might work on some drivers, but it's not reliable, since some OpenGL drivers might use DirectDraw internally to manage a framebuffer, so the OpenGL driver would be confused by you using DirectDraw too, and could crash (at least this is the reason I've heard). There is also no real reason for using DirectDraw to setup a surface for OpenGL, ChangeDisplaySettings should be used for making an OpenGL app fullscreen.

Sorry for getting a bit off topic, I just wanted to clarify this a little

Edited by - Dactylos on June 27, 2001 7:28:58 PM

### #17Dactylos  Members

Posted 27 June 2001 - 12:44 PM

Difference between console/windowed apps/dlls etc.

Console apps run in a console window (the kind of window many people (incorrectly) refer to as a DOS-box). These are not DOS programs. They need windows 95+ to run (though they generally don't need the GUI (=Graphical User Interface)). These programs are text-based.

Windowed apps are the "standard" windows applications. They open a window (or many windows) containing a user interface (GUI).

A DLL (=Dynamic Link Library) is not directly executed. Instead programs can call functions in them (provided that the function is 'exported' from the DLL and the calling program 'links' to the function in the DLL). They are used for storing common code that many programs can use, or simply for dividing a large program into smaller more manageable parts.

Then there are hybrids between the above. For example a console app can open a window just like a windowed app; and a windowed app can open a console to write to. Programs can also call functions in other EXE files (just like calling a function in a DLL). You shouldn't worry about this at this early stage though. I'm probably just confusing you, so ignore this paragraph

These are probably not very good explanations, if you don't understand what I mean, or if you would like a more elaborate description of something, then don't hesitate to ask.

Edited by - Dactylos on June 27, 2001 7:47:08 PM

### #18Zeb  Members

Posted 27 June 2001 - 01:21 PM

quote:
Dactylos:Then there are hybrids between the above. For example a console app can open a window just like a windowed app; and a windowed app can open a console to write to. Programs can also call functions in other EXE files (just like calling a function in a DLL). You shouldn''t worry about this at this early stage though. I''m probably just confusing you, so ignore this paragraph

No way Jose I think it makes sense. I''m worrying about whether or not it''s possible to do 3d graphics with curved space at this early stage, it''s in my nature to worry about the future So... if functions can be called in other EXEs... then the purpose of DLLs is to prevent the user from executing a partial program and screwing things up, yes?

 Z  eL b ul vo nColin Powell - "Finding the Russian scientists may be a problem beingthat Russia does not have a Social Security System, as here in America,that allows us to monitor, track down and capture an American citizen."

### #19Kwizatz  Members

Posted 28 June 2001 - 06:54 AM

No, the purpose of DLL''s is to have many programs use the same functions without wasting more space in your hard drive, also its purpose is to have reusable code, and being able to upgrade functions without having to recompile the whole executable, just the function library.

you can only call functions from another executable (EXE) IF that function was declared as __declspec(dllexport) or you defined it as EXPORT in a DEF File, this is not a default so forget about using functions from comercial programs unless they are in DLL''s, on the other hand if you are going to code a EXE with exported functions . . . why code it as a EXE? make it a DLL, the only valid option for this is if you want to code some app with SetWindowsHookEx and you dont want to bother writting the DLL you need to attach the hook to.

See ya.

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.