I'm not sure if this belongs in this subforum or the one above. I'll let the mods decide...
I'm using latest release on all 3 platforms. Both Windows and Linux are fine, however OSX have issues.
I'm using Xcode as an IDE.
I successfully build the library from the Terminal and am successfully building my project from inside Xcode..
The way I made the project is as follows:
I created one from the Cocoa Application template, then in Terminal ran "wx-config --cxxflags" and "wx-config --libs" and manually put the results inside the appropriate fields in the Xcode.
I didn't start with the minimal Xcode project, nor did I drag the libwx files in the project.
I also made a script that copies all libraries (wx and my own) inside the AppBundle and reset all of them with "install_name_tool -change". I verified with "otool -L" that there is no references to the place I compiled the libraries on.
Now to the issue:
When I run the program from inside Xcode, I see that the IDE is loading the libraries from 2 different locations - inside the Bundle and from the place the libraries are compiled at.
This causes problems with the public/private visibility and the program crashes.
However, when I run the program from the Terminal with "open myapp.app", it runs fine.
Does anyone here knows how to solve the problem of double loading when the program runs from Xcode?
Thank you in advance.
Code: Select all
Igors-MacBook-Air:Frameworks igorkorot$ ls -la
total 189912
drwxr-xr-x 26 igorkorot staff 832 Feb 8 10:54 .
drwxr-xr-x 8 igorkorot staff 256 Feb 4 20:36 ..
-rwxr-xr-x 1 igorkorot staff 2415408 Jun 4 2018 libclang_rt.asan_osx_dynamic.dylib
-rwxr-xr-x 1 igorkorot staff 778384 Jun 4 2018 libclang_rt.ubsan_osx_dynamic.dylib
-rwxr-xr-x 1 igorkorot staff 347052 Feb 8 10:54 liblibdbloader.dylib
-rwxr-xr-x 1 igorkorot staff 7012824 Feb 8 10:54 liblibdbwindow.dylib
-rwxr-xr-x 1 igorkorot staff 8999448 Feb 8 10:54 liblibdialogs.dylib
-rwxr-xr-x 1 igorkorot staff 538128 Feb 8 10:54 liblibfieldswindow.dylib
-rwxr-xr-x 1 igorkorot staff 3787980 Feb 8 10:54 liblibmysql.dylib
-rwxr-xr-x 1 igorkorot staff 6420568 Feb 8 10:54 liblibodbc.dylib
-rwxr-xr-x 1 igorkorot staff 4567896 Feb 8 10:54 liblibpostgres.dylib
-rwxr-xr-x 1 igorkorot staff 470944 Feb 8 10:54 liblibpropertieshandlers.dylib
-rwxr-xr-x 1 igorkorot staff 3015032 Feb 8 10:54 liblibpropertypages.dylib
-rwxr-xr-x 1 igorkorot staff 5226584 Feb 8 10:54 liblibshapeframework.dylib
-rwxr-xr-x 1 igorkorot staff 15753764 Feb 8 10:54 liblibsqlite.dylib
-rwxr-xr-x 1 igorkorot staff 896168 Feb 8 10:54 liblibtabledataedit.dylib
-rwxr-xr-x 1 igorkorot staff 7340480 Feb 8 10:54 libmysqlclient.dylib
-rwxr-xr-x 1 igorkorot staff 4524504 Feb 8 10:54 libwx_baseu-3.2.dylib
-rwxr-xr-x 1 igorkorot staff 732432 Feb 8 10:54 libwx_baseu_net-3.2.dylib
-rwxr-xr-x 1 igorkorot staff 163636 Feb 8 10:54 libwx_baseu_xml-3.2.dylib
-rwxr-xr-x 1 igorkorot staff 20944 Feb 8 10:54 libwx_osx_cocoau_adv-3.2.dylib
-rwxr-xr-x 1 igorkorot staff 14883612 Feb 8 10:54 libwx_osx_cocoau_core-3.2.dylib
-rwxr-xr-x 1 igorkorot staff 1686416 Feb 8 10:54 libwx_osx_cocoau_html-3.2.dylib
-rwxr-xr-x 1 igorkorot staff 356864 Feb 8 10:54 libwx_osx_cocoau_qa-3.2.dylib
-rwxr-xr-x 1 igorkorot staff 4408276 Feb 8 10:54 libwx_osx_cocoau_stc-3.2.dylib
-rwxr-xr-x 1 igorkorot staff 1821868 Feb 8 10:54 libwx_osx_cocoau_xrc-3.2.dylib
Igors-MacBook-Air:Frameworks igorkorot$ otool -L liblibdbloader.dylib | grep igor
Igors-MacBook-Air:Frameworks igorkorot$ otool -L liblibdbwindow.dylib | grep igor
Igors-MacBook-Air:Frameworks igorkorot$ otool -L liblibdialogs.dylib | grep igor
Igors-MacBook-Air:Frameworks igorkorot$ otool -L liblibfieldswindow.dylib | grep igor
Igors-MacBook-Air:Frameworks igorkorot$ otool -L liblibmysql.dylib | grep igor
Igors-MacBook-Air:Frameworks igorkorot$ otool -L liblibodbc.dylib | grep igor
Igors-MacBook-Air:Frameworks igorkorot$ otool -L liblibpostgres.dylib | grep igor
Igors-MacBook-Air:Frameworks igorkorot$ otool -L liblibpropertieshandlers.dylib | grep igor
Igors-MacBook-Air:Frameworks igorkorot$ otool -L liblibpropertypages.dylib | grep igor
Igors-MacBook-Air:Frameworks igorkorot$ otool -L liblibshapeframework.dylib | grep igor
Igors-MacBook-Air:Frameworks igorkorot$ otool -L liblibsqlite.dylib | grep igor
Igors-MacBook-Air:Frameworks igorkorot$ otool -L liblibtabledataedit.dylib | grep igor
Igors-MacBook-Air:Frameworks igorkorot$ otool -L libmysqlclient.dylib | grep igor
Igors-MacBook-Air:Frameworks igorkorot$ otool -L libwx_baseu-3.2.dylib | grep igor
Igors-MacBook-Air:Frameworks igorkorot$ otool -L libwx_baseu_net-3.2.dylib | grep igor
Igors-MacBook-Air:Frameworks igorkorot$ otool -L libwx_baseu_xml-3.2.dylib | grep igor
Igors-MacBook-Air:Frameworks igorkorot$ otool -L libwx_osx_cocoau_adv-3.2.dylib | grep igor
Igors-MacBook-Air:Frameworks igorkorot$ otool -L libwx_osx_cocoau_core-3.2.dylib | grep igor
Igors-MacBook-Air:Frameworks igorkorot$ otool -L libwx_osx_cocoau_html-3.2.dylib | grep igor
Igors-MacBook-Air:Frameworks igorkorot$ otool -L libwx_osx_cocoau_qa-3.2.dylib | grep igor
Igors-MacBook-Air:Frameworks igorkorot$ otool -L libwx_osx_cocoau_stc-3.2.dylib | grep igor
Igors-MacBook-Air:Frameworks igorkorot$ otool -L libwx_osx_cocoau_xrc-3.2.dylib | grep igor
Igors-MacBook-Air:Frameworks igorkorot$ pwd
/Users/igorkorot/dbhandler/dbhandler/Build/Products/Debug/dbhandler.app/Contents/Frameworks
Igors-MacBook-Air:Frameworks igorkorot$
Code: Select all
dyld: loaded: /Users/igorkorot/dbhandler/dbhandler/Build/Products/Debug/dbhandler.app/Contents/MacOS/../Frameworks/libwx_osx_cocoau_xrc-3.2.dylib
dyld: loaded: /Users/igorkorot/dbhandler/dbhandler/Build/Products/Debug/dbhandler.app/Contents/MacOS/../Frameworks/libwx_osx_cocoau_html-3.2.dylib
dyld: loaded: /Users/igorkorot/dbhandler/dbhandler/Build/Products/Debug/dbhandler.app/Contents/MacOS/../Frameworks/libwx_osx_cocoau_qa-3.2.dylib
dyld: loaded: /Users/igorkorot/dbhandler/dbhandler/Build/Products/Debug/dbhandler.app/Contents/MacOS/../Frameworks/libwx_osx_cocoau_adv-3.2.dylib
dyld: loaded: /Users/igorkorot/dbhandler/dbhandler/Build/Products/Debug/dbhandler.app/Contents/MacOS/../Frameworks/libwx_osx_cocoau_core-3.2.dylib
dyld: loaded: /Users/igorkorot/dbhandler/dbhandler/Build/Products/Debug/dbhandler.app/Contents/MacOS/../Frameworks/libwx_baseu_xml-3.2.dylib
dyld: loaded: /Users/igorkorot/dbhandler/dbhandler/Build/Products/Debug/dbhandler.app/Contents/MacOS/../Frameworks/libwx_baseu_net-3.2.dylib
dyld: loaded: /Users/igorkorot/dbhandler/dbhandler/Build/Products/Debug/dbhandler.app/Contents/MacOS/../Frameworks/libwx_baseu-3.2.dylib
.......
.......
.......
dyld: loaded: /Users/igorkorot/wxWidgets/buildC11/lib/libwx_osx_cocoau_xrc-3.2.0.0.0.dylib
dyld: loaded: /Users/igorkorot/wxWidgets/buildC11/lib/libwx_osx_cocoau_html-3.2.0.0.0.dylib
dyld: loaded: /Users/igorkorot/wxWidgets/buildC11/lib/libwx_osx_cocoau_qa-3.2.0.0.0.dylib
dyld: loaded: /Users/igorkorot/wxWidgets/buildC11/lib/libwx_osx_cocoau_core-3.2.0.0.0.dylib
dyld: loaded: /Users/igorkorot/wxWidgets/buildC11/lib/libwx_baseu_xml-3.2.0.0.0.dylib
dyld: loaded: /Users/igorkorot/wxWidgets/buildC11/lib/libwx_baseu_net-3.2.0.0.0.dylib
dyld: loaded: /Users/igorkorot/wxWidgets/buildC11/lib/libwx_baseu-3.2.0.0.0.dylib
dyld: loaded: /Users/igorkorot/wxWidgets/buildC11/lib/libwx_osx_cocoau_stc-3.2.0.0.0.dylib
dyld: loaded: /Users/igorkorot/wxWidgets/buildC11/lib/libwx_osx_cocoau_adv-3.2.0.0.0.dylib
.......
.......
.......