Compile position-independent executable with statically linked library on 64 bit machine
问题 When I try to compile with the following command-line: g++ code.cpp /usr/lib/x86_64-linux-gnu/libcrypto.a -ldl -Fpie -pie -o executable I get the following error message: /usr/bin/ld: /tmp/ccNHn5FA.o: Die Umlagerung von /tmp/ccNHn5FA.o: error adding symbols: Ungültiger Wert collect2: error: ld returned 1 exit status I am wondering why this does not work, because exactly the same command line on my 32 bit machine works fine. What am I doing wrong? 回答1: When I try to compile with the following