Re: [AD] CMake on Mac OS X |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
On 9 Sep 2008, at 09:33, Peter Wang wrote:
I found this http://gcc.gnu.org/ml/gcc/2005-06/msg00186.html
and the following message.
As a hack, could someone try this:
Didn't fixit for me, unfortunately, but I did some more reading and
searching (and then searching based on new errors that came up) until
I found a combination of flags that does seem to compile (I haven't
had time to actually test things, and I wont until tonight):
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 "-single_module -flat_namespace -undefined
suppress"
OUTPUT_NAME ${nam}
)
You apparently don't need to pass "-Wl," (and it also doesn't work
with "-undefined suppress" because that has a space in it). You need -
undefined suppress (or -undefined warning) to get rid of a complaint
about an unresolved __mangled_main_address, which generates a
complaint about two level namespace something or other, which goes
away when you pass -flat_namespace.
Now, I have no idea what all of this means exactly. I'll try to
figure that out. Apart from -single_module at the linker stage, I
have the impression that you can also pass -fno-common to the
compiler (actually, I should just test that), but I have no idea
which is better.
Evert