Compiling Programs

Please support our C++ advertiser: Intel Parallel Studio Home
Reply

Join Date: Nov 2004
Posts: 1
Reputation: overclocking is an unknown quantity at this point 
Solved Threads: 0
overclocking overclocking is offline Offline
Newbie Poster

Re: Compiling Programs

 
0
  #11
Nov 8th, 2004
i too would like to know how to use these compilers. i used a tutorial i found on called yabasic and it is a good start. i have some things i want to compile so i downloaded visual c++ free for my xp platform. i cant figure out how to use it and execute my simple code im working on. It doesnt help that they dont include newbie instructions anyone know how to run code on v++ ??

thanks
jeff
Reply With Quote Quick reply to this message  
Join Date: Oct 2004
Posts: 67
Reputation: N3wbi3C0d3r is an unknown quantity at this point 
Solved Threads: 0
N3wbi3C0d3r's Avatar
N3wbi3C0d3r N3wbi3C0d3r is offline Offline
Junior Poster in Training

Re: Compiling Programs

 
0
  #12
Nov 9th, 2004
A GREAT free C/C++ Compiler is Dev C++ 4.9.9.0, i love it, its great!
I beleive in Technology is the future, and thats were I want to be.
Reply With Quote Quick reply to this message  
Join Date: Nov 2004
Posts: 1
Reputation: Stoev is an unknown quantity at this point 
Solved Threads: 0
Stoev Stoev is offline Offline
Newbie Poster

Re: Compiling Programs

 
0
  #13
Nov 21st, 2004
Originally Posted by N3wbi3C0d3r
A GREAT free C/C++ Compiler is Dev C++ 4.9.9.0, i love it, its great!
Yes it is a quite good compiler and I also use it. However it has some flaws. It can't compile code, that tries to enter vga mode.
Reply With Quote Quick reply to this message  
Join Date: Nov 2004
Posts: 6,143
Reputation: jwenting is just really nice jwenting is just really nice jwenting is just really nice jwenting is just really nice 
Solved Threads: 212
Team Colleague
jwenting's Avatar
jwenting jwenting is offline Offline
duckman

Re: Compiling Programs

 
0
  #14
Nov 23rd, 2004
Originally Posted by marvis4life
FireNet,
i've got it. but have not known how to use it. it's always giving the message:
Failed to locate protected mode loader (DPMILOAD.EXE).
can u put me thru. in using it?
thanks.
That sounds like a DOS compiler wanting to switch to DOS protected mode.
What are you using? Borland C++ 3.0?
Get the latest Borland C++ Builder (there's a free version) instead, it will do both GUI and command line Windows applications.

As to restrictions: it comes with less components for building systems by click and drag and doesn't allow commercial distribution of the created software.
Neither is a restriction when learning the language and the missing components aren't things typically used in freeware stuff either (most deal with relational databases, CGI programming for webservers, and highend stuff like that).
Reply With Quote Quick reply to this message  
Join Date: Mar 2005
Posts: 170
Reputation: TkTkorrovi is on a distinguished road 
Solved Threads: 11
TkTkorrovi's Avatar
TkTkorrovi TkTkorrovi is offline Offline
Junior Poster

Re: Compiling Programs

 
0
  #15
Mar 6th, 2005
Hi!

I usually use mingw http://www.mingw.org, as this uses a linux compiler gcc, and is therefore very reliable and complies to standards more than any other. It is easier to work with bigger projects using command line, and not so much rubbish files either. I use a vim editor http://www.vim.org, in insert mode it works almost like notepad, but it is useful for so many things. First, it enables to run programs from within editor, which is useful among other things because that way you can run programs in the directory where you are, as windows explorer doesn't change the directory of the shell, it usually remains c:\. And then, to compile, say you use makefile, then you may write a bat file like build.bat, with a command like this: redir -e make.txt mingw32-make -f makefile, of course you can tell vim to run that for compiler as well. Or you can write there the compile command directly, makefile is something like:

  1. CC = gcc
  2. CFLAGS = -W -Wall -O3 -mno-cygwin -std=c89
  3. -mms-bitfields -std=c89
  4. LDFLAGS = -s -mwindows
  5. TARGET = something.exe
  6. OBJ = something.o Rsrc.o
  7. all: $(TARGET)
  8. Rsrc.o: Rsrc.rc
  9. windres -o Rsrc.o Rsrc.rc
  10. $(TARGET): $(OBJ)
  11. $(CC) $(LDFLAGS) -o $(TARGET) $(OBJ)
  12. Rsrc.o: Rsrc.rc
  13. something.o: something.c something.h

Or there are many ways. But important here is that make.txt, as that command redirects the error messages there. And here comes onother thing the vim is useful for, write :cfile make.txt, and then every :cnext brings you to another error, in whatever file it is, comes also easily out jus by : and up arrow. And yes, mingw can certainly compile programs which use graphics, also opengl. But then it's better if you use gtk http://www.gtk.org for that, not windows api, as this enables you to write portable programs, which can be compiled on linux as well. And of course all these things are freely downloadable, even more they are open source, and mingw is even public domain. I guess you don't think the compiler linux was written in is too restricted, believe me these are reliable things, good tools for good programmers. I could say quality tools, but this is more about advertising commercial products, often with not so high quality as it is said. And they are not made only by enthusiasts, also by universities and private companies.
Reply With Quote Quick reply to this message  
Join Date: Mar 2005
Posts: 170
Reputation: TkTkorrovi is on a distinguished road 
Solved Threads: 11
TkTkorrovi's Avatar
TkTkorrovi TkTkorrovi is offline Offline
Junior Poster

Re: Compiling Programs

 
0
  #16
Mar 6th, 2005
As a reply to the previous post, mingw is public domain, other things are at least glpl, so you can not only use them for free, but also write a commercial programs with them, and sell these programs, without paying anything to anybody.

About installing mingw, in case you don't know, it's easy, just download it and run the installer. But then, say you use windows 2000 or xp, go to start > settings > control panel > system > advanced > environment variables. There is a box called user variables. See if there is a variable PATH, if there is, press edit, otherwise press new and create that variable. This is a set of paths separated by semicolon, the path you should add there is \mingw\bin, if you installed mingw under the directory \mingw. Press OK everywhere, and the settings change immediately, you don't have to reboot. Now when you run gcc on start > run > cmd, or :!gcc from within vim, the gcc says "no input files" then the mingw works, get some snippets here, compile and run them. That's it, not so very complicated. And you don't need any commercial compilers or ide-s.
Reply With Quote Quick reply to this message  
Join Date: Mar 2005
Posts: 13
Reputation: wbk is an unknown quantity at this point 
Solved Threads: 0
wbk wbk is offline Offline
Newbie Poster

Re: Compiling Programs

 
0
  #17
Mar 16th, 2005
Originally Posted by TkTkorrovi
Hi!

I usually use mingw http://www.mingw.org, as this uses a linux compiler gcc,
mingw has nothing to do with linux whatsoever.

and is therefore very reliable and complies to standards more than any other.
it complies with a 16-year old version of the ANSI C standard, but that's about it.
Reply With Quote Quick reply to this message  
Join Date: Mar 2005
Posts: 170
Reputation: TkTkorrovi is on a distinguished road 
Solved Threads: 11
TkTkorrovi's Avatar
TkTkorrovi TkTkorrovi is offline Offline
Junior Poster

Re: Compiling Programs

 
0
  #18
Mar 16th, 2005
Well, I called gcc (http://gcc.gnu.org/) a linux
compiler because it is mostly used on linux, it is the
most often used compiler on linux. See about c standards
http://www.cse.ohio-state.edu/cgi-bi.../gcc,Standards,
also compiles c++, java, fortran and ada. MingW is gcc compiler
ported to Windows, and libraries. The c and c++ libraries for
gcc are complete, but the posix (unix standard) libraries
are only partially implemented. On Windows, cygwin should
be used for full posix support, but this needs a cygwin dll
file for programs to run. BTW, dev-c++ mentioned here, uses
mingw as well, you can also use gcc on command line, when you
have dev-c++. There are also several other ide-s for mingw,
or which can be used with mingw, like visual-mingw, relo,
vide (based on vim), and red hat source navigator (available
on mingw download page).
Reply With Quote Quick reply to this message  
Join Date: May 2005
Posts: 13
Reputation: rghai6 is an unknown quantity at this point 
Solved Threads: 0
rghai6 rghai6 is offline Offline
Newbie Poster

Re: Compiling Programs

 
0
  #19
May 30th, 2005
nice post csgal.
really helped
Reply With Quote Quick reply to this message  
Join Date: Mar 2005
Posts: 9
Reputation: tamilblast is an unknown quantity at this point 
Solved Threads: 0
tamilblast tamilblast is offline Offline
Newbie Poster

Re: Compiling Programs

 
0
  #20
Jun 24th, 2005
nerds... :rolleyes:
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the C++ Forum
Thread Tools Search this Thread



Tag cloud for C++
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC