As a result of the recent study of "Ray Tracing from thee Ground up", the sample program in the book is written using the Wxwidgets cross-platform graphics API, so it is learned and recorded for review.
Information about wxwidgets can be found on the official website http://www.wxwidgets.org/See more.
(1) Compiling source files
Download the Mac OSX version of the source file, open the Build/osx/wxcocoa.xcodeproj file with Xcode, click Compile, and wait for the compilation process.
Error occurred during compilation "cannot initialize a variable of type webbackforwardlist * ' with < span class= "n" >an rvalue of type ' wkbackforwardlist * webbackforwardlist* history = < Span class= "p" >[m_webview backforwardlist
This was a reported bug with wxWidgets-3.0.2, only occurs on Yosemite. The reason for this bug was that Apple updated it's Headers for Webkit. Fortunately, the old headers still exist in a header file called WebkitLegacy.h
. This bug, however are fixed in the 3.0.3 version of the library, but isn ' t still available for download (you can still get That by cloning the wxwidgets repo). Currently to fix this, all of you need to edit a file and look for line src/osx/webview_webkit.mm
31.
This is a bug on the Yosemite system, as Apple updated the WebKit header file to find the following code in the 31 lines of SRC/OSX/WEBVIEW_WEBKIT.MM:
#include <WebKit/WebKit.h>
The above is the line from the source file wxWidgets-3.0.2/src/osx/webview_webkit.mm
. All your need to do are to replace that line with the following alternative.
Remove this comment and replace it with the following code:
#include <WebKit/WebKitLegacy.h>
For details, see: http://goharsha.com/blog/compiling-wxwidgets-3-0-2-mac-os-x-yosemite/
Continue compiling, knowing that the last successful completion.
(2) Create a new project on Xcode
Specific operation reference: Https://wiki.wxwidgets.org/Creating_Xcode_projects_for_wxWidgets_applications
(Picture resources from the network, if there is inappropriate, please contact the author delete)
A compilation error occurs after the setup is complete, as follows:
Info_cocoa.plist to "Info.plist" into the Project Catalog folder xxxtests.
Wxwidgets Study Notes (1) MAC OSX environment configuration