AOS4 libraries with interfaces how to ? (Solved)

6 posts / 0 new
Last post
TSK
TSK's picture
Offline
Last seen: 8 months 2 weeks ago
Joined: 2011-06-28 02:06
AOS4 libraries with interfaces how to ? (Solved)

Could somebody give me compileable and working example of an Amiga library with one main interface ? No matter what I try to do with Idltool I can't get my library working.

broadblues
broadblues's picture
Offline
Last seen: 4 years 4 months ago
Joined: 2012-05-02 21:48
What version of IDLTool are

What version of IDLTool are you using? Some earliers versions did write slightly broken code WRT to the library base. I forget which versions fixes it, but it easy to fix by hand. I can't find a broken example in my srces to demonstrate the error, it's down to the library base being declared as "struct Library" rather than "struct MyLibBase" hence the sizeof() function gives the wrong value.

But there are afew other things that can go wrong, if you need stdlib did you initialise newlib? Open "nerwlib.libraryu" and INewlib in your startup code.

Perhaps if you share you non working code we can help debug it?

Important compile with -Wall and -Werror and make sure any warnings are address correctly.

Belxjander
Belxjander's picture
Offline
Last seen: 8 years 6 months ago
Joined: 2011-02-25 11:53
My own Perception-IME and

My own Perception-IME and Polymorph-VMM projects both required me to produce the same material to start with.

http://github.com/Belxjander/Perception-IME and http://github.com/Belxjander/Polymorph-VMM to find them as published sources.

you will want the main.c file and the referenced include file...along with the "apicalls.c" file (at least the beginning of it) so that you can see how to define a basic library.

cut out any of the "Init***()" and "Exit***()" function references that block building.

they also come with a GNUmakefile and additional code you can strip down to what you need.

thellier
thellier's picture
Offline
Last seen: 5 years 5 months ago
Joined: 2014-03-04 12:43
Hello Have a look to

Hello
Have a look to Aminet/SimpleDT.library sources

Alain Thellier

Alain Thellier - Wazp3D

TSK
TSK's picture
Offline
Last seen: 8 months 2 weeks ago
Joined: 2011-06-28 02:06
idltool 53.6

idltool 53.6 (29.9.13)

Adding more arguments to the xml file I got rid of struct Library inside struct Library issues and some others. (The old example file I had wasn't good enough. The OS lib related xml files have more arguments used.)

Edit:
I sorted it all out finally and got my library working.

Thanks everybody helping me !

Log in or register to post comments