Installing the C++ Addon [message #81054] |
Wed, 24 September 2003 21:11  |
Eclipse User |
|
|
|
Originally posted by: fhatfull64.hotmail.com
Hey all.
I know it sounds pretty basic, but I'm confused as to how to install the
C++ tool into eclipse. Ive programmed 3 times in C++ before at school, but
there were no free compilers I could find except for Eclipse. I downloaded
2.1 yesterday, and I just downloaded the C++ addon. How to I install it?
Thanks!
-Fred
|
|
|
|
|
Re: Installing the C++ Addon [message #81260 is a reply to message #81111] |
Fri, 26 September 2003 15:41  |
Eclipse User |
|
|
|
I have to say the same like Doug.
But some little "bugs" found while flying over the tutorial.
The "Hello World" thing misses either "using namespace std;" after the
iostream-include or you have to use std::cout, std::cerr, std::cin and
std::endl.
When compiling C++ files/projects, use the g++ instead of gcc.
Only use gcc when doing C-only projects.
The point is, that g++ also has the stdc++ library path set internally
and usually compiling C++ files with gcc gives errors on not found
symbols. You could also use 'ld' for linking
Your target is main, but you want to delete main.exe!
Though under Windows the target is main.exe.
You use $(MAKE) as var, but gcc not. You could define it like this:
(Actually in GNU make its default, I think)
---
# C compiler and compiler flags
CC = gcc
CFLAGS = -g
# C++ compiler and compiler flags
CXX = g++
CXXFLAGS = -IC:\MinGW\include
# linker flags
LDFLAGS = -lstdc++
C_DEBUG = -g
RM = del /S /Q
..PHONY: all debug clean
..DEFAULT: all
all:
$(MAKE) main
debug:
$(MAKE) "CXXFLAGS+= $(C_DEBUG)" main
clean:
-$(RM) main.exe main.o
main.exe : main.o
$(CXX) -o $@ $^ $(LDFLAGS)
main.o : main.cpp
$(CXX) $(CXXFLAGS) -o $@ -c $<
---
David Scuse wrote:
> Take a look at the last tutorial (it deals with installing CDT under
> Windows)
> at our website www.cs.umanitoba.ca/~eclipse.
> David Scuse
>
> "Fred" <fhatfull64@hotmail.com> wrote in message
> news:bktfch$udm$1@eclipse.org...
>
|
|
|
Powered by
FUDForum. Page generated in 0.02985 seconds