AOS4 libraries with interfaces how to ? (Solved)

6 posts / 0 new
Last post
TSK
TSK's picture
Offline
Last seen: 3 months 3 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.
Hans
Hans's picture
Offline
Last seen: 2 months 1 week 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
http://hdrlab.org.nz/ - Amiga OS 4 projects, programming articles and more. Home of the RadeonHD driver for Amiga OS 4.x project. http://keasigmadelta.co.nz/ - more of my software.
broadblues
broadblues's picture
Offline
Last seen: 2 years 6 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: 6 years 8 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: 3 years 7 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: 3 months 3 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