12 June 2021, 21:44 | #1 | |
Registered User
Join Date: Aug 2018
Location: Minneapolis, USA
Posts: 301
|
VBCC & AmigaOS 3.2 NDK?
I am trying to update my VBCC config to use the 3.2 NDK.
I'm getting compile-time errors though: ----- Quote:
I decided to mimic the 3.9 NDK setup, so with a little folder renaming, I have: /ndk32/Include/ fd/ include_h/ include_i/ linker_libs/ sfd/ (just FYI, got same errors before I reorganized). I use same config file I had before, but replaced "ndk39" with "ndk32". eg: -cc=vbccm68k -c99 -quiet -hunkdebug %s -o= %s %s -O=%ld -I"$VBCC/targets/m68k-amigaos/include" -I"$VBCC/ndk32/Include/include_h" -I"$VBCC/p96/Include" From the News section thread, it looks like someone has got this working, but also that maybe it doesn't work out of the box. Can "someone" explain how to get it working? |
|
13 June 2021, 04:21 | #2 |
Total Chaos forever!
Join Date: Aug 2007
Location: Waterville, MN, USA
Age: 49
Posts: 2,223
|
Did you download FD2Pragma and use the correct conversion from the FD files?
|
13 June 2021, 06:12 | #3 |
Registered User
Join Date: Aug 2018
Location: Minneapolis, USA
Posts: 301
|
No, I was confused about the necessity of that.
I have it compiling again now (thanks!), albeit with a couple warnings that it didn't used to have about GetAttr pointer types not agreeing. It's not obvious to me what changed there, but it seems to run ok at the moment, so I'll track that down later. For anyone doing it, this is what I had to do to get it working on my (non-Amiga VBCC install): 1. Download fd2pragma 2. modify the VBCC make protos script that comes with fd2pragma, to know about 3.2 things, and to use .sfd instead of .fd. See my version attached. You may be able to tweak a couple paths to get it to work for you. 3. set up a new blank "proto" and "inline" folder directories where sf2pragma could get to them. 4. run script 5. rename the old "proto" and "inline" folders in $VBCC/targets/m68k-amigaos/include 6. drop the new "proto" and "inline" folders into that dir. I didn't mess with $VBCC/targets/m68k-amigaos/lib FWIW, I got a warning on conversion for virtual_lib.sfd and mathieeedoubletrans_lib.sfd Code:
set proto Applications:dev/vbcc/proto set inline Applications:dev/vbcc/inline set fdflags special 38 to $proto set fdflags2 special 70 to $inline echo "*NGenerating proto headers..." ; OS3.2 libraries fd2pragma $fdflags SFD:bevel_lib.sfd fd2pragma $fdflags SFD:amigaguide_lib.sfd fd2pragma $fdflags SFD:aml_lib.sfd fd2pragma $fdflags SFD:arexx_lib.sfd fd2pragma $fdflags SFD:asl_lib.sfd fd2pragma $fdflags SFD:battclock_lib.sfd fd2pragma $fdflags SFD:battmem_lib.sfd fd2pragma $fdflags SFD:bitmap_lib.sfd fd2pragma $fdflags SFD:bullet_lib.sfd fd2pragma $fdflags SFD:button_lib.sfd fd2pragma $fdflags SFD:card_lib.sfd fd2pragma $fdflags SFD:checkbox_lib.sfd fd2pragma $fdflags SFD:chooser_lib.sfd fd2pragma $fdflags SFD:cia_lib.sfd fd2pragma $fdflags SFD:clicktab_lib.sfd fd2pragma $fdflags SFD:colorwheel_lib.sfd fd2pragma $fdflags SFD:commodities_lib.sfd fd2pragma $fdflags SFD:console_lib.sfd fd2pragma $fdflags SFD:datatypes_lib.sfd fd2pragma $fdflags SFD:datebrowser_lib.sfd fd2pragma $fdflags SFD:disk_lib.sfd fd2pragma $fdflags SFD:diskfont_lib.sfd fd2pragma $fdflags SFD:dos_lib.sfd fd2pragma $fdflags SFD:drawlist_lib.sfd fd2pragma $fdflags SFD:dtclass_lib.sfd fd2pragma $fdflags SFD:exec_lib.sfd fd2pragma $fdflags SFD:expansion_lib.sfd fd2pragma $fdflags SFD:fuelgauge_lib.sfd fd2pragma $fdflags SFD:gadtools_lib.sfd fd2pragma $fdflags SFD:getfile_lib.sfd fd2pragma $fdflags SFD:getfont_lib.sfd fd2pragma $fdflags SFD:getscreenmode_lib.sfd fd2pragma $fdflags SFD:glyph_lib.sfd fd2pragma $fdflags SFD:graphics_lib.sfd fd2pragma $fdflags SFD:icon_lib.sfd fd2pragma $fdflags SFD:iffparse_lib.sfd fd2pragma $fdflags SFD:input_lib.sfd fd2pragma $fdflags SFD:integer_lib.sfd fd2pragma $fdflags SFD:intuition_lib.sfd fd2pragma $fdflags SFD:keymap_lib.sfd fd2pragma $fdflags SFD:label_lib.sfd fd2pragma $fdflags SFD:layers_lib.sfd fd2pragma $fdflags SFD:layout_lib.sfd fd2pragma $fdflags SFD:listbrowser_lib.sfd fd2pragma $fdflags SFD:locale_lib.sfd fd2pragma $fdflags SFD:lowlevel_lib.sfd fd2pragma $fdflags SFD:mathffp_lib.sfd fd2pragma $fdflags SFD:mathieeedoubbas_lib.sfd fd2pragma $fdflags SFD:mathieeedoubtrans_lib.sfd fd2pragma $fdflags SFD:mathieeesingbas_lib.sfd fd2pragma $fdflags SFD:mathieeesingtrans_lib.sfd fd2pragma $fdflags SFD:mathtrans_lib.sfd fd2pragma $fdflags SFD:misc_lib.sfd fd2pragma $fdflags SFD:nonvolatile_lib.sfd fd2pragma $fdflags SFD:palette_lib.sfd fd2pragma $fdflags SFD:penmap_lib.sfd fd2pragma $fdflags SFD:popcycle_lib.sfd fd2pragma $fdflags SFD:potgo_lib.sfd fd2pragma $fdflags SFD:radiobutton_lib.sfd fd2pragma $fdflags SFD:ramdrive_lib.sfd fd2pragma $fdflags SFD:realtime_lib.sfd fd2pragma $fdflags SFD:requester_lib.sfd fd2pragma $fdflags SFD:resource_lib.sfd fd2pragma $fdflags SFD:rexxsyslib_lib.sfd fd2pragma $fdflags SFD:scroller_lib.sfd fd2pragma $fdflags SFD:slider_lib.sfd fd2pragma $fdflags SFD:space_lib.sfd fd2pragma $fdflags SFD:speedbar_lib.sfd fd2pragma $fdflags SFD:string_lib.sfd fd2pragma $fdflags SFD:texteditor_lib.sfd fd2pragma $fdflags SFD:timer_lib.sfd fd2pragma $fdflags SFD:translator_lib.sfd fd2pragma $fdflags SFD:utility_lib.sfd fd2pragma $fdflags SFD:virtual_lib.sfd fd2pragma $fdflags SFD:wb_lib.sfd fd2pragma $fdflags SFD:window_lib.sfd echo "*NGenerating inline headers..." ; OS3.2 libraries fd2pragma $fdflags2 SFD:bevel_lib.sfd fd2pragma $fdflags2 SFD:amigaguide_lib.sfd fd2pragma $fdflags2 SFD:aml_lib.sfd fd2pragma $fdflags2 SFD:arexx_lib.sfd fd2pragma $fdflags2 SFD:asl_lib.sfd fd2pragma $fdflags2 SFD:battclock_lib.sfd fd2pragma $fdflags2 SFD:battmem_lib.sfd fd2pragma $fdflags2 SFD:bitmap_lib.sfd fd2pragma $fdflags2 SFD:bullet_lib.sfd fd2pragma $fdflags2 SFD:button_lib.sfd fd2pragma $fdflags2 SFD:card_lib.sfd fd2pragma $fdflags2 SFD:checkbox_lib.sfd fd2pragma $fdflags2 SFD:chooser_lib.sfd fd2pragma $fdflags2 SFD:cia_lib.sfd fd2pragma $fdflags2 SFD:clicktab_lib.sfd fd2pragma $fdflags2 SFD:colorwheel_lib.sfd fd2pragma $fdflags2 SFD:commodities_lib.sfd fd2pragma $fdflags2 SFD:console_lib.sfd fd2pragma $fdflags2 SFD:datatypes_lib.sfd fd2pragma $fdflags2 SFD:datebrowser_lib.sfd fd2pragma $fdflags2 SFD:disk_lib.sfd fd2pragma $fdflags2 SFD:diskfont_lib.sfd fd2pragma $fdflags2 SFD:dos_lib.sfd fd2pragma $fdflags2 SFD:drawlist_lib.sfd fd2pragma $fdflags2 SFD:dtclass_lib.sfd fd2pragma $fdflags2 SFD:exec_lib.sfd fd2pragma $fdflags2 SFD:expansion_lib.sfd fd2pragma $fdflags2 SFD:fuelgauge_lib.sfd fd2pragma $fdflags2 SFD:gadtools_lib.sfd fd2pragma $fdflags2 SFD:getfile_lib.sfd fd2pragma $fdflags2 SFD:getfont_lib.sfd fd2pragma $fdflags2 SFD:getscreenmode_lib.sfd fd2pragma $fdflags2 SFD:glyph_lib.sfd fd2pragma $fdflags2 SFD:graphics_lib.sfd fd2pragma $fdflags2 SFD:icon_lib.sfd fd2pragma $fdflags2 SFD:iffparse_lib.sfd fd2pragma $fdflags2 SFD:input_lib.sfd fd2pragma $fdflags2 SFD:integer_lib.sfd fd2pragma $fdflags2 SFD:intuition_lib.sfd fd2pragma $fdflags2 SFD:keymap_lib.sfd fd2pragma $fdflags2 SFD:label_lib.sfd fd2pragma $fdflags2 SFD:layers_lib.sfd fd2pragma $fdflags2 SFD:layout_lib.sfd fd2pragma $fdflags2 SFD:listbrowser_lib.sfd fd2pragma $fdflags2 SFD:locale_lib.sfd fd2pragma $fdflags2 SFD:lowlevel_lib.sfd fd2pragma $fdflags2 SFD:mathffp_lib.sfd fd2pragma $fdflags2 SFD:mathieeedoubbas_lib.sfd fd2pragma $fdflags2 SFD:mathieeedoubtrans_lib.sfd fd2pragma $fdflags2 SFD:mathieeesingbas_lib.sfd fd2pragma $fdflags2 SFD:mathieeesingtrans_lib.sfd fd2pragma $fdflags2 SFD:mathtrans_lib.sfd fd2pragma $fdflags2 SFD:misc_lib.sfd fd2pragma $fdflags2 SFD:nonvolatile_lib.sfd fd2pragma $fdflags2 SFD:palette_lib.sfd fd2pragma $fdflags2 SFD:penmap_lib.sfd fd2pragma $fdflags2 SFD:popcycle_lib.sfd fd2pragma $fdflags2 SFD:potgo_lib.sfd fd2pragma $fdflags2 SFD:radiobutton_lib.sfd fd2pragma $fdflags2 SFD:ramdrive_lib.sfd fd2pragma $fdflags2 SFD:realtime_lib.sfd fd2pragma $fdflags2 SFD:requester_lib.sfd fd2pragma $fdflags2 SFD:resource_lib.sfd fd2pragma $fdflags2 SFD:rexxsyslib_lib.sfd fd2pragma $fdflags2 SFD:scroller_lib.sfd fd2pragma $fdflags2 SFD:slider_lib.sfd fd2pragma $fdflags2 SFD:space_lib.sfd fd2pragma $fdflags2 SFD:speedbar_lib.sfd fd2pragma $fdflags2 SFD:string_lib.sfd fd2pragma $fdflags2 SFD:texteditor_lib.sfd fd2pragma $fdflags2 SFD:timer_lib.sfd fd2pragma $fdflags2 SFD:translator_lib.sfd fd2pragma $fdflags2 SFD:utility_lib.sfd fd2pragma $fdflags2 SFD:virtual_lib.sfd fd2pragma $fdflags2 SFD:wb_lib.sfd fd2pragma $fdflags2 SFD:window_lib.sfd echo "Done!" unset fd2flags2 unset fd2flags unset proto unset inline Last edited by Warty; 13 June 2021 at 06:14. Reason: forum didn't like a .script file being attached; listing it inline. |
13 June 2021, 10:41 | #4 |
Registered User
Join Date: Oct 2012
Location: Germany
Posts: 585
|
A documentation for using VBCC with the 3.2 NDK is currently being prepared. Thank you for sharing your experiences.
|
13 June 2021, 10:49 | #5 |
Registered User
Join Date: Jan 2002
Location: Germany
Posts: 7,041
|
There is only one typedef missing from exec/types.h:
Code:
typedef unsigned long AVLKey; |
13 June 2021, 13:00 | #6 |
Natteravn
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,569
|
I have prepared a new m68k-amigaos target archive, based on NDK 3.2, some days ago. My approach was to keep the NDK 3.9 fd files during the fd2pragma-run, but those files which are present in both NDKs are overwritten by 3.2. So the AVL functions from exec are gone, for example.
The official release will take a few days, because my A3000/060 no longer works reliably, since more than a year. If anybody wants to help testing, please email me. |
13 June 2021, 15:04 | #7 | |
Natteravn
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,569
|
Quote:
|
|
13 June 2021, 17:50 | #8 |
Registered User
Join Date: Aug 2018
Location: Minneapolis, USA
Posts: 301
|
I did again with your new version (but on Mac this time, not on Amiga)
I noticed that when I did it this morning, with a clear mind, I had been parsing some random set of SFD files that I can't account for. Was like 90 files. NDK32r2 only has 44 SFD files. Here is latest script, now for unix. Code:
#!/bin/zsh export VBCC=/opt/vbcc export PATH=$VBCC/bin:$PATH export PROTO=$VBCC/targets/m68k-amigaos/include/proto export INLINE=$VBCC/targets/m68k-amigaos/include/inline export SFD=$VBCC/_ndk32/SFD # make sure it can find it's fd2pragma.types file, where ever I stashed that... cd $VBCC/fd2pragma echo "Generating proto headers..." fd2pragma -s 38 -t $PROTO -i $SFD/bullet_lib.sfd fd2pragma -s 38 -t $PROTO -i $SFD/amigaguide_lib.sfd fd2pragma -s 38 -t $PROTO -i $SFD/asl_lib.sfd fd2pragma -s 38 -t $PROTO -i $SFD/battclock_lib.sfd fd2pragma -s 38 -t $PROTO -i $SFD/battmem_lib.sfd fd2pragma -s 38 -t $PROTO -i $SFD/cardres_lib.sfd fd2pragma -s 38 -t $PROTO -i $SFD/cia_lib.sfd fd2pragma -s 38 -t $PROTO -i $SFD/colorwheel_lib.sfd fd2pragma -s 38 -t $PROTO -i $SFD/commodities_lib.sfd fd2pragma -s 38 -t $PROTO -i $SFD/console_lib.sfd fd2pragma -s 38 -t $PROTO -i $SFD/datatypes_lib.sfd fd2pragma -s 38 -t $PROTO -i $SFD/disk_lib.sfd fd2pragma -s 38 -t $PROTO -i $SFD/diskfont_lib.sfd fd2pragma -s 38 -t $PROTO -i $SFD/dos_lib.sfd fd2pragma -s 38 -t $PROTO -i $SFD/dtclass_lib.sfd fd2pragma -s 38 -t $PROTO -i $SFD/exec_lib.sfd fd2pragma -s 38 -t $PROTO -i $SFD/expansion_lib.sfd fd2pragma -s 38 -t $PROTO -i $SFD/gadtools_lib.sfd fd2pragma -s 38 -t $PROTO -i $SFD/graphics_lib.sfd fd2pragma -s 38 -t $PROTO -i $SFD/icon_lib.sfd fd2pragma -s 38 -t $PROTO -i $SFD/iffparse_lib.sfd fd2pragma -s 38 -t $PROTO -i $SFD/input_lib.sfd fd2pragma -s 38 -t $PROTO -i $SFD/intuition_lib.sfd fd2pragma -s 38 -t $PROTO -i $SFD/keymap_lib.sfd fd2pragma -s 38 -t $PROTO -i $SFD/layers_lib.sfd fd2pragma -s 38 -t $PROTO -i $SFD/locale_lib.sfd fd2pragma -s 38 -t $PROTO -i $SFD/lowlevel_lib.sfd fd2pragma -s 38 -t $PROTO -i $SFD/mathffp_lib.sfd fd2pragma -s 38 -t $PROTO -i $SFD/mathieeedoubbas_lib.sfd fd2pragma -s 38 -t $PROTO -i $SFD/mathieeedoubtrans_lib.sfd fd2pragma -s 38 -t $PROTO -i $SFD/mathieeesingbas_lib.sfd fd2pragma -s 38 -t $PROTO -i $SFD/mathieeesingtrans_lib.sfd fd2pragma -s 38 -t $PROTO -i $SFD/mathtrans_lib.sfd fd2pragma -s 38 -t $PROTO -i $SFD/misc_lib.sfd fd2pragma -s 38 -t $PROTO -i $SFD/nonvolatile_lib.sfd fd2pragma -s 38 -t $PROTO -i $SFD/potgo_lib.sfd fd2pragma -s 38 -t $PROTO -i $SFD/ramdrive_lib.sfd fd2pragma -s 38 -t $PROTO -i $SFD/realtime_lib.sfd fd2pragma -s 38 -t $PROTO -i $SFD/rexxsyslib_lib.sfd fd2pragma -s 38 -t $PROTO -i $SFD/timer_lib.sfd fd2pragma -s 38 -t $PROTO -i $SFD/trackfile_lib.sfd fd2pragma -s 38 -t $PROTO -i $SFD/translator_lib.sfd fd2pragma -s 38 -t $PROTO -i $SFD/utility_lib.sfd fd2pragma -s 38 -t $PROTO -i $SFD/wb_lib.sfd echo "Generating inline headers..." fd2pragma -s 70 -t $INLINE -i $SFD/bullet_lib.sfd fd2pragma -s 70 -t $INLINE -i $SFD/amigaguide_lib.sfd fd2pragma -s 70 -t $INLINE -i $SFD/asl_lib.sfd fd2pragma -s 70 -t $INLINE -i $SFD/battclock_lib.sfd fd2pragma -s 70 -t $INLINE -i $SFD/battmem_lib.sfd fd2pragma -s 70 -t $INLINE -i $SFD/cardres_lib.sfd fd2pragma -s 70 -t $INLINE -i $SFD/cia_lib.sfd fd2pragma -s 70 -t $INLINE -i $SFD/colorwheel_lib.sfd fd2pragma -s 70 -t $INLINE -i $SFD/commodities_lib.sfd fd2pragma -s 70 -t $INLINE -i $SFD/console_lib.sfd fd2pragma -s 70 -t $INLINE -i $SFD/datatypes_lib.sfd fd2pragma -s 70 -t $INLINE -i $SFD/disk_lib.sfd fd2pragma -s 70 -t $INLINE -i $SFD/diskfont_lib.sfd fd2pragma -s 70 -t $INLINE -i $SFD/dos_lib.sfd fd2pragma -s 70 -t $INLINE -i $SFD/dtclass_lib.sfd fd2pragma -s 70 -t $INLINE -i $SFD/exec_lib.sfd fd2pragma -s 70 -t $INLINE -i $SFD/expansion_lib.sfd fd2pragma -s 70 -t $INLINE -i $SFD/gadtools_lib.sfd fd2pragma -s 70 -t $INLINE -i $SFD/graphics_lib.sfd fd2pragma -s 70 -t $INLINE -i $SFD/icon_lib.sfd fd2pragma -s 70 -t $INLINE -i $SFD/iffparse_lib.sfd fd2pragma -s 70 -t $INLINE -i $SFD/input_lib.sfd fd2pragma -s 70 -t $INLINE -i $SFD/intuition_lib.sfd fd2pragma -s 70 -t $INLINE -i $SFD/keymap_lib.sfd fd2pragma -s 70 -t $INLINE -i $SFD/layers_lib.sfd fd2pragma -s 70 -t $INLINE -i $SFD/locale_lib.sfd fd2pragma -s 70 -t $INLINE -i $SFD/lowlevel_lib.sfd fd2pragma -s 70 -t $INLINE -i $SFD/mathffp_lib.sfd fd2pragma -s 70 -t $INLINE -i $SFD/mathieeedoubbas_lib.sfd fd2pragma -s 70 -t $INLINE -i $SFD/mathieeedoubtrans_lib.sfd fd2pragma -s 70 -t $INLINE -i $SFD/mathieeesingbas_lib.sfd fd2pragma -s 70 -t $INLINE -i $SFD/mathieeesingtrans_lib.sfd fd2pragma -s 70 -t $INLINE -i $SFD/mathtrans_lib.sfd fd2pragma -s 70 -t $INLINE -i $SFD/misc_lib.sfd fd2pragma -s 70 -t $INLINE -i $SFD/nonvolatile_lib.sfd fd2pragma -s 70 -t $INLINE -i $SFD/potgo_lib.sfd fd2pragma -s 70 -t $INLINE -i $SFD/ramdrive_lib.sfd fd2pragma -s 70 -t $INLINE -i $SFD/realtime_lib.sfd fd2pragma -s 70 -t $INLINE -i $SFD/rexxsyslib_lib.sfd fd2pragma -s 70 -t $INLINE -i $SFD/timer_lib.sfd fd2pragma -s 70 -t $INLINE -i $SFD/trackfile_lib.sfd fd2pragma -s 70 -t $INLINE -i $SFD/translator_lib.sfd fd2pragma -s 70 -t $INLINE -i $SFD/utility_lib.sfd fd2pragma -s 70 -t $INLINE -i $SFD/wb_lib.sfd echo "Done!" Code:
SourceFile: /opt/vbcc/_ndk32/SFD/layers_lib.sfd Warning 11 in line 12: Expected argument name. Warning 11 in line 13: Expected argument name. Warning 11 in line 37: Expected argument name. Warning 11 in line 38: Expected argument name. struct Layer *CreateUpfrontLayer(struct Layer_Info *li, struct BitMap *bm, LONG x0, LONG y0, LONG x1, LONG y1, LONG flags, [struct BitMap *bm2] )(A0,A1,D0,D1,D2,D3,D4,A2) struct Layer *CreateBehindLayer(struct Layer_Info *li, struct BitMap *bm, LONG x0, LONG y0, LONG x1, LONG y1, LONG flags, [struct BitMap *bm2] )(A0,A1,D0,D1,D2,D3,D4,A2) Code:
SourceFile: /opt/vbcc/_ndk32/SFD/intuition_lib.sfd Warning 62 in line 64: Varargs function cannot have different arguments. Code:
SourceFile: /opt/vbcc/_ndk32/SFD/exec_lib.sfd Warning 68 in line 203: Name of argument 0 conflicts with keyword 'Tag'. Code:
> GetAttr (IA_Width, win_resize_image, &win_resize_gadget_width); warning 85 in line 548 of "window.c": assignment of different pointers > GetAttr (IA_Height, win_resize_image, &win_resize_gadget_height); warning 85 in line 549 of "window.c": assignment of different pointers > GetAttr(PGA_Top, (Object*)the_gadget, (unsigned long*)&top); warning 85 in line 1745 of "window.c": assignment of different pointers |
14 June 2021, 16:23 | #9 | ||||
Natteravn
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,569
|
Quote:
Anyway, there is no support for [type name]in fd2pragma as far as I can see. And this is a problem, as the bracketed arguments are missing in the inlines. You can always manually remove them from the SFD, of course... Quote:
Here is a quick hack, which makes it work, but it needs some testing: Code:
--- fd2pragma.c 6 Jun 2021 13:53:01 -0000 1.12 +++ fd2pragma.c 14 Jun 2021 14:06:13 -0000 @@ -3046,7 +3046,8 @@ ++in.pos; } ap2 = (struct AmiPragma *)(AmiPragma.Last); - if(ft && !(ft & FUNCFLAG_TAG) && ap.NumArgs != ap2->NumArgs) + if((ft & FUNCFLAG_ALIAS) || + (ft && !(ft & FUNCFLAG_TAG) && ap.NumArgs != ap2->NumArgs)) ft = 0; /* like DoPkt, handle as seperate function */ if(ft) /* handle alias and varargs */ { Quote:
Quote:
|
||||
15 June 2021, 16:12 | #10 | |
Registered User
Join Date: Aug 2018
Location: Minneapolis, USA
Posts: 301
|
Quote:
It "smells" like something is just wrong in my 3.2 setup for VBCC, and the symptom is this warning about pointer types. I tried just casting them to their expected types, which usually is enough to shut the compiler up, but get exactly the same message. Here's the whole bit of code up to the warning: Code:
// creates the gadgets needed for the window, returns pointer to the first gadget struct Gadget* Window_CreateGadgets(WB2KWindow* the_surface) { struct Screen* scr = global_app->screen_; unsigned long win_resize_gadget_width = 18; unsigned long win_resize_gadget_height = 11; // Default size struct Image* win_resize_image; long window_content_top = scr->WBorTop + scr->RastPort.TxHeight + 1; int button_top = scr->WBorTop + scr->Font->ta_YSize + 1; //DEBUG_OUT(("create gadgets: rastport text height=%i, wbortop=%i", scr->RastPort.TxHeight, scr->WBorTop)); // create the shared bevel button image (object) that will be used by all bevel buttons in this window // can't be global, because needs the drawinfo from the actual windows. if ( (the_surface->bevel_button_image_ = NewObject(NULL, (STRPTR)"frameiclass", IA_Recessed, FALSE, IA_EdgesOnly, FALSE, IA_FrameType, FRAME_BUTTON, GA_DrawInfo, the_surface->draw_info_, TAG_END)) == NULL) { LOG_ERR(("Window_CreateGadgets %d: Could not create bevel button image", __LINE__)); return NULL; } // figure out how big the Window sizing gadget image is, so we can have scrollbars not collide with it if ( (win_resize_image = NewObject (NULL, (STRPTR)SYSICLASS, SYSIA_Which, SIZEIMAGE, SYSIA_DrawInfo, the_surface->draw_info_, TAG_DONE)) != NULL) { // Get size gadget geometry GetAttr ((unsigned long)IA_Width, (APTR)win_resize_image, (unsigned long*)&win_resize_gadget_width); GetAttr ((unsigned long)IA_Height, (APTR)win_resize_image, (unsigned long*)&win_resize_gadget_height); // don't need the image object any more DisposeObject (win_resize_image); } For the layers_lib.sfd problem, I'll try using the .fd files to make that one. Might be a decent workaround until we know what those brackets are supposed to be doing. |
|
16 June 2021, 04:34 | #11 |
Registered User
Join Date: Aug 2018
Location: Minneapolis, USA
Posts: 301
|
Good news (from my point of view): if I use .fd + clib, I can get it building my app in such a way that it runs normally. (Still getting those warnings, but assuming that's unrelated really).
Tweaked script if anyone needs something before a pre-baked solution is available: Code:
#!/bin/zsh export VBCC=/opt/vbcc export PATH=$VBCC/bin:$PATH export PROTO=$VBCC/targets/m68k-amigaos/include/proto export INLINE=$VBCC/targets/m68k-amigaos/include/inline export SFD=$VBCC/_ndk32/SFD export FD=$VBCC/_ndk32/FD export CLIB=$VBCC/_ndk32/include_h/clib # make sure it can find it's fd2pragma.types file, where ever I stashed that... cd $VBCC/fd2pragma echo "Generating proto headers..." fd2pragma -s 38 -t $PROTO -i $SFD/bullet_lib.sfd fd2pragma -s 38 -t $PROTO -i $SFD/amigaguide_lib.sfd fd2pragma -s 38 -t $PROTO -i $SFD/asl_lib.sfd fd2pragma -s 38 -t $PROTO -i $SFD/battclock_lib.sfd fd2pragma -s 38 -t $PROTO -i $SFD/battmem_lib.sfd fd2pragma -s 38 -t $PROTO -i $SFD/cardres_lib.sfd fd2pragma -s 38 -t $PROTO -i $SFD/cia_lib.sfd fd2pragma -s 38 -t $PROTO -i $SFD/colorwheel_lib.sfd fd2pragma -s 38 -t $PROTO -i $SFD/commodities_lib.sfd fd2pragma -s 38 -t $PROTO -i $SFD/console_lib.sfd fd2pragma -s 38 -t $PROTO -i $SFD/datatypes_lib.sfd fd2pragma -s 38 -t $PROTO -i $SFD/disk_lib.sfd fd2pragma -s 38 -t $PROTO -i $SFD/diskfont_lib.sfd fd2pragma -s 38 -t $PROTO -i $SFD/dos_lib.sfd fd2pragma -s 38 -t $PROTO -i $SFD/dtclass_lib.sfd fd2pragma -s 38 -t $PROTO -i $SFD/exec_lib.sfd fd2pragma -s 38 -t $PROTO -i $SFD/expansion_lib.sfd fd2pragma -s 38 -t $PROTO -i $SFD/gadtools_lib.sfd fd2pragma -s 38 -t $PROTO -i $SFD/graphics_lib.sfd fd2pragma -s 38 -t $PROTO -i $SFD/icon_lib.sfd fd2pragma -s 38 -t $PROTO -i $SFD/iffparse_lib.sfd fd2pragma -s 38 -t $PROTO -i $SFD/input_lib.sfd fd2pragma -s 38 -t $PROTO -i $SFD/intuition_lib.sfd fd2pragma -s 38 -t $PROTO -i $SFD/keymap_lib.sfd # fd2pragma -s 38 -t $PROTO -i $SFD/layers_lib.sfd ### this errors out fd2pragma -s 38 -t $PROTO -i $FD/layers_lib.fd fd2pragma -s 38 -t $PROTO -i $SFD/locale_lib.sfd fd2pragma -s 38 -t $PROTO -i $SFD/lowlevel_lib.sfd fd2pragma -s 38 -t $PROTO -i $SFD/mathffp_lib.sfd fd2pragma -s 38 -t $PROTO -i $SFD/mathieeedoubbas_lib.sfd fd2pragma -s 38 -t $PROTO -i $SFD/mathieeedoubtrans_lib.sfd fd2pragma -s 38 -t $PROTO -i $SFD/mathieeesingbas_lib.sfd fd2pragma -s 38 -t $PROTO -i $SFD/mathieeesingtrans_lib.sfd fd2pragma -s 38 -t $PROTO -i $SFD/mathtrans_lib.sfd fd2pragma -s 38 -t $PROTO -i $SFD/misc_lib.sfd fd2pragma -s 38 -t $PROTO -i $SFD/nonvolatile_lib.sfd fd2pragma -s 38 -t $PROTO -i $SFD/potgo_lib.sfd fd2pragma -s 38 -t $PROTO -i $SFD/ramdrive_lib.sfd fd2pragma -s 38 -t $PROTO -i $SFD/realtime_lib.sfd fd2pragma -s 38 -t $PROTO -i $SFD/rexxsyslib_lib.sfd fd2pragma -s 38 -t $PROTO -i $SFD/timer_lib.sfd fd2pragma -s 38 -t $PROTO -i $SFD/trackfile_lib.sfd fd2pragma -s 38 -t $PROTO -i $SFD/translator_lib.sfd fd2pragma -s 38 -t $PROTO -i $SFD/utility_lib.sfd fd2pragma -s 38 -t $PROTO -i $SFD/wb_lib.sfd echo "Generating inline headers..." fd2pragma -s 70 -t $INLINE -i $SFD/bullet_lib.sfd fd2pragma -s 70 -t $INLINE -i $SFD/amigaguide_lib.sfd fd2pragma -s 70 -t $INLINE -i $SFD/asl_lib.sfd fd2pragma -s 70 -t $INLINE -i $SFD/battclock_lib.sfd fd2pragma -s 70 -t $INLINE -i $SFD/battmem_lib.sfd fd2pragma -s 70 -t $INLINE -i $SFD/cardres_lib.sfd fd2pragma -s 70 -t $INLINE -i $SFD/cia_lib.sfd fd2pragma -s 70 -t $INLINE -i $SFD/colorwheel_lib.sfd fd2pragma -s 70 -t $INLINE -i $SFD/commodities_lib.sfd fd2pragma -s 70 -t $INLINE -i $SFD/console_lib.sfd fd2pragma -s 70 -t $INLINE -i $SFD/datatypes_lib.sfd fd2pragma -s 70 -t $INLINE -i $SFD/disk_lib.sfd fd2pragma -s 70 -t $INLINE -i $SFD/diskfont_lib.sfd fd2pragma -s 70 -t $INLINE -i $SFD/dos_lib.sfd fd2pragma -s 70 -t $INLINE -i $SFD/dtclass_lib.sfd fd2pragma -s 70 -t $INLINE -i $SFD/exec_lib.sfd fd2pragma -s 70 -t $INLINE -i $SFD/expansion_lib.sfd fd2pragma -s 70 -t $INLINE -i $SFD/gadtools_lib.sfd fd2pragma -s 70 -t $INLINE -i $SFD/graphics_lib.sfd fd2pragma -s 70 -t $INLINE -i $SFD/icon_lib.sfd fd2pragma -s 70 -t $INLINE -i $SFD/iffparse_lib.sfd fd2pragma -s 70 -t $INLINE -i $SFD/input_lib.sfd fd2pragma -s 70 -t $INLINE -i $SFD/intuition_lib.sfd fd2pragma -s 70 -t $INLINE -i $SFD/keymap_lib.sfd # fd2pragma -s 70 -t $INLINE -i $SFD/layers_lib.sfd ### this errors out fd2pragma -s 70 -t $INLINE -i $FD/layers_lib.fd -c $CLIB/layers_protos.h fd2pragma -s 70 -t $INLINE -i $SFD/locale_lib.sfd fd2pragma -s 70 -t $INLINE -i $SFD/lowlevel_lib.sfd fd2pragma -s 70 -t $INLINE -i $SFD/mathffp_lib.sfd fd2pragma -s 70 -t $INLINE -i $SFD/mathieeedoubbas_lib.sfd fd2pragma -s 70 -t $INLINE -i $SFD/mathieeedoubtrans_lib.sfd fd2pragma -s 70 -t $INLINE -i $SFD/mathieeesingbas_lib.sfd fd2pragma -s 70 -t $INLINE -i $SFD/mathieeesingtrans_lib.sfd fd2pragma -s 70 -t $INLINE -i $SFD/mathtrans_lib.sfd fd2pragma -s 70 -t $INLINE -i $SFD/misc_lib.sfd fd2pragma -s 70 -t $INLINE -i $SFD/nonvolatile_lib.sfd fd2pragma -s 70 -t $INLINE -i $SFD/potgo_lib.sfd fd2pragma -s 70 -t $INLINE -i $SFD/ramdrive_lib.sfd fd2pragma -s 70 -t $INLINE -i $SFD/realtime_lib.sfd fd2pragma -s 70 -t $INLINE -i $SFD/rexxsyslib_lib.sfd fd2pragma -s 70 -t $INLINE -i $SFD/timer_lib.sfd fd2pragma -s 70 -t $INLINE -i $SFD/trackfile_lib.sfd fd2pragma -s 70 -t $INLINE -i $SFD/translator_lib.sfd fd2pragma -s 70 -t $INLINE -i $SFD/utility_lib.sfd fd2pragma -s 70 -t $INLINE -i $SFD/wb_lib.sfd echo "Done!" |
16 June 2021, 12:57 | #12 | |
Natteravn
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,569
|
Quote:
But going the FD-route is certainly an option. I am always building the official m68k-amigaos target archives using FD files and clib files only. I should really switch to SFD, which theoretically makes it easier, but I was scared to run into problems, like you did. |
|
16 June 2021, 13:11 | #13 | ||
Natteravn
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,569
|
Quote:
Quote:
unsigned long*doesn't help much, when GetAttr() needs an ULONG*. I found out that the exec/types.h header from NDK 3.2 uses C99 stdint.h to define the AmigaOS types like ULONG. In the past it was simply defined as unsigned long. Now ULONG is defined as: Code:
typedef uint32_t ULONG; /* unsigned 32-bit quantity */ Code:
typedef unsigned int uint32_t; |
||
16 June 2021, 14:04 | #14 |
bye
Join Date: Jun 2016
Location: Some / Where
Posts: 684
|
even after 25 years you can't expect a standard like 'sys/types.h' to be used or supported...
|
16 June 2021, 15:20 | #15 | |
Registered User
Join Date: Aug 2018
Location: Minneapolis, USA
Posts: 301
|
Quote:
|
|
16 June 2021, 16:18 | #16 | |
bye
Join Date: Jun 2016
Location: Some / Where
Posts: 684
|
Quote:
the sfd file does not generate Code:
struct Layer * __CreateUpfrontLayer(__reg("a6") struct Library *, __reg("a0") struct Layer_Info * li, __reg("a1") struct BitMap * bm, __reg("d0") LONG x0, __reg("d1") LONG y0, __reg("d2") LONG x1, __reg("d3") LONG y1, __reg("d4") LONG flags, __reg("a2") struct BitMap * bm2)="\tjsr\t-36(a6)"; #define CreateUpfrontLayer(li, bm, x0, y0, x1, y1, flags, bm2) __CreateUpfrontLayer(LayersBase, (li), (bm), (x0), (y0), (x1), (y1), (flags), (bm2)) struct Layer * __CreateBehindLayer(__reg("a6") struct Library *, __reg("a0") struct Layer_Info * li, __reg("a1") struct BitMap * bm, __reg("d0") LONG x0, __reg("d1") LONG y0, __reg("d2") LONG x1, __reg("d3") LONG y1, __reg("d4") LONG flags, __reg("a2") struct BitMap * bm2)="\tjsr\t-42(a6)"; #define CreateBehindLayer(li, bm, x0, y0, x1, y1, flags, bm2) __CreateBehindLayer(LayersBase, (li), (bm), (x0), (y0), (x1), (y1), (flags), (bm2)) => all further offsets are incorrect |
|
16 June 2021, 16:30 | #17 | |
Registered User
Join Date: Aug 2018
Location: Minneapolis, USA
Posts: 301
|
Quote:
Thanks for that. I prefer to use "unambiguous" data types when I can, but even when I'm being my best about that (which honestly, for non-work: not so often), unambiguous is a pretty risky word for C. Ah, well. Somewhere on my to-do list for this project is "check all data type declarations and make consistent". I should probably just surrender and use all native Amiga ULONGs and whatnot. |
|
16 June 2021, 21:53 | #18 |
Natteravn
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,569
|
fd2pragma doesn't like brackets in SFD files like
[struct BitMap *bm2]and ignores the line, which is fatal for the offset count. Olaf Barthel just told me that the layers_lib.sfd was fixed for the next release, so anybody may remove these brackets locally. |
16 June 2021, 21:55 | #19 |
Natteravn
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,569
|
|
17 June 2021, 12:28 | #20 |
bye
Join Date: Jun 2016
Location: Some / Where
Posts: 684
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
AmigaOS 3.2 NDK released | bubbob42 | News | 16 | 14 May 2024 18:17 |
cybppc.device & AmigaOS 4.1 FE , problem | drluking | support.Hardware | 23 | 19 December 2021 20:57 |
AmigaOS & lha | Ulysses13 | New to Emulation or Amiga scene | 4 | 04 June 2021 20:58 |
VBCC/NDK/Make AmiTCP dependency? | Sim085 | support.Apps | 2 | 22 February 2020 22:32 |
VBCC & guru meditation | majikeyric | Coders. C/C++ | 11 | 10 October 2018 08:37 |
|
|