Welcome, Guest. Please login or register.

Author Topic: Arghh.. getting errors in the jpeg.library includes with VBCC  (Read 3875 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline JoseTopic starter

  • Hero Member
  • *****
  • Join Date: Feb 2002
  • Posts: 2871
    • Show only replies by Jose
Arghh.. getting errors in the jpeg.library includes with VBCC
« 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:
\\"We made Amiga, they {bleep}ed it up\\"
 

Offline itix

  • Hero Member
  • *****
  • Join Date: Oct 2002
  • Posts: 2380
    • Show only replies by itix
Re: Arghh.. getting errors in the jpeg.library includes with VBCC
« Reply #1 on: September 15, 2004, 12:17:38 AM »
Mmmh, I think your jpeg includes are not compatible with VBCC. They seem to be for SAS/C only.

Quote
>typedef __asm ULONG

Adding #define __asm in the begining of the file could help here...

Quote
>typedef __asm ULONG (*JPGD_HOOK_PROTO)( register __a0 void

Change "register __a0" to "__reg(a0)". Same for other similar instances...
My Amigas: A500, Mac Mini and PowerBook
 

Offline JoseTopic starter

  • Hero Member
  • *****
  • Join Date: Feb 2002
  • Posts: 2871
    • Show only replies by Jose
Re: Arghh.. getting errors in the jpeg.library includes with VBCC
« Reply #2 on: September 15, 2004, 12:23:36 AM »
@itix

Thx. I'll try that...
\\"We made Amiga, they {bleep}ed it up\\"
 

Offline JoseTopic starter

  • Hero Member
  • *****
  • Join Date: Feb 2002
  • Posts: 2871
    • Show only replies by Jose
Re: Arghh.. getting errors in the jpeg.library includes with VBCC
« Reply #3 on: September 15, 2004, 01:01:52 AM »
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
...
\\"We made Amiga, they {bleep}ed it up\\"
 

Offline JoseTopic starter

  • Hero Member
  • *****
  • Join Date: Feb 2002
  • Posts: 2871
    • Show only replies by Jose
Re: Arghh.. getting errors in the jpeg.library includes with VBCC
« Reply #4 on: September 15, 2004, 01:07:01 AM »
The normal includes don't get errors if I take off the jpeg.library ones...
\\"We made Amiga, they {bleep}ed it up\\"
 

Offline Thomas

Re: Arghh.. getting errors in the jpeg.library includes with VBCC
« Reply #5 on: September 15, 2004, 07:12:22 AM »

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

Offline itix

  • Hero Member
  • *****
  • Join Date: Oct 2002
  • Posts: 2380
    • Show only replies by itix
Re: Arghh.. getting errors in the jpeg.library includes with VBCC
« Reply #6 on: September 15, 2004, 10:05:52 AM »
Remove every __asm from jpeg includes then... then it should work.
My Amigas: A500, Mac Mini and PowerBook
 

Offline JoseTopic starter

  • Hero Member
  • *****
  • Join Date: Feb 2002
  • Posts: 2871
    • Show only replies by Jose
Re: Arghh.. getting errors in the jpeg.library includes with VBCC
« Reply #7 on: September 16, 2004, 08:31:27 PM »
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:
\\"We made Amiga, they {bleep}ed it up\\"
 

Offline Karlos

  • Sockologist
  • Global Moderator
  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 16879
  • Country: gb
  • Thanked: 5 times
    • Show only replies by Karlos
Re: Arghh.. getting errors in the jpeg.library includes with VBCC
« Reply #8 on: September 16, 2004, 09:05:20 PM »
@Jose

If decoding jpegs is sufficient for your needs, why not try using datatypes (this assumes, of course, OS3.x minimum) ?
int p; // A
 

Offline JoseTopic starter

  • Hero Member
  • *****
  • Join Date: Feb 2002
  • Posts: 2871
    • Show only replies by Jose
Re: Arghh.. getting errors in the jpeg.library includes with VBCC
« Reply #9 on: September 16, 2004, 09:19:37 PM »
@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...
\\"We made Amiga, they {bleep}ed it up\\"
 

Offline JoseTopic starter

  • Hero Member
  • *****
  • Join Date: Feb 2002
  • Posts: 2871
    • Show only replies by Jose
Re: Arghh.. getting errors in the jpeg.library includes with VBCC
« Reply #10 on: September 16, 2004, 09:37:00 PM »
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-)
\\"We made Amiga, they {bleep}ed it up\\"
 

Offline Karlos

  • Sockologist
  • Global Moderator
  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 16879
  • Country: gb
  • Thanked: 5 times
    • Show only replies by Karlos
Re: Arghh.. getting errors in the jpeg.library includes with VBCC
« Reply #11 on: September 16, 2004, 11:54:41 PM »
@Jose

It doesnt have to be that hard.

Here 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 ;-)

int p; // A
 

Offline JoseTopic starter

  • Hero Member
  • *****
  • Join Date: Feb 2002
  • Posts: 2871
    • Show only replies by Jose
Re: Arghh.. getting errors in the jpeg.library includes with VBCC
« Reply #12 on: September 17, 2004, 10:21:49 PM »
@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.
\\"We made Amiga, they {bleep}ed it up\\"
 

Offline Karlos

  • Sockologist
  • Global Moderator
  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 16879
  • Country: gb
  • Thanked: 5 times
    • Show only replies by Karlos
Re: Arghh.. getting errors in the jpeg.library includes with VBCC
« Reply #13 on: September 17, 2004, 10:35:46 PM »
@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.
int p; // A