[Ffmpeg-devel] Re: ffmpeg on OS X
Wed Oct 19 02:39:22 CEST 2005
On Oct 18, 2005, at 7:31 PM, ffmpeg-devel-request at mplayerhq.hu wrote:
> Also, I had to use -undefined suppress for vhook libs... not sure how
> it's meant to be used, but I guess binaries
> using this libs should actually link with all the required libs).
The use of -undefined suppress means that ld won't check for
undefined symbols when linking.
> -SHFLAGS="-dynamiclib -Wl,-single_module,-undefined,dynamic_lookup"
> +SHFLAGS="-dynamiclib -Wl"
Leaving out the -single_module will break 64-bit systems, as the
default (multi_module) is 32-bit only. Not that I have a 64-bit
system to test this on...but things seem to be moving that way, so
this may not be a smart change.
> - SHFLAGS += -flat_namespace
> + SHFLAGS += -flat_namespace -undefined suppress
Forcing -flat_namespace is not exactly a good thing -- this should
probably be changed at some point. The Mac OS X static linker under
flat_namespace records only the names of libraries, not which
functions are to be found in which library. Thus if you happen to
link to two libraries which define the same symbol, you will get an
error. This is probably not desirable behavior. The default is now a
two level namespace, which fixes this problem. The issue with the two
level namespace is that all undefined references must be satisfied at
static link time, thus -undefined suppress is not an option with two
level namespace. Short of fixing the unresolved symbols in the code
(which is really what should happen), the only option I know of is to
do -undefined dynamic_lookup (which is a 10.3 and greater-only feature).
Hopefully this helps more than it confuses.
More information about the ffmpeg-devel