ここに示されているサンプル コードを実行しようとしています。次のコマンドを使用して、MinGW を使用してソースから wxWidgets をビルドしました: mingw32-make -f makefile.gcc SHARED=1 UNICODE=0 BUILD=debug。私の Eclipse 設定では、-Iwx288/include、-Lwx288/lib、-lwxbase28d_gcc_custom、および -lwxmsw28d_core_gcc_custom を追加します。コンパイルする方法がたくさんあり、リンカの経験がないため、私は非常に混乱します。これらのエラーが表示されます。何が間違っていますか? 私は自分のプログラムで wxMutex を引用していません。
23:15:19 **** Incremental Build of configuration Debug for project A ****
Info: Internal Builder is used for build
g++ "-IC:\\Files\\Programming\\C++\\A\\include" -O0 -g3 -Wall -c -fmessage-length=0 -o "include\\wx\\thrimpl.o" "..\\include\\wx\\thrimpl.cpp"
..\include\wx\thrimpl.cpp:18:1: error: 'wxMutex' does not name a type
..\include\wx\thrimpl.cpp:29:1: error: 'wxMutex' does not name a type
..\include\wx\thrimpl.cpp:34:6: error: 'wxMutex' has not been declared
..\include\wx\thrimpl.cpp:34:22: error: non-member function 'bool IsOk()' cannot have cv-qualifier
..\include\wx\thrimpl.cpp: In function 'bool IsOk()':
..\include\wx\thrimpl.cpp:36:12: error: 'm_internal' was not declared in this scope
..\include\wx\thrimpl.cpp:36:26: error: 'NULL' was not declared in this scope
..\include\wx\thrimpl.cpp: At global scope:
..\include\wx\thrimpl.cpp:39:1: error: 'wxMutexError' does not name a type
..\include\wx\thrimpl.cpp:47:1: error: 'wxMutexError' does not name a type
..\include\wx\thrimpl.cpp:55:1: error: 'wxMutexError' does not name a type
..\include\wx\thrimpl.cpp:224:1: error: 'wxCondition' does not name a type
..\include\wx\thrimpl.cpp:235:1: error: 'wxCondition' does not name a type
..\include\wx\thrimpl.cpp:240:6: error: 'wxCondition' has not been declared
..\include\wx\thrimpl.cpp:240:26: error: non-member function 'bool IsOk()' cannot have cv-qualifier
..\include\wx\thrimpl.cpp: In function 'bool IsOk()':
..\include\wx\thrimpl.cpp:240:6: error: redefinition of 'bool IsOk()'
..\include\wx\thrimpl.cpp:34:6: error: 'bool IsOk()' previously defined here
..\include\wx\thrimpl.cpp:242:12: error: 'm_internal' was not declared in this scope
..\include\wx\thrimpl.cpp:242:26: error: 'NULL' was not declared in this scope
..\include\wx\thrimpl.cpp: At global scope:
..\include\wx\thrimpl.cpp:245:1: error: 'wxCondError' does not name a type
..\include\wx\thrimpl.cpp:253:1: error: 'wxCondError' does not name a type
..\include\wx\thrimpl.cpp:261:1: error: 'wxCondError' does not name a type
..\include\wx\thrimpl.cpp:269:1: error: 'wxCondError' does not name a type
..\include\wx\thrimpl.cpp:281:1: error: 'wxSemaphore' does not name a type
..\include\wx\thrimpl.cpp:291:1: error: 'wxSemaphore' does not name a type
..\include\wx\thrimpl.cpp:296:6: error: 'wxSemaphore' has not been declared
..\include\wx\thrimpl.cpp:296:26: error: non-member function 'bool IsOk()' cannot have cv-qualifier
..\include\wx\thrimpl.cpp: In function 'bool IsOk()':
..\include\wx\thrimpl.cpp:296:6: error: redefinition of 'bool IsOk()'
..\include\wx\thrimpl.cpp:34:6: error: 'bool IsOk()' previously defined here
..\include\wx\thrimpl.cpp:298:12: error: 'm_internal' was not declared in this scope
..\include\wx\thrimpl.cpp:298:26: error: 'NULL' was not declared in this scope
..\include\wx\thrimpl.cpp: At global scope:
..\include\wx\thrimpl.cpp:301:1: error: 'wxSemaError' does not name a type
..\include\wx\thrimpl.cpp:309:1: error: 'wxSemaError' does not name a type
..\include\wx\thrimpl.cpp:317:1: error: 'wxSemaError' does not name a type
..\include\wx\thrimpl.cpp:325:1: error: 'wxSemaError' does not name a type
..\include\wx\thrimpl.cpp: In function 'bool IsOk()':
..\include\wx\thrimpl.cpp:299:1: warning: control reaches end of non-void function [-Wreturn-type]
..\include\wx\thrimpl.cpp: In function 'bool IsOk()':
..\include\wx\thrimpl.cpp:243:1: warning: control reaches end of non-void function [-Wreturn-type]
..\include\wx\thrimpl.cpp: In function 'bool IsOk()':
..\include\wx\thrimpl.cpp:37:1: warning: control reaches end of non-void function [-Wreturn-type]
23:15:20 Build Finished (took 657ms)