It is currently Tue Oct 23, 2018 8:28 am

All times are UTC + 1 hour




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: Linux Path Resolution Bug
PostPosted: Fri Sep 07, 2018 6:45 pm 
Offline
Enthusiast
Enthusiast

Joined: Thu May 21, 2009 6:56 pm
Posts: 488
Hi

I discovered the following bug in Purebasic. If you use for example the OpenLibrary() function the way the Chilkat library does then everything works from the PureBasic IDE but does not work from the terminal or file manager. Thus running a linux daemon with Chilkat produces a segmentation fault.

The following code works in the PB IDE assuming the Chilkat Library is in the same folder as the PB code but not from a linux terminal or file manager.
Code:
OpenLibrary(#PB_Any, "libchilkatPb-9_5_0.so")


In order for the executable to work from the terminal or as a daemon the following change is required assuming that the linux executable and the Chilkat Shared Objects are in the same folder. However, this format does not work in the PB IDE.

Code:
OpenLibrary(#PB_Any, "./libchilkatPb-9_5_0.so")


The reason for the segmentation fault is that the OpenLibrary command fails from the terminal because of the missing "./". However if I add the missing "./" to the Chilkat library then "Compile with or without the debugger" fails in the PB IDE.

So there is an inconsistency between how the Purebasic IDE handles file paths and the way Linux handles the file paths.

Simon


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

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 1 guest


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