c netbeans文件是为不支持的文件格式构建的

时间:2013-06-23 17:20:09

标签: c macos netbeans

我试图在mac osx 10.7.5上的netbeans中构建一个c程序,并且收到以下错误。我不确定发生了什么。我正在努力学习c。

"/usr/bin/make" -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS= .build-conf
nbproject/Makefile-Debug.mk:73: warning: overriding commands for target `build/Debug/GNU-MacOSX/UnsortedList.o'
nbproject/Makefile-Debug.mk:68: warning: ignoring old commands for target `build/Debug/GNU-MacOSX/UnsortedList.o'
"/usr/bin/make"  -f nbproject/Makefile-Debug.mk dist/Debug/GNU-MacOSX/cs350_lab6_linkedlist
nbproject/Makefile-Debug.mk:73: warning: overriding commands for target `build/Debug/GNU-MacOSX/UnsortedList.o'
nbproject/Makefile-Debug.mk:68: warning: ignoring old commands for target `build/Debug/GNU-MacOSX/UnsortedList.o'
mkdir -p dist/Debug/GNU-MacOSX
gcc     -o dist/Debug/GNU-MacOSX/cs350_lab6_linkedlist build/Debug/GNU-MacOSX/UnsortedList.o build/Debug/GNU-MacOSX/UnsortedList.o build/Debug/GNU-MacOSX/main.o 
ld: warning: ignoring file build/Debug/GNU-MacOSX/UnsortedList.o, file was built for unsupported file format which is not the architecture being linked (x86_64)
ld: warning: ignoring file build/Debug/GNU-MacOSX/UnsortedList.o, file was built for unsupported file format which is not the architecture being linked (x86_64)
Undefined symbols for architecture x86_64:
  "_CreateList", referenced from:
      _main in main.o
  "_InsertItem", referenced from:
      _main in main.o
  "_DeleteItem", referenced from:
      _main in main.o
  "_PrintList", referenced from:
      _main in main.o
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status
make[2]: *** [dist/Debug/GNU-MacOSX/cs350_lab6_linkedlist] Error 1
make[1]: *** [.build-conf] Error 2
make: *** [.build-impl] Error 2

BUILD FAILED (exit value 2, total time: 71ms)

如果我将所有方法定义放在主文件中而不是在实现文件中单独编写,那么它构建正常并且没有显示错误。

0 个答案:

没有答案