![]() |
![]() |
#21 | |||
Natteravn
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,583
|
Quote:
Much easier is to take the original NDK1.3 and add essential stuff, that is missing, in the compiler's include path. My approach for vbcc was that the kick13-target just adds the cliband protodirectories, but doesn't modify anything! As Olaf already mentioned the missing prototypes were the biggest problem at that time, and different compiler vendors all had their own solutions (like functions.h). This is something you would have to adapt anyway, when compiling old sources. Quote:
The NDK3.2 headers fix that, BTW. Quote:
|
|||
![]() |
![]() |
#22 | ||
Registered User
Join Date: Aug 2010
Location: Germany
Posts: 548
|
Quote:
Commodore was working on it, but first the A2065 (or rather, its precursor from Ameristar) had to ship, and then the networking software followed which had to be linked against the application which made use of it (that was the A225 product, if I remember correctly). From what I recall, that must have been around 1989 and prompted the development of the SANA standard for Amiga networking devices. Hard-coded driver support just would not cut it. Changing the struct timeval declaration in this manner is, if you would excuse the term, anachronistic. This is dousing a fire before it has even had a chance to start glimmering, let alone smoking. Mind you, in 1989 AmiTCP was still a few years away and would require Kickstart 2.0, as a minimum. Even ixemul.library was still years away. What would be really helpful would be a solution similiar to what shipped as part of Lattice 'C' 5.0, which implemented the draft 1989/1990 ANSI 'C' standard. This version added a "proto/#?.h" header file for every known operating system library and device (including one for clist.library, which was cut in Kickstart 1.2 because its agent demanded too money). Thus, "#include <proto/exec.h>" would become possible. Never mind that the state of the NDK 1.3 header files was still unchanged (no correct function prototypes in the graphics.library header files and certainly not in any amiga.lib header file). Last edited by Olaf Barthel; 13 July 2023 at 12:25. |
||
![]() |
![]() |
#23 | |
Natteravn
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,583
|
Quote:
My impression was that Bebbo listed different kinds of patches he needed, and that only the first one refered to 1.3. The timeval patch is probably something he did for 3.9 only. In the end it doesn't matter, as such a patch does more harm than help. |
|
![]() |
![]() |
#24 |
Registered User
Join Date: May 2001
Location: ?
Posts: 19,665
|
Guys I understand there's a discussion that's important here but maybe split it into its own thread so it can be discussed properly? Because now I just get more and more confused.
I'm bringing this back on my topic: is there a chance to roll back the Amiga GCC environment to an older version and see if that " fixes" my problem? I would need a version from like 2020, or it seems to me that this splicing of 3.0 SDK protos into the NDK13 may just be what's creating my issue, so whatever version that would not have that addition. If that happened before 2020 then I am stumped. |
![]() |
![]() |
#25 | |
Registered User
Join Date: Aug 2010
Location: Germany
Posts: 548
|
Quote:
It seems that struct AnalogSignalInterval is merely defined in the operating system header files created from the NDK 3.9 header files, but not actually declared. Which makes the compiler stop because it does not know the size of the AnalogSignalInterval structure. You mentioned that you are using lowlevel.library on a system running a Kickstart version earlier than 3.1. There is a disk-based version of lowlevel.library which, however checks if it is running on Kickstart 3.1 or higher. Are you sure that lowlevel.library even opens correctly? |
|
![]() |
![]() |
#26 | |
bye
Join Date: Jun 2016
Location: Some / Where
Posts: 696
|
Quote:
Code:
make clean make v date=2020-07-31 Code:
make v and maybe even Code:
make clean make all NDK=3.9 (now NDK 3.2 only having the timeval patch is used by default) |
|
![]() |
![]() |
#27 | |
Registered User
Join Date: Jan 2019
Location: Germany
Posts: 3,504
|
Quote:
I would not call the string manipulation functions in the C standard library particularly valuable, but at least they are widely accepted and standardized, so code can depend on it. |
|
![]() |
![]() |
#28 | |
Registered User
Join Date: Aug 2010
Location: Germany
Posts: 548
|
Quote:
![]() The clist.library used to be a dedicated Kickstart ROM component in Kickstart V31 (= 1.1), and its sole client was console.device. The reason why it was removed in Kickstart 1.2 was that console.device was rewritten, removing the dependencies on clist.library. |
|
![]() |
![]() |
#29 |
Registered User
Join Date: Jan 2019
Location: Germany
Posts: 3,504
|
Ehem, understood. So yes, I'm not the only one who thinks this library was pretty useless. Unfortunately, this does not seem to be the last rewrite of the console. Another one is overdue...
|
![]() |
![]() |
#30 | |
Natteravn
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,583
|
Quote:
It would have helped a lot if you post the source you are talking about. Then we may speculate about the original author's intentions and make suggestions how to make it work. |
|
![]() |
![]() |
#31 | |
Registered User
Join Date: Aug 2010
Location: Germany
Posts: 548
|
Quote:
Just to find out what works and what does not, I built the compiler on Linux and then wrote a lazy one-liner (no Perl involved) which puts each relevant header in the "ndk13-include" directory through the wringer: Code:
find ndk13-include/ -type f -name '*.h' | sed -e 's/ndk13-include\///' | awk '{ printf("echo >include.c \"#include <%s>\" ; m68k-amigaos-gcc -I ndk13-include -c include.c || echo \"#include <%s> failed\" \n", $1, $1); }' | sh clib/graphics_protos.h dos/exall.h graphics/gfxbase.h graphics/gfxmacros.h inline/console.h inline/diskfont.h inline/dos.h inline/exec.h inline/expansion.h inline/graphics.h inline/icon.h inline/intuition.h inline/layers.h inline/mathffp.h inline/mathieeedoubbas.h inline/mathieeedoubtrans.h inline/mathieeesingbas.h inline/mathieeesingtrans.h inline/mathtrans.h inline/potgo.h inline/timer.h inline/translator.h proto/graphics.h The error messages produced are the kind which likely drives newcomers away, up the wall, etc. The use of anachronistic (there's that word again) header files which work only on Kickstart 2.0 and beyond (if at all) aside, fixing the small errors which derail compilation would make a big difference. |
|
![]() |
![]() |
#32 | |
Registered User
Join Date: May 2001
Location: ?
Posts: 19,665
|
Quote:
Also the error is on the protos, not the code itself. maybe I should take it back a notch because there has been a lot of talk and a lot of it also stems from my own confusion. Here's the error again: Code:
In file included from /opt/amiga/m68k-amigaos/ndk13-include/clib/graphics_protos.h:18:0, from /opt/amiga/m68k-amigaos/ndk13-include/proto/graphics.h:6, from /home/MyProject/src/joys.c:16: /opt/amiga/m68k-amigaos/ndk13-include/graphics/gfxbase.h:119:30: error: field 'MonitorVBlank' has incomplete type struct AnalogSignalInterval MonitorVBlank; |
|
![]() |
![]() |
#33 | |||
Registered User
Join Date: Aug 2010
Location: Germany
Posts: 548
|
Quote:
Quote:
1) What header file was included and where was it found? It's "/opt/amiga/m68k-amigaos/ndk13-include/clib/graphics_protos.h". 2) What file prompted it to be included? It's "/opt/amiga/m68k-amigaos/ndk13-include/proto/graphics.h", which in turn was included by "/home/MyProject/src/joys.c" in line 16. 3) What is the issue? A data structure type is not defined which the header file "/opt/amiga/m68k-amigaos/ndk13-include/graphics/gfxbase.h" makes use of in line 119. A data structure field by the name of "MonitorVBlank" is supposed to make use of it. Quote:
The issue is with the contents of the "graphics/gfxbase.h" header file which references a data structure type which has not been defined in the header files which "graphics/gfxbase.h" depends upon. How do you fix that? This may not be fixable because what you see in this error message may prompt the compiler to abort compilation altogether, with no subsequent compilation errors being shown. Put another way, you devise a workaround, you'll get the rest of the compiler errors which are now hidden from you. With 'C' compilers you tend to see an avalanche of error messages, some of which are caused by the compiler trying to be helpful and doing its best to make sense of the code beyond the error it stumbled over. |
|||
![]() |
![]() |
#34 | |||
Natteravn
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,583
|
Ideally the joys.c source and all local header files it depends on. This is preferable, because then we could test that with different compiler environments and find out if it works with one.
Quote:
Quote:
#include <graphics/gfxbase.h>or #include <proto/graphics.h>already show the issue? Quote:
struct AnalogSignalIntervalis undefined. With the original 3.x NDK this cannot happen, because it is defined in <graphics/monitor.h>, which is included directly before struct GfxBaseis defined. Check for that line in your headers. Then check graphics/monitor.hfor struct AnalogSignalInterval. We heard from bebbo that he patched NDK3.9 headers to simulate an NDK1.3 compilation environment. Maybe something went wrong there? There was definitely no MonitorVBlankunder 1.3. So I would expect Code:
UWORD MinDisplayColumn; #ifdef __KICK13__ ULONG reserved[23]; /* for future use */ #else UBYTE ChipRevBits0; ... #endif }; MinDisplayColumn. |
|||
![]() |
![]() |
#35 | ||
Registered User
Join Date: Aug 2010
Location: Germany
Posts: 548
|
Quote:
![]() Quote:
![]() |
||
![]() |
![]() |
#36 | ||
Natteravn
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,583
|
Quote:
Quote:
For variables it is clear. You can either just declare them or define them. But for structures or typedefs? In any case you cannot do both there! Interesting question (and off-topic again) ... ![]() EDIT: Ok, I think there are both cases for structures as well. For me a structure definition is: Code:
struct test { int a,b,c; }; Code:
struct test; ![]() Last edited by phx; 16 July 2023 at 12:09. Reason: structure definition/declaration |
||
![]() |
![]() |
#37 | |
Registered User
Join Date: May 2001
Location: ?
Posts: 19,665
|
Quote:
Again thanks for understanding given my constrains and trying to help. |
|
![]() |
![]() |
#38 |
Registered User
Join Date: May 2001
Location: ?
Posts: 19,665
|
I am again trying to go back to this mess
![]() I decided to just scrap the gameport code (I don't need it), but then I landed on the same problem again. It's literally telling me the error is in ndk13-include/graphics/gfxbase.h Everyone got carried away beyond my understanding in this thread so I ask again, what should I do to fix this problem? Which are the headers I should actually be using and where do I get them from? Code:
In file included from /home/Project/src/graphics.c:15:0: /opt/amiga/m68k-amigaos/ndk13-include/graphics/gfxbase.h:119:30: error: field 'MonitorVBlank' has incomplete type struct AnalogSignalInterval MonitorVBlank; |
![]() |
![]() |
#39 | |
Registered User
Join Date: Mar 2019
Location: Poland
Posts: 67
|
Quote:
As I said earlier, you need includes for kicksart 1,3. - Get the developer cd v 2.1 from the link I posted in message no 14 - backup/rename ndk13-include directory to something else - copy contents of NDK\NDK_1.3\INCLUDES1.3\INCLUDE.H directory from developer cd to ndk13-include directory - run make |
|
![]() |
![]() |
#40 |
Registered User
Join Date: May 2001
Location: ?
Posts: 19,665
|
But I already have those as shown in the error I posted above. It's erroring on the 1.3 includes. Please read again the error code I posted above.
[edit] I did exactly what you said just to be thorough, i copied the files from that exact CD to where you said , and I have even more errors now, also noticed there's far less folders of H headers there than in the old folder. this is not a solution. As I mentioned before I think the only thing that *might* fix this is somehow being able to install an older version of the environment, dated around end of year 2020 Last edited by Amiga1992; 14 December 2023 at 22:49. |
![]() |
Currently Active Users Viewing This Thread: 2 (0 members and 2 guests) | |
Thread Tools | |
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Library for loading graphics | sparhawk | Coders. General | 2 | 07 March 2020 20:38 |
Flickering graphics using BltBitMap function of graphics.library | balrogsoft | Coders. C/C++ | 16 | 04 February 2020 14:54 |
Sas/C vs. GCC regarding graphics.library | Steffest | Coders. C/C++ | 7 | 27 October 2017 03:52 |
graphics library v40.25 | Schlachtwerk | request.Apps | 0 | 14 February 2015 20:47 |
Some question about graphics.library lowlevels | Sonic | Coders. General | 3 | 28 July 2010 11:45 |
|
|