Develope plugins with link libs in it

Discuss questions about plugin development with the Hollywood SDK here

Develope plugins with link libs in it

Postby pegasos-sigi2 » Sun May 03, 2015 12:20 am


I want to develope some Hollywood plugins, but i need full recurces of standart C. I want to include link libs (f.E. libzip.a) in the plugins.
They need fopen/fclose and so on. Andreas, how i can made it? You have develope the SVG-Plugin which use librsvg.
Posts: 1
Joined: Sat May 02, 2015 6:13 pm

Re: Develope plugins with link libs in it

Postby airsoftsoftwair » Sun May 03, 2015 11:47 am

There are several options to solve this:

1) If you are not targetting any Amiga platforms, you can just use the link libs as they are

2) If you want to target Amiga platforms, you need to compile your own version of the link lib and replace all calls to C functions that need constructor/destructor code. This can be done in one of the following ways:

2a) Replace all calls to fopen() etc. by cl->CRTBase->fopen() etc. where "cl" is a pointer to Hollywood's plugin interface. Hollywood will pass this pointer to your InitPlugin() function.


2b) Replace all calls to fopen() etc. by cl->DOSBase->hw_FOpen(). This is especially needed if your plugin should be able to load files linked into applets/executables. The standard C lib fopen() won't be able to open them. See: hw_FOpen()

Also read this section in the SDK. It contains an overview of C functions you have to replace: ... SCRT_.html

Functions which don't require constructor/destructor code don't have to be replaced. It's usually only the ones listed in the link above.
User avatar
Posts: 2415
Joined: Fri Feb 12, 2010 3:33 pm
Location: Germany

Return to SDK

Who is online

Users browsing this forum: No registered users and 1 guest