| | |
Compiling Programs
Please support our C++ advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Nov 2004
Posts: 1
Reputation:
Solved Threads: 0
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
anyone know how to run code on v++ ??thanks
jeff
•
•
•
•
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.
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).
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:
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.
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:
C++ Syntax (Toggle Plain Text)
CC = gcc CFLAGS = -W -Wall -O3 -mno-cygwin -std=c89 -mms-bitfields -std=c89 LDFLAGS = -s -mwindows TARGET = something.exe OBJ = something.o Rsrc.o all: $(TARGET) Rsrc.o: Rsrc.rc windres -o Rsrc.o Rsrc.rc $(TARGET): $(OBJ) $(CC) $(LDFLAGS) -o $(TARGET) $(OBJ) Rsrc.o: Rsrc.rc 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.
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.
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.
•
•
Join Date: Mar 2005
Posts: 13
Reputation:
Solved Threads: 0
•
•
•
•
Originally Posted by TkTkorrovi
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.
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).
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).
![]() |
Similar Threads
- Visual C++ 08 Express compiling issues... (C++)
- compiling source for windows (Computer Science)
- what OS to use? (Getting Started and Choosing a Distro)
Other Threads in the C++ Forum
- Previous Thread: need Homework help
- Next Thread: C++ char array parsing-Help
| Thread Tools | Search this Thread |
Tag cloud for C++
api application array arrays assignment beginner binary bitmap c++ c/c++ calculator char char* class classes code coding compile compiler console conversion convert count data database delete developer display dll email encryption error file forms fstream function functions game generator getline givemetehcodez graph homeworkhelper iamthwee ifstream image input int java lazy lib loop looping loops map math matrix memory multidimensional multiple newbie news node number numbertoword output parameter pointer problem program programming project proxy python random read recursion recursive reference return sorting string strings struct template templates text tree url variable vector video visual visualstudio win32 windows winsock word wordfrequency wxwidgets






