Amiga.org
Operating System Specific Discussions => Amiga OS => Amiga OS -- Development => Topic started by: Jose on September 15, 2004, 12:05:45 AM
-
Ok, I had the ma program thing ready to compile for the >2.0 version but I'm getting errors with the jpeg.library includes! Has anyone managed to get this working with VBCC?
Here's my output:
>typedef __asm ULONG
warning 54 in line 62 of "additionalincludes/jpeglibrary/jpeg.h": ; expected
>typedef __asm ULONG (*JPGD_HOOK_PROTO)( register __a0 void
warning 57 in line 62 of "additionalincludes/jpeglibrary/jpeg.h": , expected
>typedef __asm ULONG (*JPGD_HOOK_PROTO)( register __a0 void *, register __d0 ULO
warning 57 in line 62 of "additionalincludes/jpeglibrary/jpeg.h": , expected
>register __d1 ULONG,
warning 57 in line 63 of "additionalincludes/jpeglibrary/jpeg.h": , expected
>register __d1 ULONG, register __a1 void
warning 57 in line 63 of "additionalincludes/jpeglibrary/jpeg.h": , expected
>typedef __asm ULONG (*J
error 20 in line 77 of "additionalincludes/jpeglibrary/jpeg.h": no declarator and no identifier in prototype
>typedef __asm ULONG (*J
warning 59 in line 77 of "additionalincludes/jpeglibrary/jpeg.h": ) expected
>typedef __asm ULONG (*J
warning 226 in line 77 of "additionalincludes/jpeglibrary/jpeg.h": redeclaration of typedef
>typedef __asm ULONG (*J
error 34 in line 77 of "additionalincludes/jpeglibrary/jpeg.h": invalid storage-class for function
>typedef __asm ULONG (*J
error 36 in line 77 of "additionalincludes/jpeglibrary/jpeg.h": declarator expected
>typedef __asm ULONG (*J
error 37 in line 77 of "additionalincludes/jpeglibrary/jpeg.h": <> is no parameter
>typedef __asm ULONG (*J
warning 54 in line 77 of "additionalincludes/jpeglibrary/jpeg.h": ; expected
> register __d1 ULONG, register __a1 void * );
error 35 in line 78 of "additionalincludes/jpeglibrary/jpeg.h": declaration-specifiers expected
> register __d1 ULONG, register __a1 void * );
error 36 in line 78 of "additionalincludes/jpeglibrary/jpeg.h": declarator expected
> register __d1 ULONG, register __a1 void * );
error 37 in line 78 of "additionalincludes/jpeglibrary/jpeg.h": <> is no parameter
>typedef ULONG (
error 35 in line 91 of "additionalincludes/jpeglibrary/jpeg.h": declaration-specifiers expected
>typedef ULONG (*JPGP_HOOK)( ULONG, ULONG, void * );
error 37 in line 91 of "additionalincludes/jpeglibrary/jpeg.h": is no parameter
>typedef __asm ULONG (*J
error 20 in line 92 of "additionalincludes/jpeglibrary/jpeg.h": no declarator and no identifier in prototype
Maximum number of errors reached!
unexpected end of file
10 errors found!
vbccm68k failed returncode 20
vbccm68k -quiet "MaProgram.c" -o= "T:t_5_0.asm" -O=1 -Ivincludem68k: failed
:-? :-? :-? :pissed:
-
Mmmh, I think your jpeg includes are not compatible with VBCC. They seem to be for SAS/C only.
>typedef __asm ULONG
Adding #define __asm in the begining of the file could help here...
>typedef __asm ULONG (*JPGD_HOOK_PROTO)( register __a0 void
Change "register __a0" to "__reg(a0)". Same for other similar instances...
-
@itix
Thx. I'll try that...
-
Ok, it helped, but know I'm geting this one:
>#define __asm
error 272 in line 4 of "additionalincludes/jpeglibrary/jpeg.h": macro '__asm' redefined unidentically
1 error found!
....
If I take off "define__asm" at the beggining I get :
> LONG
warning 56 in line 380 of "dos/dosextens.h": } expected
> LONG
warning 53 in line 380 of "dos/dosextens.h": struct/union member needs identifier
> LONG
warning 54 in line 380 of "dos/dosextens.h": ; expected
> LONG
warning 56 in line 380 of "dos/dosextens.h": } expected
> LONG
warning 53 in line 380 of "dos/dosextens.h": struct/union member needs identifier
> LONG
warning 54 in line 380 of "dos/dosextens.h": ; expected
> LONG
warning 56 in line 380 of "dos/dosextens.h": } expected
> LONG
error 36 in line 380 of "dos/dosextens.h": declarator expected
> LONG
error 0 in line 380 of "dos/dosextens.h": declaration expected
aborting...
2 errors found!
vbccm68k failed returncode 20
...
-
The normal includes don't get errors if I take off the jpeg.library ones...
-
The jpeg include files really look weired. I know I got it running with VBCC, but I don't remember how. You should try to remove all occurences of __asm, __saveds, __stdargs, register and __a0, __a1, etc.
Bye,
Thomas
-
Remove every __asm from jpeg includes then... then it should work.
-
Tryed your suggestions but still didn't work...
Can anyone that managed to get this working send me his working jpeg.library includes? I still haven't managed to get it working.. :oops:
-
@Jose
If decoding jpegs is sufficient for your needs, why not try using datatypes (this assumes, of course, OS3.x minimum) ?
-
@Karlos
Never used them. Also heard they're slower. But I wanted to learn how to use them for a long time so maybe now it's time...I'll check out ma DevCD tonight...
-
Just checked some Datatypes stuff and dammit I still haven't read some Intuition parts of the RKM Libs let alone the Boopsi stuff that I would need to know to just start learning Datatypes now... Later on it will happend though 8-)
-
@Jose
It doesnt have to be that hard.
Here (http://www.nyteshade.com/karlos/cpp/gfxutil.cpp) is some code that forms the ImageLoader class for the AmigaOS implementation of my OOP framework. Sorry it's C++, but at the same time you will see the OS functions you need. They are
NewDTObject( ) - creates a new (datatype) object (specified as a filename which is really handy!)
GetDTAttrs( ) - gets attributes of the object, in this case writing the bitmap data into a struct BitMapHeader and so on.
DoMethod( ) - invokes a method of the object - in this case PDTM_READPIXELARRAY which I use to get the raw RGB data out of my datatype, storing it in my own ImageBuffer object (which is a simply chunky pixel raster type thing).
DisposeDTObject( ) - destroys the datatype object once your'e done with it.
It's not as hard as it looks - I myself had to ask here originally for an example also (can't find the thread, but it must be here some place).
As for speed, it is highly subjective. 680x0 apps on my system can load jpegs in a flash since the decoding is using PPC ;-)
-
@Karlos
Ok, I'll take a look at that...
Meanwhile, if I find a very cheap SAS package I'll probably give it a try.
-
@Jose
Well, that example source is a small component of a much larger system so you won't be able to compile it. I just had it handy as a way of showing a quick way to load image data using datatypes. The same overall method is equally applicable to C code, so you should be able to do it in VBCC.
Using datatypes also, of course, allows you to keep your image as a struct BitMap if that is what you want. My needs were different (I just wanted the RGB data), since I had my own ImageBuffer class.