iff.library iff.l.main stub existing?

This forum is for general developer support questions.
JosDuchIt
Posts: 291
Joined: Sun Jun 26, 2011 5:47 pm
Contact:

iff.library iff.l.main stub existing?

Post by JosDuchIt »

Has someone allready provided an OS.1 stub for iff.library?
If not, how can such a stub be developed?
JosDuchIt
Posts: 291
Joined: Sun Jun 26, 2011 5:47 pm
Contact:

Re: iff.library iff.l.main stub existing?

Post by JosDuchIt »

Thanks Tom

I got as far as copying the makefile content for jpeg, replacing jpeg with iff
i get
11.Datas:Gui4Cli/Dev/iff_library/OS4> make
make: *** No rule to make target `fd/iff.fd', needed by `iff.c'. Stop.

the only other files that are in the OS4 drawer are
iff.h
iff_lib.fd
i renamed the last to iff.fd but got the same error
I never used or made a makefile. Can you help me?
User avatar
thomasrapp
Posts: 310
Joined: Sat Jun 18, 2011 11:22 pm

Re: iff.library iff.l.main stub existing?

Post by thomasrapp »

http://thomas-rapp.homepage.t-online.de ... ff_os4.lha

Note: I did not test if it actually works. It only compiled successfully.
JosDuchIt
Posts: 291
Joined: Sun Jun 26, 2011 5:47 pm
Contact:

Re: iff.library iff.l.main stub existing?

Post by JosDuchIt »

Many thanks Thomas
and it seems to work OK
JosDuchIt
Posts: 291
Joined: Sun Jun 26, 2011 5:47 pm
Contact:

Re: iff.library iff.l.main stub working? (was "existing?")

Post by JosDuchIt »

@thomasrapp

After more testing, i think i may have said to soon the stub was working. The 'undefined references to IFF functions came later.
i have the following in libs:
iff.l.main 6869 25-10-11 22:18:26
iff.library 3160 24-05-93 15:51:10 Version 323.2.2

i tried to compile the EasyExample.c modified for OS4 , it is here:
http://users.online.be/AD/EasyExampleOS4.c
gcc Datas:Programmeren/IFF_Lib/Examples/EasyExampleOS4.c -lauto -o ram:Easy

iff.h is in the same drawer as this example
I get a lot of undefined references
Datas:Programmeren/IFF_Lib/Examples/EasyExampleOS4.c: In function 'main':
Datas:Programmeren/IFF_Lib/Examples/EasyExampleOS4.c:147: warning: assignment from incompatible pointer type
/tmp/ccewaoFQ.o: In function `DisplayILBM':
EasyExampleOS4.c:(.text+0x2b0): undefined reference to `IFFL_OpenIFF'
EasyExampleOS4.c:(.text+0x2cc): undefined reference to `IFFL_GetBMHD'
EasyExampleOS4.c:(.text+0x33c): undefined reference to `IFFL_GetViewModes'
EasyExampleOS4.c:(.text+0x39c): undefined reference to `IFFL_GetColorTab'
EasyExampleOS4.c:(.text+0x418): undefined reference to `IFFL_DecodePic'
EasyExampleOS4.c:(.text+0x4c8): undefined reference to `IFFL_CloseIFF'
/tmp/ccewaoFQ.o: In function `main':
EasyExampleOS4.c:(.text+0x660): undefined reference to `IFFL_IFFError'
chris
Posts: 562
Joined: Sat Jun 18, 2011 11:05 am
Contact:

Re: iff.library iff.l.main stub working? (was "existing?")

Post by chris »

@JosDuchIt

You'll need to change all the open/close library stuff so it also obtains/drops the interface.

The lack of an struct IFFIFace *IIIF is most likely to be the cause.
JosDuchIt
Posts: 291
Joined: Sun Jun 26, 2011 5:47 pm
Contact:

Re: iff.library iff.l.main stub existing?

Post by JosDuchIt »

@chris

I brushed up the code as suggested
http://users.online.be/AD/EasyExampleOS4.c
I still get the same undefined refrences to IFFL_functions
User avatar
salass00
AmigaOS Core Developer
AmigaOS Core Developer
Posts: 530
Joined: Sat Jun 18, 2011 3:12 pm
Location: Finland
Contact:

Re: iff.library iff.l.main stub existing?

Post by salass00 »

@JosDuchIt

You're code doesn't work because it doesn't include proto/iff.h file.

For any library you want to use functions from you should always include the appropriate proto/libname.h file in your code.
JosDuchIt
Posts: 291
Joined: Sun Jun 26, 2011 5:47 pm
Contact:

Re: iff.library iff.l.main stub existing?

Post by JosDuchIt »

@salasso
Thanks, a big step forward.
I did put the OS4/include/proto/iff.h OS4/include/inlines4/iff.h and OS4/include/interfaces/iff.h in the SDK in the include_h/ subdrawers proto/ inlines4/ and interfaces/ respectively and kept
the OS4/Include/iff.h in the same drawer as the source.

I only have one 'indefined reference' left
/tmp/cc6KBeGa.o: In function `DisplayILBM':
EasyExampleOS4.c:(.text+0x554): undefined reference to `IFFL_CloseIFF'
Doing a search for IFFL_CloseIFF i find that it is only present in
os4/fd/iff_lib.fd
whereas other functions appear also in
OS4/include/inlines4/iff.h
OS4/include/interfaces/iff.h
OS4/Include/iff.h

as IFFL_CloseIFF is the first function listed in the autodoc, i guess something went wring with the generation of the stub?
I don't see how to complete those files manually
If somebody has them ?
Thomas?
Post Reply