DEUTSCHE VERSION |
|
Links | | | Forums | | | Comments | | | Report news |
Chat | | | Polls | | | Newsticker | | | Archive |
[Login] [Register] [Forgot your password?] |
| |||
29.Oct.2022 |
AmigaOS 4.1: Introduction to Software Development Kit V54.16, part 2 (update) Tree weeks ago we had published the first part of the introduction to Hyperion Entertainment's recently updated Software Development Kit (SDK) V54.16 written by Josef Wegner. Now the second part: "AmigaOS 4.1 SDK 54.16 - How to install it? In the second article I will show how to install the SDK. Since I unfortunately cannot go into every individual configuration, I assume that AmigaOS 4.1 Final Edition Update 2 is already installed. However, it is irrelevant whether further software or the Enhancer 2.2 is installed. What is required for the installation? As mentioned in the first paragraph, update 2 of AmigaOS 4.1 Final Edition should be installed. Besides that you need:
Yes, there are one or two things you should do before you install the SDK installed: The first thing you should do is make a copy of your S:User startup. Apparently there is a bug in the installer program or installer script, that the last line is deleted from the user startup. After the installation compare both files, and make sure that nothing is missing. The second thing is, if you have an older SDK installed, you should remove or comment out the old one from your s:User startup file or comment it out. The lines in question are the following ones: ;BEGIN AmigaOS 4.1 SDK assign SDK: Work:SDK execute SDK:S/sdk-startup ;END AmigaOS 4.1 SDK Delete these lines or comment out the assign/excute with a ;. As next you should reboot the Amiga and finally delete or rename the old SDK directory, move it or rename it. Now it is best to download the installation archive from Hyperion's website and transfer it to the Amiga if necessary. The second step is to unpack the archive to a destination where you have enough space: this can be done with the standard program Unarc of AmigaOS 4.1 or Archiver from the Enhancer 2.2 or the command line tool "LhA". Depending on what is installed. I personally prefer the command line, so I run the following: 13. > Temp: > lha -a x SHARE:SDK-54.16.lha The option "-a" tells LhA to restore the attributes (date, permissions). "x" stands for extract the files with full path. The last part tells LhA where the installation archive is stored. Unpacking the installation archive alone takes 3-4 minutes. Enough time to get a coffee for the next step. The next step is to start the installer "Install SDK" in the freshly unpacked directory "SDK_Install": And then select the components of the SDK: A full installation with all four GCC versions requires a bit more than 900 MB. On a NG system (SAM, X1000, or X5000) there should be no space problems. On a Classic system you should limit yourself to one of the four GCCs. This saves about 500MB and some time during the the installation. A complete installation with all four GCCs takes about 10 minutes on my X5000. On Classic systems or WinUAE it takes significantly more. After succesfully installed it... ...you should check, if Startup file is fine and if these new lines have been added: ;BEGIN AmigaOS 4.1 SDK assign SDK: Work:SDK execute SDK:S/sdk-startup ;END AmigaOS 4.1 SDK Then you can reboot and skip the following chapter. In the chapter after next we will test the SDK and compile the first program. What do I do if it didn't work? Not enough disk space? The safest thing to do is to delete the SDK that you did not finish installing. Then you can either install the SDK with fewer options, install it on a different drive, or clean up the drive and then try again. Archive error? I had this during an installation. Solution was as above, delete failed attempt and try again. Error unpacking the installation archive or writing the files? Please make sure that the SDK is installed on a local drive, preferably formatted with SFS or NGFS. Also, please do not use a shared drive in (Win)UAE. If this is already the case and there are still errors, you should check the drive for errors. With NGFS this can be done with the command: NGFCheck Work: "Work:" stands for the volume name or the drive. SDK was installed. What comes next? Now we can finally use the SDK. In article 1 it was said that the SDK comes with several GCCs and the VBCC. So let's see if all of them work. If at least one GCC is installed, we can see with the following command if the GCC is found and which version of the GCC is currently used: gcc -v ....gcc version 8.4.0 (adtools build 8.4.0) The SDK provides several GCCs. How can I change the GCC? Use the tool "set_defGCC" in SDK:Tools for this. This directory is not in the search path, so you have to open it either with the Workbench or the full path. sdk:Tools/set_defGCC A small window appears where you can choose between the four GCC versions. But you can also specify the version directly in the Shell. To do this appends the desired version after the command. To select GCC 11, enter the following in the Shell: 4. > Workbench: > sdk:Tools/set_defGCC 11 4. > Workbench: > gcc -v ...gcc version 11.2.0 (adtools build 11.2.0) But be careful, you can also choose a GCC that is not installed. In this case the Shell will not find a GCC anymore. To solve this, call the tool again and select an installed GCC. If VBCC is also installed, you can test it with the following command: vc -v vc frontend for vbcc (c) in 1995-2020 by Volker Barthelmann No objects to link Now we can run the first test program. As usual, we write a HelloWorld program in standard C, which would also compile and run on another system without code changes. Enter the following lines in the editor of choice and save them somewhere as "hello.c". Please leave out the line numbers! RAM Disk:Shared/Sources/hello/hello.c 1 #include <stdio.h> 2 int main(void) 3 { 4 printf("Hello World!\n"); 5 return (0); 6 } To compile and start in a Shell, run the following: For the GCC: 3. > RAM Disk:Shared/Sources/hello > gcc hello.c -o hello 3. > RAM Disk:Shared/Sources/hello > hello Hello World! With the VBCC: 3. > RAM Disk:Shared/Sources/hello > vc hello.c -o hello 3. > RAM Disk:Shared/Sources/hello > hello Hello World! What have I done? I don't want to dive too deep into the structure and peculiarities of C here. But I'll try to explain briefly which line does what in the program.
main(void) { printf("Hallo Welt!\n"); } If C lacks the return or variable type, C simply takes int (integer type). Known problems
First of all, I'm glad you made it this far. The following links might be interesting:
Update: (29.10.2022, 19:50, dr) The main developer of the SDK, George 'walkero' Sokianos, has read the tutorial with interest and expresses his thanks for Josef's commitment. He also has three additions that we would like to add here:
[News message: 29. Oct. 2022, 06:59] [Comments: 1 - 29. Oct. 2022, 20:10] [Send via e-mail] [Print version] [ASCII version] | ||
|
Masthead |
Privacy policy |
Netiquette |
Advertising |
Contact
Copyright © 1998-2024 by amiga-news.de - all rights reserved. |