Set CMake to use dyld options instead GNU ld options under OS X
Asked Answered
T

0

1

I try to to port a linux software to OS X (Yosemite) which uses CMake to be built. The only modification that I necessarily made, was to direct to the Homebrew installed GNU GCC and G++ when executing cmake.

If I use the already existing CMakeLists.txt, the build process stops with the following error:

ld: unknown option: --start-group
collect2: error: ld returned 1 exit status
make[2]: *** [lib/somelib.dylib] Error 1
make[1]: *** [lib/somelib.dir/all] Error 2
make: *** [all] Error 2

Obviously --start-group is an option only for GNU ld and not dyld, the OS X ld derivate. Installing GNU ld on OS X is not possible, as answered here.

How can set CMake to use dyld options instead?

Telluric answered 23/7, 2015 at 13:17 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.