English Amiga Board


Go Back   English Amiga Board > Coders > Coders. General

 
 
Thread Tools
Old 04 March 2011, 02:08   #1
NovaCoder
Registered User
 
NovaCoder's Avatar
 
Join Date: Sep 2007
Location: Melbourne/Australia
Posts: 4,405
Trying to get AHI V6 to compile with GCC V2.95

Can anyone help with these GCC compiler issues?

I've been using gcc v3.3 to compile AHI without any problems but now I've gone back to v2.95 it's giving me grief


The problem is with the ahi header file (V6), the compiler complains about 'inline/ahi.h' with the following message:

'ahi.h: 29 badly punctuated parameter list in #define'


This is the line in question

Code:
#ifndef NO_INLINE_STDARG
#define AHI_AllocAudio(___tag1, ...) \
({_sfdc_vararg _tags[] = { ___tag1, __VA_ARGS__ }; AHI_AllocAudioA((struct TagItem *) _tags); })
#endif /* !NO_INLINE_STDARG */
After comparing it to the NDK 3.5 files, it looks like it should be written something like this instead:

Code:
#ifndef NO_INLINE_STDARG
#define AHI_AllocAudio(tags...) \
({ULONG _tags[] = {tags}; AHI_AllocAudioA((struct TagItem *) _tags); })
#endif /* !NO_INLINE_STDARG */
Should I update the ahi header file as above or is there an easier way?
NovaCoder is offline  
Old 04 March 2011, 10:43   #2
ara
Registered User
 
Join Date: Oct 2009
Location: Belgium
Age: 50
Posts: 42
I think there is not much you can do (maybe somebody comes up with a clever #define). The first version is C99 (implemented in v3.3), the second version is gcc's own syntax for variadic macros.
ara is offline  
Old 04 March 2011, 14:06   #3
NovaCoder
Registered User
 
NovaCoder's Avatar
 
Join Date: Sep 2007
Location: Melbourne/Australia
Posts: 4,405
Interesting, looks like it's a C++ issue as it seems to compile and link fine using plain old C in 2.95.3
NovaCoder is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
How compile WinUAE... WCoder support.WinUAE 57 17 April 2014 17:42
Trying to compile some ASM in StormC V4 NovaCoder Coders. General 2 29 September 2009 01:44
GFA compile xc8 Coders. General 31 19 May 2009 18:21
new AHI pages layout and AHI-archive Bamiga2002 Amiga scene 12 20 December 2007 14:44
Compile WinUAE ????? Myriel support.WinUAE 14 10 January 2004 17:06

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 09:34.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.08321 seconds with 12 queries