Real Software Forums

The forum for Real Studio and other Real Software products.
[ REAL Software Website | Board Index ]
It is currently Wed Jan 29, 2020 8:43 am
xojo

All times are UTC - 5 hours




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: embedding a library in project
PostPosted: Wed Feb 02, 2011 7:34 am 
Offline

Joined: Tue Sep 23, 2008 4:33 am
Posts: 20
Hello,
I want to add functionalities to my application by using an external library with declares.
I already managed to make everything works in test condition but my problem comes from a really little thing:
How can tell a declare statement to use a library in a relative path (inside my application folder as a resource) ?

I currently have this:
Declare Function my_func Lib "/full/path/to/library.dylib" ( ... ) as Int32

but I cannot use a variable in it, what I wish to write is:
path = "relative/path/to/library.dylib"
Declare Function my_func Lib path ( ... ) as Int32

Is there a way to do something similar ?


The reason I want to do this is really simple: I have a library already compiled for linux, windows, etc... and it works quite well using declare, the other alternatives would be to create a plugin linked to the library but since it is a dynamic library I am still screwed (I don't want my users to have to install anything) or to include the library code in my plugin which means to battle with the build system.

The plugin license allow any of the choices I mentioned there.
Thanks for any advice.


Top
 Profile  
Reply with quote  
 Post subject: Re: embedding a library in project
PostPosted: Wed Feb 02, 2011 7:48 pm 
Offline
Real Software Engineer

Joined: Sat Dec 24, 2005 8:18 pm
Posts: 7858
Location: Canada, Alberta, Near Red Deer
Schmurfy wrote:
Hello,
I want to add functionalities to my application by using an external library with declares.
I already managed to make everything works in test condition but my problem comes from a really little thing:
How can tell a declare statement to use a library in a relative path (inside my application folder as a resource) ?

I currently have this:
Declare Function my_func Lib "/full/path/to/library.dylib" ( ... ) as Int32

but I cannot use a variable in it, what I wish to write is:
path = "relative/path/to/library.dylib"
Declare Function my_func Lib path ( ... ) as Int32

Is there a way to do something similar ?


Not on all three systems no
OS X has a way but I'm not aware of such a means for Windows or Linux

_________________
Norman Palardy (Real Software)


Top
 Profile  
Reply with quote  
 Post subject: Re: embedding a library in project
PostPosted: Thu Feb 03, 2011 12:30 am 
Offline

Joined: Mon May 31, 2010 5:35 am
Posts: 2412
Location: Netherlands
You can always build a plugin

See the documentation for more info:
http://docs.realsoftware.com/index.php/REAL_Studio_Plugin_SDK

_________________
SWORT™
- Windows Vista, Windows XP, Windows 7, Linux Mint 11 and Mac OSX Lion
- REAL Studio Enterprise(latest) and WEB Edition(latest)
- Plugins (MBS Complete, ToringoLib, Einhugur, VanHoek + Some open source plugins)
For Dutch User Groups ask me to enter!


Top
 Profile  
Reply with quote  
 Post subject: Re: embedding a library in project
PostPosted: Tue Feb 08, 2011 4:24 pm 
Offline

Joined: Mon Oct 16, 2006 4:47 pm
Posts: 49
Location: Atlanta
I've also attempted the same thing...
viewtopic.php?t=9749

If you figure it out let me know please!


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

All times are UTC - 5 hours


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:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group