gcc "ld: cannot perform PE operations on non PE output file"

Discussion in 'C++' started by Remi.Arntzen@gmail.com, Nov 14, 2006.

  1. Guest

    I tried to compile a program to a elf shared library for a Linux
    platform on a windows machine with the command:
    gcc -o Prog.so -shared -Wl,--oformat -Wl,elf32-i386
    however this results in
    ld: cannot perform PE operations on non PE output file
    When compiling to PE format no errors are generated, which leads me to
    believe that some post processing operations are being preformed.
    This error message does not help me figure what PE operations are being
    performed, because I have explicitly told it to output elf format
    output.
    How can I correct this problem?
     
    , Nov 14, 2006
    #1
    1. Advertising

  2. Jack Klein Guest

    On 13 Nov 2006 20:44:27 -0800, wrote in
    comp.lang.c++:

    > I tried to compile a program to a elf shared library for a Linux
    > platform on a windows machine with the command:
    > gcc -o Prog.so -shared -Wl,--oformat -Wl,elf32-i386
    > however this results in
    > ld: cannot perform PE operations on non PE output file
    > When compiling to PE format no errors are generated, which leads me to
    > believe that some post processing operations are being preformed.
    > This error message does not help me figure what PE operations are being
    > performed, because I have explicitly told it to output elf format
    > output.
    > How can I correct this problem?


    By posting to a group that supports your particular compiler, like an
    embedded Linux group. Your questions is not about the C++ language at
    all, but about a particular linker, and linkers are not defined by the
    language.

    --
    Jack Klein
    Home: http://JK-Technology.Com
    FAQs for
    comp.lang.c http://c-faq.com/
    comp.lang.c++ http://www.parashift.com/c -faq-lite/
    alt.comp.lang.learn.c-c++
    http://www.contrib.andrew.cmu.edu/~ajo/docs/FAQ-acllc.html
     
    Jack Klein, Nov 14, 2006
    #2
    1. Advertising

  3. Guest

    Jack Klein wrote:
    > On 13 Nov 2006 20:44:27 -0800, wrote in
    > comp.lang.c++:
    >

    [...]
    >
    > By posting to a group that supports your particular compiler, like an
    > embedded Linux group. Your questions is not about the C++ language at
    > all, but about a particular linker, and linkers are not defined by the
    > language.
    >

    [...]
    Discussion moved to gnu.gcc .help.
     
    , Nov 14, 2006
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    8
    Views:
    436
  2. Kevin P. Fleming

    C99 structure initialization in gcc-2.95.3 vs gcc-3.3.1

    Kevin P. Fleming, Nov 6, 2003, in forum: C Programming
    Replies:
    2
    Views:
    648
    Kevin P. Fleming
    Nov 6, 2003
  3. Replies:
    5
    Views:
    363
    Nathan Addy
    Sep 17, 2005
  4. ashnin

    GCC 3.4.3 and GCC 4.1.2

    ashnin, Jul 7, 2008, in forum: C++
    Replies:
    1
    Views:
    527
    Michael DOUBEZ
    Jul 7, 2008
  5. kas
    Replies:
    1
    Views:
    320
    red floyd
    Apr 22, 2010
Loading...

Share This Page