linking problem on OSX 10.4.11 (ppc)

Discussion in 'Programming' started by Man Johnson, Jan 20, 2014.

  1. Man Johnson

    Man Johnson New Member

    Jan 20, 2014
    Likes Received:
    I've installed gcc-4.6 with Fink on a PowerPc with OSX 10.4.11 in order to compile a program. Everything works fine till the linking stage where I get these messages:

    powerpc-apple-darwin8-g++-4.0.1: unrecognized option '-shared'
    /usr/libexec/gcc/powerpc-apple-darwin8/4.0.1/ld: Undefined symbols: _main
    collect2: ld returned 1 exit status

    However the program is compiled with gcc-4.6. My configure options are:

    ./configure CFLAGS="-I/sw/include" CXXFLAGS=$CFLAGS CPPFLAGS=$CFLAGS ACLOCALFLAGS="-I/sw/share/aclocal" PKG_CONFIG_PATH="/sw/lib/pkgconfig" LDFLAGS=-L/sw/lib CC=/sw/bin/gcc-4 CXX=/sw/bin/g++-4 CPP=/sw/bin/cpp-4 --libdir=/sw/lib --includedir=/sw/include

    What could I do to have it link properly?

    Thank you in advance.
    Man Johnson, Jan 20, 2014
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.