Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

oneeyeman1

macrumors newbie
Original poster
Jul 13, 2015
1
0
HI,
I'm developing a cross-platform application with the help of wxWidgets. The application is a desktop one.
Everything works correctly on both Windows and Linux - I can run my program from IDE (MSVC and Anjuta) and directly from the OS/WM.

However, when I try to run it on OSX from Xcode, program crashes, and when I try to run it from the Terminal - everything works.

The crash happens immediately upon start-up of the program and so it looks like Xcode does not look for the dylibs in the appropriate places.

Does anybody know what I should do in order to be able to run the code from inside the IDE?

I can provide the link to my GitHub repo so that you can see it for yourself.

Any other pieces of info you need to diagnose the problem - just ask.

Thank you.

For the reference I'm attaching a screenshot from my attempt to running my program under Xcode.
 

Attachments

  • Screen Shot 2022-04-22 at 12.40.47 AM.png
    Screen Shot 2022-04-22 at 12.40.47 AM.png
    128.9 KB · Views: 89
Last edited:

casperes1996

macrumors 604
Jan 26, 2014
7,593
5,764
Horsens, Denmark
Last time I had this problem it wasn't a dylib thing but a permissions/sandboxing/entitlements problem. When you run a program from the Terminal it already runs with looser restrictions than if you launch it from the GUI/Xcode - Can you open the program from the GUI but not from Xcode? - If it were a dylib problem I feel like it would give you an error from dyld not this.

What kind of things does your application make use of? Networking? Add an entitlement for listening to/sending data as needed. Networking is a common entitlement I forget to add to my sandboxing hole-poking.

I can try and see if I can fiddle it to run and report back if I make it with the GitHub link thing - but yeah my first path I would go down would be entitlements. If you do believe its related to lib loading/linking you can adjust LD paths in project settings but I always forget where things are in that jumble of menus, haha.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.