Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix compiling under 64 bit linux #3

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

addictgamer
Copy link

The compile command in the makefile needs -m32 tacked onto there or LD will complain:
$ make
g++ -fPIC -O3 -c btime.cpp
g++ btime.o -O3 -m32 -lstdc++ -lrt -shared -Wl,-soname,btime.so -o btime.so
/usr/bin/ld: i386:x86-64 architecture of input file `btime.o' is incompatible with i386 output
/usr/bin/ld: btime.o: file class ELFCLASS64 incompatible with ELFCLASS32
/usr/bin/ld: final link failed: File in wrong format
collect2: error: ld returned 1 exit status

The compile command needs -m32 tacked onto there or LD will complain:
$ make
g++ -fPIC -O3 -c btime.cpp
g++ btime.o -O3 -m32 -lstdc++ -lrt -shared -Wl,-soname,btime.so -o btime.so
/usr/bin/ld: i386:x86-64 architecture of input file `btime.o' is incompatible with i386 output
/usr/bin/ld: btime.o: file class ELFCLASS64 incompatible with ELFCLASS32
/usr/bin/ld: final link failed: File in wrong format
collect2: error: ld returned 1 exit status
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant