Re: [AD] CMake on Mac OS X

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


I've tried and it works for the static build, though not the dynamic one yet.

Thanks
Peter

On Tue, Sep 9, 2008 at 2:33 PM, Peter Wang <novalazy@xxxxxxxxxx> wrote:
> On 2008-09-09, Evert Glebbeek <eglebbk@xxxxxxxxxx> wrote:
>> On 9 Sep 2008, at 08:57, Peter Hull wrote:
>> > I get this (this is the problem that's stumped me for ages, it seems
>> > to be platform dependent but I don't know where that -multi_module
>> > option comes from)
>>
>> Tell me about it. This has been haunting me for more than a year on
>> another (work related) project. It appears that MacOS X is a bit
>> quirky when it comes to building shared objects. It doesn't like
>> global ("common") variables and it doesn't like unresolved externals
>> when building the shared object.
>> There are commandline switches that help, both during compilation and
>> linking, but it's been a while since I looked into it. I'll have
>> another go at it. I might have more luck getting it to work with
>> Allegro (which doesn't include FORTRAN code as well) than I did with
>> my other project (which does). Having a peek at what Allegro 4.2 does
>> differently might be illuminating, but I can't make heads or tails of
>> some of the CMake stuff.
>> I'm guessing multi_module might be a default option.
>
> I found this http://gcc.gnu.org/ml/gcc/2005-06/msg00186.html
> and the following message.
>
> As a hack, could someone try this:
>
> Index: CMakeLists.txt
> ===================================================================
> --- CMakeLists.txt      (revision 10775)
> +++ CMakeLists.txt      (working copy)
> @@ -548,6 +548,7 @@
>         set_target_properties(${target}
>             PROPERTIES
>             COMPILE_FLAGS "${more_extra_flags} ${LIBRARY_CFLAGS} -DALLEGRO_SRC"
> +            LINK_FLAGS "-Wl,-single_module"
>             OUTPUT_NAME ${nam}
>             )
>
>
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> --
> https://lists.sourceforge.net/lists/listinfo/alleg-developers
>




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/