View Single Post
Old 24 April 2017, 23:09   #2
patrik
Registered User
patrik's Avatar
 
Join Date: Jan 2005
Location: UmeƄ
Age: 40
Posts: 591
Responding to myself in case someone else searches for this in the future. This is how you do it for the above example:
Code:
#include <exec/exec.h>
#include <dos/dos.h>

#include <proto/exec.h>
#include <proto/dos.h>

struct ExecBase *SysBase = NULL;
struct DosLibrary *DOSBase = NULL;

__startup AROS_PROCH(Something, arguments, argumentsLength, sysBase) {
	AROS_PROCFUNC_INIT

	SysBase = sysBase;
	DOSBase = (struct DosLibrary *) OpenLibrary("dos.library", 0);
	if(NULL != DOSBase) {
		Printf("Hello world!\n");
	}
	CloseLibrary((struct Library *) DOSBase);
	return 0;

	AROS_PROCFUNC_EXIT
}
And compile with:
Code:
gcc -nostartfiles -o helloamiga helloamiga.c

Last edited by patrik; 24 April 2017 at 23:46.
patrik is offline  
 
Page generated in 0.05879 seconds with 11 queries