Foro de elhacker.net

Programación => Programación C/C++ => Mensaje iniciado por: Don Pollo en 2 Mayo 2011, 12:25 pm



Título: Problema al compilar [C++]
Publicado por: Don Pollo en 2 Mayo 2011, 12:25 pm
Veréis, me han mandado hacer una aplicación para una farmacia robotizada. Estoy usando NetBeans 7.0. El caso es que me da error al compilar, pero no me muestra error alguno. Lo que me devuelve al limpiar y compilar es esto:

Código:
"/usr/bin/make" -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS= .clean-conf
make[1]: se ingresa al directorio «/home/zeki/NetBeansProjects/prac2_edi2»
rm -f -r build/Debug
rm -f dist/Debug/GNU-Linux-x86/prac2_edi2
make[1]: se sale del directorio «/home/zeki/NetBeansProjects/prac2_edi2»

CLEAN SUCCESSFUL (total time: 74ms)
"/usr/bin/make" -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS= .build-conf
make[1]: se ingresa al directorio «/home/zeki/NetBeansProjects/prac2_edi2»
"/usr/bin/make"  -f nbproject/Makefile-Debug.mk dist/Debug/GNU-Linux-x86/prac2_edi2
make[2]: se ingresa al directorio «/home/zeki/NetBeansProjects/prac2_edi2»
mkdir -p build/Debug/GNU-Linux-x86
rm -f build/Debug/GNU-Linux-x86/main.o.d
g++    -c -g -MMD -MP -MF build/Debug/GNU-Linux-x86/main.o.d -o build/Debug/GNU-Linux-x86/main.o main.cpp
mkdir -p build/Debug/GNU-Linux-x86
rm -f build/Debug/GNU-Linux-x86/casilla.o.d
g++    -c -g -MMD -MP -MF build/Debug/GNU-Linux-x86/casilla.o.d -o build/Debug/GNU-Linux-x86/casilla.o casilla.cpp
mkdir -p build/Debug/GNU-Linux-x86
rm -f build/Debug/GNU-Linux-x86/robot.o.d
g++    -c -g -MMD -MP -MF build/Debug/GNU-Linux-x86/robot.o.d -o build/Debug/GNU-Linux-x86/robot.o robot.cpp
mkdir -p build/Debug/GNU-Linux-x86
rm -f build/Debug/GNU-Linux-x86/medicamento.o.d
g++    -c -g -MMD -MP -MF build/Debug/GNU-Linux-x86/medicamento.o.d -o build/Debug/GNU-Linux-x86/medicamento.o medicamento.cpp
mkdir -p build/Debug/GNU-Linux-x86
rm -f build/Debug/GNU-Linux-x86/farmacia.o.d
g++    -c -g -MMD -MP -MF build/Debug/GNU-Linux-x86/farmacia.o.d -o build/Debug/GNU-Linux-x86/farmacia.o farmacia.cpp
mkdir -p build/Debug/GNU-Linux-x86
rm -f build/Debug/GNU-Linux-x86/estante.o.d
g++    -c -g -MMD -MP -MF build/Debug/GNU-Linux-x86/estante.o.d -o build/Debug/GNU-Linux-x86/estante.o estante.cpp
mkdir -p dist/Debug/GNU-Linux-x86
g++     -o dist/Debug/GNU-Linux-x86/prac2_edi2 build/Debug/GNU-Linux-x86/main.o build/Debug/GNU-Linux-x86/casilla.o build/Debug/GNU-Linux-x86/robot.o build/Debug/GNU-Linux-x86/medicamento.o build/Debug/GNU-Linux-x86/farmacia.o build/Debug/GNU-Linux-x86/estante.o  
/usr/lib/gcc/x86_64-linux-gnu/4.4.5/../../../../lib/crt1.o: In function `_start':
collect2: ld returned 1 exit status
make[2]: *** [dist/Debug/GNU-Linux-x86/prac2_edi2] Error 1
make[2]: se sale del directorio «/home/zeki/NetBeansProjects/prac2_edi2»
make[1]: *** [.build-conf] Error 2
make[1]: se sale del directorio «/home/zeki/NetBeansProjects/prac2_edi2»
make: *** [.build-impl] Error 2

BUILD FAILED (exit value 2, total time: 1s

Podríais decirme a qué se debe?

Un saludo y gracias!


Título: Re: Problema al compilar [C++]
Publicado por: leogtz en 2 Mayo 2011, 15:16 pm
¿Has tratado de compilar a mano?, sin el make


Título: Re: Problema al compilar [C++]
Publicado por: Don Pollo en 2 Mayo 2011, 16:07 pm
Yo simplemente le doy al botón delimpiar y compilar, no sé como se compila a mano.


Título: Re: Problema al compilar [C++]
Publicado por: Don Pollo en 2 Mayo 2011, 20:01 pm
Ale, ya lo he solucionado. El problema era que había comentado el main para comprobar una cosilla, y no terminaba de compilar porque no lo reconocía.