我正在尝试在 Mac - Lion OS10x 上的 NETBEANS 上使用 cppUnit 测试运行一些测试,但在尝试编译后出现此错误:
/usr/bin/make" -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS= .build-conf
"/usr/bin/make" -f nbproject/Makefile-Debug.mk dist/Debug/GNU-MacOSX/xxx
make[2]: `dist/Debug/GNU-MacOSX/xxx' is up to date.
"/usr/bin/make" -f nbproject/Makefile-Debug.mk SUBPROJECTS= .build-tests-conf
"/usr/bin/make" -f nbproject/Makefile-Debug.mk dist/Debug/GNU-MacOSX/xxx
make[2]: `dist/Debug/GNU-MacOSX/xxx' is up to date.
mkdir -p build/Debug/GNU-MacOSX/tests/TestFiles
g++ -o build/Debug/GNU-MacOSX/tests/TestFiles/f1 build/Debug/GNU-MacOSX/newmain_nomain.o
-lcppunit -lcppunit -lcppunit
Undefined symbols for architecture x86_64:
"_main", referenced from:
start in crt1.10.6.o
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status
make[1]: *** [build/Debug/GNU-MacOSX/tests/TestFiles/f1] Error 1
make: *** [.build-tests-impl] Error 2
BUILD TESTS FAILED (exit value 2, total time: 11s)
谁能告诉我如何解决这个错误?