[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: how to build multiple files program with gcc, cygwin?
From: |
Ulrich Eckhardt |
Subject: |
Re: how to build multiple files program with gcc, cygwin? |
Date: |
Sun, 12 Nov 2006 05:08:42 +0100 |
User-agent: |
KNode/0.10.4 |
nvinhphu@gmail.com wrote:
> I would like to build a C++ program using g++ compiler. However, I do
> not know how to compile several files without using an IDE.
g++ $(CXXFLAGS) -c file1.cpp
g++ $(CXXFLAGS) -c file2.cpp
g++ $(LDFLAGS) -o program file1.o file2.o
You'd be better off using a makefile though.
> My questions are:
> 1. Is there any IDE with g++ compiler for Windows? If any, it is free
> or not? :-)
DevC++ is one IDE, though I don't know if it works with Cygwin or just
native win32. Other IDEs might exist and work for Cygwin like kdevelop or
anjuta.
> 2. If no, I could use emacs, for example, to write the code. How to
> compile the code then?
Well, use the compiler. Oh, and emacs will also help you write makefiles.
Uli
--
http://gcc.gnu.org/faq.html
http://parashift.com/c++-faq-lite/