It is currently Fri Nov 22, 2019 12:05 am

All times are UTC + 1 hour




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Linker error
PostPosted: Mon Jul 30, 2018 7:07 pm 
Offline
Enthusiast
Enthusiast

Joined: Sun Apr 01, 2018 11:26 am
Posts: 103
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?


Top
 Profile  
Reply with quote  
 Post subject: Re: Linker error
PostPosted: Mon Jul 30, 2018 7:50 pm 
Offline
Enthusiast
Enthusiast

Joined: Sun Apr 01, 2018 11:26 am
Posts: 103
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

:-(


Top
 Profile  
Reply with quote  
 Post subject: Re: Linker error
PostPosted: Mon Jul 30, 2018 8:40 pm 
Offline
Addict
Addict
User avatar

Joined: Thu Apr 21, 2005 2:38 pm
Posts: 1653
Location: Germany
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... :wink:


Top
 Profile  
Reply with quote  
 Post subject: Re: Linker error
PostPosted: Mon Jul 30, 2018 10:54 pm 
Offline
Enthusiast
Enthusiast

Joined: Sun Apr 01, 2018 11:26 am
Posts: 103
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.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye