Page 1 of 1
Linker error
Posted: Mon Jul 30, 2018 7:07 pm
by Martin Verlaan
I'm trying to compile my application with the x86 compiler on my 64bit pc. With x64 compiler i have no problems but with x86 version I get this error:
/usr/bin/ld: skipping incompatible /var/data/purebasic-32bit/purelibraries/linux/libraries/libpbsqlite3.a when searching for -lpbsqlite3
/usr/bin/ld: cannot find -lpbsqlite3
collect2: error: ld returned 1 exit status
How can I solve this?
Re: Linker error
Posted: Mon Jul 30, 2018 7:50 pm
by Martin Verlaan
When I try to compile a simple one line program (without sqlite) I get even more errors:
/usr/bin/ld: i386 architecture of input file `purebasic.o' is incompatible with i386:x86-64 output
/usr/bin/ld: i386 architecture of input file `/var/data/purebasic-32bit/compilers/debugger.a(Debugger.o)' is incompatible with i386:x86-64 output
/usr/bin/ld: i386 architecture of input file `/var/data/purebasic-32bit/compilers/debugger.a(ThreadSupport.o)' is incompatible with i386:x86-64 output
/usr/bin/ld: i386 architecture of input file `/var/data/purebasic-32bit/compilers/debugger.a(UnicodeSupport.o)' is incompatible with i386:x86-64 output
/usr/bin/ld: i386 architecture of input file `/var/data/purebasic-32bit/compilers/debugger.a(ConsoleDebugger.o)' is incompatible with i386:x86-64 output
/usr/bin/ld: i386 architecture of input file `/var/data/purebasic-32bit/compilers/debugger.a(ExternalDebugger.o)' is incompatible with i386:x86-64 output
/usr/bin/ld: i386 architecture of input file `/var/data/purebasic-32bit/compilers/debugger.a(ExpressionParser.o)' is incompatible with i386:x86-64 output
...
collect2: error: ld returned 1 exit status

Re: Linker error
Posted: Mon Jul 30, 2018 8:40 pm
by Shardik
On Windows and MacOS it's working like a charm to compile a program with a x86 PB compiler on a x64 machine (MacOS even doesn't have separate x86 and x64 versions). But on Linux it's very tricky and requires to install x86-compatability libraries beneath the x64 libraries. You may take a look into this old sticky thread "
Using PureBasic (32bit) on 64bit Linux" and freak's
guide but I would recommend to install both a x86 and x64 version in a multi-boot environment or install them as virtual machines. It's much less of a hassle...

Re: Linker error
Posted: Mon Jul 30, 2018 10:54 pm
by Martin Verlaan
Thanks for your quick reply. I followed the guide but without success. So I followed your advice and installed Mint-x86 in a VirtualBox and now it's compiling without errors.