AOS4 libraries with interfaces how to ? (Solved)

6 posts / 0 new
Last post
TSK's picture
Last seen: 4 days 21 hours 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.

Hans's picture
Last seen: 6 months 2 weeks ago
Joined: 2010-12-09 22:04
That's strange. Idltool

That's strange. Idltool should create a skeleton library with a single main interface that compiles.

I can't think of any simple example code for a library. You might be able to look at MiniGL's code, but you'll likely get lost in the mass of code.

What happens when you use idltool to generate a skeleton library? What error messages do you get when trying to compile?

Perhaps it might help if you looked at the interface definition file of a known working library. IIRC, there's a collection of them in SDK:includes/interfaces (or something like that).

Hans - Amiga OS 4 projects, programming articles and more. Home of the RadeonHD driver for Amiga OS 4.x project. - more of my software.

broadblues's picture
Last seen: 3 years 7 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's picture
Last seen: 7 years 9 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. and 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's picture
Last seen: 4 years 9 months ago
Joined: 2014-03-04 12:43
Hello Have a look to

Have a look to Aminet/SimpleDT.library sources

Alain Thellier

Alain Thellier - Wazp3D

TSK's picture
Last seen: 4 days 21 hours 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.)

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

Thanks everybody helping me !

Log in or register to post comments