English Amiga Board

Go Back   English Amiga Board > Coders > Coders. Language > Coders. C/C++

Thread Tools
Old 10 August 2020, 00:10   #1
Registered User

Join Date: Aug 2018
Location: Minneapolis, USA
Posts: 95
ClassAct/Reaction & Eclipse/GCC Cross Chain

- I haven't programmed BOOPSI, ClassAct, or Reaction previously (No taglist experience). I have worked with the KS 1.3 style "busy work yourself to death" widgets.
- I just got Bebbo's awesome GCC cross chain working this week; previously was using VBCC; have no experience using Lattice C on Amiga.

- Getting ready for AmigaOS 3.2 dev by getting up to speed on BOOPSI > Reaction widgets/layout.

- Do not have 3.2 or 3.9, so don't have an SDK/WB combo that has reaction-style widgets

Workaround #1:
- Found a post here indicating that GCC includes can be tweaked to us CA instead of RA, and then in combination with ClassAct 3 which is on Aminet, can program against it. Made copies where relevant, so I didn't mangle my reaction headers, and that seemed pretty straightforward. Found a few places where it was still CA_ anyway


Problem #1: Eclipse doesn't seem to like the macros for list building, which only include a starting (, not the close (which gets supplied later by a different macro). Well, I'm not sure if that's what it is objecting to, but that's what the warning involves.

Example code:

objects[OID_MAIN] = IIntuition->NewObject(WindowClass, NULL,
/* objects[OID_MAIN] = WindowObject, */
WA_ScreenTitle, "ClassAct",
WA_Title, "ClassAct Window Example",
WA_Activate, TRUE,
WA_DepthGadget, TRUE,
WA_DragBar, TRUE,
WA_CloseGadget, TRUE,
WA_SizeGadget, TRUE,
WA_Width, 200,
WA_Height, 150,
WINDOW_IconifyGadget, TRUE,
WINDOW_IconTitle, "Example",
WINDOW_AppPort, AppPort,
WINDOW_ParentGroup, VLayoutObject,
LAYOUT_SpaceOuter, TRUE,
LAYOUT_DeferLayout, TRUE,

Eclipse gives a warning of "Missing ')' in parameter list of macro: NewObject"

On compile, I get an error like this:
../src/classact_test1.c:176:0: error: unterminated argument list invoking macro "NewObject"

I checked the macros, and as far as I can tell, it does seem like they are visible, and getting resolved at the preprocessor step. For example, NewObject is that rather long thing; and EndWindow eventually resolves to 0.

#define NewObjectA(___classPtr, ___classID, ___tagList) \
LP3(0x27c, APTR, NewObjectA , struct IClass *, ___classPtr, a0, CONST_STRPTR, ___classID, a1, const struct TagItem *, ___tagList, a2,\

#define End TAG_END)
#define TAG_END (0L) /* synonym for TAG_DONE */

there's another challenge I need help with, with the hook, but I'll save that for another post.
Warty is offline  
Old 10 August 2020, 10:32   #2
Registered User
thomas's Avatar
Join Date: Jan 2002
Location: Germany
Posts: 6,191
Remove that IIntuition-> and all other ISomething-> from your source code. This code is for Amiga OS 4. It does not compile for 3.x.

Also narrow down a possible mistake by starting with

myobject = NewObject (class,NULL, TAG_END);

If this compiles, add more tags one by one.

Also don't mix function call style with ReAction macros style. Don't use EndObject, EndGroup and the like if you don't also use WindowObjecrt, LayoutObject and so on.

Function call style is better because you can match brackets to see if you closed all open brackets.
thomas is online now  
Old 14 August 2020, 07:54   #3
Registered User

Join Date: Aug 2018
Location: Minneapolis, USA
Posts: 95
Thanks for the info and advice Thomas.

I struggled quite a bit with it, and at this point, I think there are maybe 2 things going wrong. I got ahold of the 2.1 developer CD, and went for a very basic code example in there. It compiles with GCC, but the exec doesn't run (exits before debugger can hit a break). That same code compiled with VBCC runs fine. So I dunno what to do there.

The 2nd problem I think is around trying to use ReAction code renamed to classAct, without knowing how either really works, and which code in Reaction is newer than classAct, etc. I haven't had any luck getting my setup to work under VBCC once I introduce the classact/reaction stuff. I think I'll just stay away from that for now, until 3.2 is out with a new NDK and updated docs.

There are quite a lot of changes between the 1.3 stuff and the 3.1 stuff I can get familiar with in the meantime, and update some apps to use it. I'll figure out reaction-for-3.2 when it's available.

All my Amiga books are for KS 1.x, I wish I had one that was 3.0 or 3.1 based.
Warty is offline  
Old 15 August 2020, 19:41   #4
Minuous's Avatar
Join Date: Oct 2001
Location: Canberra/Australia
Posts: 2,210
>That same code compiled with VBCC runs fine. So I dunno what to do there.

You haven't given enough info to really diagnose the issue, so using VBCC would be the obvious solution to recommend. It should also work with SAS/C, StormC etc.

>trying to use ReAction code renamed to classAct, without knowing how either really works, and which code in Reaction is newer than classAct, etc.

You can get the 3.9 NDK, which contains ReActionized includes, so there is no need to rename any ReAction stuff to ClassAct. The minimum versions required for any particular feature are specified in the autodocs.

Are you making sure your compilers are using modern includes rather than the ones they were provided with?
Minuous is online now  

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
installing Classact and Reaction on 3.1.4 dschallock support.Other 8 06 February 2020 20:19
Help with gcc cross-compiling MartinW Coders. C/C++ 7 21 April 2017 14:22
My super simple cross development tool chain - build and run in 15 seconds xxxxx Coders. Asm / Hardware 37 23 July 2015 22:15
Chain & Zetr0 Pr0n Loedown support.Hardware 10 27 September 2010 14:19
Eclipse-Plugin for Amiga-Cross-development Paul News 1 04 September 2004 18:36

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 16:10.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, vBulletin Solutions Inc.
Page generated in 0.08521 seconds with 15 queries