Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Developing U++ » U++ Developers corner » Support for plug-in architecture
Re: Support for plug-in architecture [message #53214 is a reply to message #53212] Sat, 21 March 2020 13:15 Go to previous messageGo to previous message
slashupp is currently offline  slashupp
Messages: 231
Registered: July 2009
Experienced Member
Hi mirek

I attach my attempt at creating .so for plug-ins.

There are two: plug_one that uses 'standard' c++ class, and the second tries to create a Upp-ctrl as plug-in.
The first works fine after a bit of a fiddle, but the second gives invalid access/segfault for reasons I am yet
to find.

I will appreciate if you or anybody checks over my code and hopefully spot the error.

To create the three packages I used two package dirs: 'temp' to hold the test-app and 'libs' to hold the plug-ins.
I then changed for the plugins the following:
In [Build/Output mode..] I set the 'Target file override' to "~/plug_in_libs/libplug_one.so" and "~/plug_in_libs/libmyctrl.so" after checking 'Release' for each plug-in.
The plugins must be compiled in Release mode.
Also for the plugins I changed each separately in [Setup/Build methods..] the 'Release options' by pre-pending -fPIC to it's content (-fPIC -O3 -ffunction-sections -fdata-sections),
and 'Release link options' to (-shared -Wl,--gc-sections,-soname,libmyctrl.so) and (-shared -Wl,--gc-sections,-soname,libplug_one.so)
for the two plug-ins

((POSSIBLE BUG: the [Setup/Build methods..] are not unique per open theide, a change in one gets reflected in others))

Compile the three packages now as you would do normally and the two .so's will be created in the ~/plug_in_libs directory.

Change the constants in 'plug_one.cpp' to reflect your path to the .so's.


 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Proposal: Transition from SVN to GIT within 2020.1 release cycle
Next Topic: umk static version
Goto Forum:
  


Current Time: Fri May 03 19:57:58 CEST 2024

Total time taken to generate the page: 0.01634 seconds