Error : Unknown on compilation

  • From: "deep2sunny" < >
  • To:
  • Subject: Error : Unknown on compilation
  • Date: Fri, 24 Aug 2012 15:50:16 -0400

I've configured the C/C++ plugin correctly and still getting an error on a 
simple program.

1. New C/C++ project, create C++ Application and then i created a new file in 
C++ source.
2. My program 


Code:
#include <iostream.h>
using namespace std;

int main()
{
    cout << "Hello";
    return 0;   
}





3. Error


Code:
"/usr/bin/make" -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS= .build-conf
make[1]: Entering directory `/cygdrive/c/Documents and Settings/Akash/My 
Documents/NetBeansProjects/CppApplication_1'
"/usr/bin/make"  -f nbproject/Makefile-Debug.mk 
dist/Debug/Cygwin_1-Windows/cppapplication_1.exe
make[2]: Entering directory `/cygdrive/c/Documents and Settings/Akash/My 
Documents/NetBeansProjects/CppApplication_1'
mkdir -p build/Debug/Cygwin_1-Windows
rm -f build/Debug/Cygwin_1-Windows/main.o.d
g++.exe    -c -g -MMD -MP -MF build/Debug/Cygwin_1-Windows/main.o.d -o 
build/Debug/Cygwin_1-Windows/main.o main.cpp
mkdir -p build/Debug/Cygwin_1-Windows
rm -f build/Debug/Cygwin_1-Windows/newfile.o.d
g++.exe    -c -g -MMD -MP -MF build/Debug/Cygwin_1-Windows/newfile.o.d -o 
build/Debug/Cygwin_1-Windows/newfile.o newfile.cpp
In file included from 
/usr/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/backward/iostream.h:31,
                 from newfile.cpp:1:
/usr/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/backward/backward_warning.h:32:2:
 warning: #warning This file includes at least one deprecated or antiquated 
header. Please consider using one of the 32 headers found in section 17.4.1.2 
of the C++ standard. Examples include substituting the <X> header for the 
<X.h> header for C++ includes, or <iostream> instead of the deprecated header 
<iostream.h>. To disable this warning use -Wno-deprecated.
mkdir -p dist/Debug/Cygwin_1-Windows
g++.exe     -o dist/Debug/Cygwin_1-Windows/cppapplication_1 
build/Debug/Cygwin_1-Windows/main.o  build/Debug/Cygwin_1-Windows/newfile.o  
build/Debug/Cygwin_1-Windows/newfile.o: In function `main':
/cygdrive/c/Documents and Settings/Akash/My 
Documents/NetBeansProjects/CppApplication_1/newfile.cpp:5: multiple 
definition of `_main'
build/Debug/Cygwin_1-Windows/main.o:/cygdrive/c/Documents and 
Settings/Akash/My Documents/NetBeansProjects/CppApplication_1/main.cpp:15: 
first defined here
collect2: ld returned 1 exit status
make[2]: *** [dist/Debug/Cygwin_1-Windows/cppapplication_1.exe] Error 
1nbproject/Makefile-Debug.mk:63: recipe for target 
`dist/Debug/Cygwin_1-Windows/cppapplication_1.exe' failed
make[2]: Leaving directory `/cygdrive/c/Documents and Settings/Akash/My 
Documents/NetBeansProjects/CppApplication_1'
nbproject/Makefile-Debug.mk:60: recipe for target `.build-conf' failed
make[1]: Leaving directory `/cygdrive/c/Documents and Settings/Akash/My 
Documents/NetBeansProjects/CppApplication_1'

make[1]: *** [.build-conf] Error 2
make: *** [.build-impl] Error 2
nbproject/Makefile-impl.mk:39: recipe for target `.build-impl' failed


BUILD FAILED (exit value 2, total time: 7s)

 



Please help guys,, have I configured anything wrong!!!






Error : Unknown on compilation

deep2sunny 08/24/2012

Project Features

About this Project

CND was started in November 2009, is owned by Leonid Lenyashin, and has 130 members.
By use of this website, you agree to the NetBeans Policies and Terms of Use (revision 20131025.e7cbc9d). © 2013, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo
 
 
Close
loading
Please Confirm
Close