ONEEYEMAN wrote:Hi,
Does wxWidgets build correctly?
Yes, of course. Here are the example flags:
Code: Select all
/Users/imac/Projects/wxWidgets-3.1.0/build-debug/bk-deps /usr/bin/clang++ -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk -mmacosx-version-min=10.7 -c -o stclib_ScintillaWX.o -D__WXOSX_COCOA__ -DWXBUILDING -I/Users/imac/Projects/wxWidgets-3.1.0/build-debug/src/tiff/libtiff -I../src/tiff/libtiff -I../src/jpeg -I../src/png -I../src/zlib -I../src/regex -I../src/stc/scintilla/include -I../src/stc/scintilla/lexlib -I../src/stc/scintilla/src -D__WX__ -DSCI_LEXER -DLINK_LEXERS -Wall -Wundef -Wunused-parameter -Wno-ctor-dtor-privacy -Woverloaded-virtual -Wno-deprecated-declarations -D_FILE_OFFSET_BITS=64 -I/Users/imac/Projects/wxWidgets-3.1.0/build-debug/lib/wx/include/osx_cocoa-unicode-static-3.1 -I../include -g -O0 -arch i386 -arch x86_64 -stdlib=libc++ -std=c++11 -fvisibility=hidden -fvisibility-inlines-hidden -fno-common ../src/stc/ScintillaWX.cpp
ONEEYEMAN wrote:
What was you configure line for building library?
I'm not using configure, but my own build system, but more or less it looks like this, compilation:
Code: Select all
clang++ -m64 -O2 -mmacosx-version-min=10.7 -std=c++1y -stdlib=libc++ -I../../ -I/usr/local/include/libusb-1.0/ -I//usr/local/Cellar/boost/1.64.0_1/include/ -fPIC -D_REENTRANT -DRELEASE -fvisibility=hidden -Wno-inconsistent-missing-override -MMD -DNDEBUG -I/Users/imac/Projects/wxWidgets-3.1.0/build-release/lib/wx/include/osx_cocoa-unicode-static-3.1 -I/Users/imac/Projects/wxWidgets-3.1.0/include/ -D_FILE_OFFSET_BITS=64 -D__WXMAC__ -D__WXOSX__ -D__WXOSX_COCOA__ -Wno-potentially-evaluated-expression -Wno-inconsistent-missing-override -DNDEBUG -DwxDEBUG_LEVEL=0 -c ..//init/GPEGUIElements.cpp -o ..//init/GPEGUIElements.o
Linking:
Code: Select all
clang++ -shared -Xlinker -x -m64 -mmacosx-version-min=10.7 -stdlib=libc++ -std=c++1y -Xlinker -headerpad -Xlinker 578 -fvisibility=hidden -Wl,-rpath,/usr/local/lib -o xos/x64/libgpe_gui_elements.so ..//dialogs/PresetSaveAsDialog.o ..//GConDialogContext.o ..//init/GPEGUIElements.o -L/usr/local/Cellar/boost/1.64.0_1/lib/ -Bstatic /usr/local/Cellar/boost/1.64.0_1/lib/libboost_log-mt.a /usr/local/Cellar/boost/1.64.0_1/lib/libboost_system-mt.a /usr/local/Cellar/boost/1.64.0_1/lib/libboost_program_options-mt.a /usr/local/Cellar/boost/1.64.0_1/lib/libboost_filesystem-mt.a /usr/local/Cellar/boost/1.64.0_1/lib/libboost_log_setup-mt.a /usr/local/Cellar/boost/1.64.0_1/lib/libboost_thread-mt.a /usr/local/Cellar/boost/1.64.0_1/lib/libboost_regex-mt.a /usr/local/lib/libusb-1.0.a -L../../GPE/build/xos/xFAT/ -lgpe -L../../GCon/build/xos/xFAT/ -lgcon -Wl,-framework,IOKit -Wl,-framework,CoreFoundation -lobjc -L/Users/imac/Projects/wxWidgets-3.1.0/build-debug/lib -framework IOKit -framework Carbon -framework Cocoa -framework AudioToolbox -framework System -framework OpenGL /Users/imac/Projects/wxWidgets-3.1.0/build-debug/lib/libwx_osx_cocoau_xrc-3.1.a /Users/imac/Projects/wxWidgets-3.1.0/build-debug/lib/libwx_osx_cocoau_qa-3.1.a /Users/imac/Projects/wxWidgets-3.1.0/build-debug/lib/libwx_baseu_net-3.1.a /Users/imac/Projects/wxWidgets-3.1.0/build-debug/lib/libwx_osx_cocoau_html-3.1.a /Users/imac/Projects/wxWidgets-3.1.0/build-debug/lib/libwx_osx_cocoau_adv-3.1.a /Users/imac/Projects/wxWidgets-3.1.0/build-debug/lib/libwx_osx_cocoau_core-3.1.a /Users/imac/Projects/wxWidgets-3.1.0/build-debug/lib/libwx_baseu_xml-3.1.a /Users/imac/Projects/wxWidgets-3.1.0/build-debug/lib/libwx_baseu-3.1.a -framework WebKit -lexpat -lwxregexu-3.1 -lwxtiff-3.1 -lwxjpeg-3.1 -lwxpng-3.1 -lwxzlib-3.1 -lpthread
ONEEYEMAN wrote:
Also, just curious - what is the reason for hiding the symbols?
Well, it is plug-in kind of environment, it is very common to hide symbols, as you never know what other plugins symbols can contain. There are two use cases:
1) wxWidgets executable loads shared object, which is linked (and uses) wxWidget dialogs.
2) any other executable loads shared object, which is linked (and uses) wxWidget dialogs.
Thus when using wxWidget executable and shared object which same symbols, there are errors, and application acts very strange - definitely there are problems with symbol missmatch. This is medium size project in general (150k+ lines of code) with other GUI frameworks as well, so keeping it isolated would be perfect. Such approach works perfectly on Windows (on Windows symbols are hidden by default).
Thank you in advance.