View Single Post
Old 15 June 2021, 06:05   #1285
bebbo
bye
 
Join Date: Jun 2016
Location: Some / Where
Posts: 680
Quote:
Originally Posted by arcanist View Post
That's how I thought it should work, too, but it doesn't appear to.

Code:
#include <proto/exec.h>
#include <proto/layout.h>

struct Library* LayoutBase;

int main() {
        LayoutBase = OpenLibrary("gadgets/layout.gadget", 0);
}
Code:
m68k-amigaos-gcc test.c
SnoopDOS shows a failed OpenLibrary for "layout.library" and the program terminates before reaching main.

Initialization means:
Code:
 struct Library* LayoutBase = NULL;

otherwise it's only a declaration.

PS: I removed auto opening for layout.library - there is non in AmigaOS 1/2/3

Last edited by bebbo; 15 June 2021 at 07:21.
bebbo is offline  
 
Page generated in 0.05722 seconds with 11 queries