LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Help with Eclipse ! I have installed but it is not compiling properly (https://www.linuxquestions.org/questions/linux-software-2/help-with-eclipse-i-have-installed-but-it-is-not-compiling-properly-736788/)

PeterUK 06-30-2009 05:05 PM

Help with Eclipse ! I have installed but it is not compiling properly
 
I have installed Eclipse onto Debian and it open fine, I have read all regarding compiling I have made sure that all the package are install but it does not compile properly

Before jumping into code I would like to add that I have gone to the Terminal and Compile the file using g++ and it works. I don't know why eclipse that is using the g++ too is not working

This is the code I am trying to compile

Quote:

#include <iostream>
using namespace std;
int main()
{
cout << "!!!Hello World!!! << endl ;
return 0;
}
This is the error

Quote:

this is the error
Error (3 items)
endl was not declared in this scope
make:*** src/Try.o Error 1
cout was not declared in this scope
Warning (1 item)
iostrem: No such file or directorv
here is the make file
Quote:

################################################################################
# Automatically-generated file. Do not edit!
################################################################################

-include ../makefile.init

RM := rm -rf

# All of the sources participating in the build are defined here
-include sources.mk
-include subdir.mk
-include src/subdir.mk
-include objects.mk

ifneq ($(MAKECMDGOALS),clean)
ifneq ($(strip $(C_DEPS)),)
-include $(C_DEPS)
endif
ifneq ($(strip $(CXX_DEPS)),)
-include $(CXX_DEPS)
endif
ifneq ($(strip $(CPP_DEPS)),)
-include $(CPP_DEPS)
endif
ifneq ($(strip $(CC_DEPS)),)
-include $(CC_DEPS)
endif
ifneq ($(strip $(C_UPPER_DEPS)),)
-include $(C_UPPER_DEPS)
endif
ifneq ($(strip $(C++_DEPS)),)
-include $(C++_DEPS)
endif
endif

-include ../makefile.defs

# Add inputs and outputs from these tool invocations to the build variables

# All Target
all: Try

# Tool invocations
Try: $(OBJS) $(USER_OBJS)
@echo 'Building target: $@'
@echo 'Invoking: GCC C++ Linker'
g++ -o"Try" $(OBJS) $(USER_OBJS) $(LIBS)
@echo 'Finished building target: $@'
@echo ' '

# Other Targets
clean:
-$(RM) $(C_DEPS)$(CXX_DEPS)$(CPP_DEPS)$(OBJS)$(CC_DEPS)$(EXECUTABLES)$(C_UPPER_DEPS)$(C++_DEPS) Try
-@echo ' '

.PHONY: all clean dependents
.SECONDARY:

-include ../makefile.targets
This is the console display
Quote:

**** Build of configuration Debug for project Try ****

make all
Building file: ../src/Try.cpp
Invoking: GCC C++ Compiler
g++ -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"src/Try.d" -MT"src/Try.d" -o"src/Try.o" "../src/Try.cpp"
../src/Try.cpp:9:20: warning: iostream: No such file or directory
../src/Try.cpp: In function 'int main()':
../src/Try.cpp:13: error: 'cout' was not declared in this scope
../src/Try.cpp:13: error: 'endl' was not declared in this scope

make: *** [src/Try.o] Error 1
Thank you in advance for your help

jdkaye 07-01-2009 10:15 AM

Does this help?
http://www.cis.upenn.edu/~matuszek/c...g-eclipse.html
cheers,
jdk

PeterUK 07-02-2009 09:52 AM

Quote:

Originally Posted by jdkaye (Post 3593068)

No really! that is for a Java project, if you see I am trying to use c++, never mind I try but the java option in the project menu does not appear

Regards,


All times are GMT -5. The time now is 08:40 AM.