[AD] [ alleg-Bugs-3157005 ] Dynamic linker can't find _al_managled_main with XCode4 |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
- To: noreply@xxxxxxxxxx
- Subject: [AD] [ alleg-Bugs-3157005 ] Dynamic linker can't find _al_managled_main with XCode4
- From: "SourceForge.net" <noreply@xxxxxxxxxx>
- Date: Sat, 15 Jan 2011 04:51:44 +0000
Bugs item #3157005, was opened at 2011-01-13 08:59
Message generated for change (Comment added) made by elias
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105665&aid=3157005&group_id=5665
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Mac OSX
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Owen Anderson (resistor)
Assigned to: Peter Hull (peterhull90)
Summary: Dynamic linker can't find _al_managled_main with XCode4
Initial Comment:
The XCode4 Developer Preview has -fvisibility=hidden on by default, which makes the dynamic linker unable to resolve it at runtime. This option is good for both launch time and optimization, so it's desirable to have it on. Given that, please consider adding "__attribute__ ((visibility("default")))" to the OS X declaration of _al_mangled_main.
----------------------------------------------------------------------
>Comment By: Elias Pschernig (elias)
Date: 2011-01-15 04:51
Message:
Ah, yes, I keep forgetting that under OSX the user main() is just some
weird macro. Makes sense then.
----------------------------------------------------------------------
Comment By: Owen Anderson (resistor)
Date: 2011-01-15 03:39
Message:
That's not the same situation. The user's main is rewritten to
_al_mangled_main on OS X, and is in the user's linked binary. The real
main is in allegro_main.dylib, which calls _al_mangled_main on launch.
This means that _al_mangled_main has to be public, rather than hidden, even
though it's in the user's code rather than in the Allegro dynamic library.
----------------------------------------------------------------------
Comment By: Elias Pschernig (elias)
Date: 2011-01-14 14:44
Message:
Does Allegro compile with -fvisibility=hidden at all? We don't set any
symbols to __attribute__ ((visibility("default"))) from what I can see. And
all non-public functions are declared static anyway. (Functions starting
with _al_ are public if user code includes any of the allegro5/internal/*
headers.)
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105665&aid=3157005&group_id=5665