我想了解wxWidgets是如何工作的。我想在OSX 10.11.1上構建一個C++ GUI應用程序來學習C++。從wxWidgets和C++開始
現在我從https://www.wxwidgets.org/downloads/得到了wxWidgets,並且我得到了Linux/OSX版本。
我提取了源文件並運行了./configure && make && make install
,正如我在這裏看到的一個問題。
這似乎已經持續了一會兒,然後我得到這個:
`In file included from ./include/wx/variant.h:401:
./include/wx/any.h:611:5: warning: expression with side effects will be evaluated despite being used as an operand to 'typeid' [-Wpotentially-evaluated-expression]
WX_DECLARE_ANY_VALUE_TYPE(wxAnyValueTypeImplVariantData)
^
./include/wx/any.h:167:25: note: expanded from macro 'WX_DECLARE_ANY_VALUE_TYPE'
return wxTypeId(*sm_instance.get()) == wxTypeId(*otherType); \
^
./include/wx/typeinfo.h:84:47: note: expanded from macro 'wxTypeId'
#define wxTypeId(OBJ) wxTypeIdentifier(typeid(OBJ).name())
^
./src/osx/webview_webkit.mm:381:37: warning: incompatible pointer types sending 'WebViewLoadDelegate *' to parameter of type 'id<WebFrameLoadDelegate>' [-Wincompatible-pointer-types]
[m_webView setFrameLoadDelegate:loadDelegate];
^~~~~~~~~~~~
./src/osx/webview_webkit.mm:387:34: warning: incompatible pointer types sending 'WebViewPolicyDelegate *' to parameter of type 'id<WebPolicyDelegate>' [-Wincompatible-pointer-types]
[m_webView setPolicyDelegate:policyDelegate];
^~~~~~~~~~~~~~
./src/osx/webview_webkit.mm:392:30: warning: incompatible pointer types sending 'WebViewUIDelegate *' to parameter of type 'id<WKUIDelegate> _Nullable' [-Wincompatible-pointer-types]
[m_webView setUIDelegate:uiDelegate];
^~~~~~~~~~
./src/osx/webview_webkit.mm:464:34: warning: 'WKPreferences' may not respond to 'setUsesPageCache:'
[[m_webView preferences] setUsesPageCache:NO];
~~~~~~~~~~~~~~~~~~~~~~~^
./src/osx/webview_webkit.mm:466:34: warning: 'WKPreferences' may not respond to 'setUsesPageCache:'
[[m_webView preferences] setUsesPageCache:YES];
~~~~~~~~~~~~~~~~~~~~~~~^
./src/osx/webview_webkit.mm:936:25: error: cannot initialize a variable of type 'WebBackForwardList *' with an rvalue of type 'WKBackForwardList *'
WebBackForwardList* history = [m_webView backForwardList];
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
./src/osx/webview_webkit.mm:954:25: error: cannot initialize a variable of type 'WebBackForwardList *' with an rvalue of type 'WKBackForwardList *'
WebBackForwardList* history = [m_webView backForwardList];
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
15 warnings and 2 errors generated.
make: *** [webviewdll_osx_webview_webkit.o] Error 1`
,它失敗了。
我不知道如何解決它。
有沒有更容易的選擇我可以使用?
而且我似乎不另一個問題得到:
1 - 它說,它是跨平臺的。我認爲,那麼會有1個源文件夾在每個平臺上進行不同的編譯,而且每個平臺都沒有源代碼。
2 - 此外,它安裝在哪裏?它會成爲我的os庫的一部分,我可以在我編寫的任何C++程序中使用它?
3 - 然後如何將程序移動到另一臺OSX機器上?我將不得不構建一個自包含的應用程序(如使用Java),還是該計算機需要與我的計算機上開發該程序的計算機具有相同的wxWidgets版本?
不知道wxTrac –
當你說得到最新版本的形式github,克隆主?從網站上獲取它不是一回事嗎? –
您可以克隆主控或最新的'WX_3_0_BRANCH',它與上一個版本不一樣,不是。克隆了它的工作大師 –