1

Mac osx 10.7.5 の netbeans で ac プログラムをビルドしようとしていますが、次のエラーが発生します。何が起こっているのかわかりません。私は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)

実装ファイルに個別に書き込むのではなく、すべてのメソッド定義をメイン ファイルに配置すると、正常にビルドされ、エラーは表示されません。

4

0 に答える 0