BartmanAbyss / vscode-amiga-debug

One-stop Visual Studio Code Extension to compile, debug and profile Amiga C/C++ programs compiled by the bundled gcc 12.2 with the bundled WinUAE/FS-UAE.
GNU General Public License v3.0
303 stars 38 forks source link

Unable to use amigalib. #212

Closed m1awicki closed 1 year ago

m1awicki commented 1 year ago

Hi, it seems that it is not possible to use Amiga lib. After including proto/alib.h lots of compilation errors appear due to missing __stdargs. Adding #define __stdargs solves the compilation problem but then program fails to link due to missing symbols.

In order to reproduce the problem simply add #include <proto/alib.h> to main.c in demo project included with VSCode exstension.

Example compilation error (fragment):

.vscode\extensions\bartmanabyss.amiga-debug-1.7.1\bin\win32\opt\m68k-amiga-elf\sys-include\clib\alib_protos.h:58:1: error: unknown type name '__stdargs'
   58 | __stdargs APTR LibAllocPooled( APTR poolHeader, ULONG memSize );

Linker error:

.vscode/extensions/bartmanabyss.amiga-debug-1.7.1/bin/win32/opt/bin/../lib/gcc/m68k-amiga-elf/12.2.0/../../../../m68k-amiga-elf/bin/ld.exe: obj/main.o: in function `main':
F:/Amiga/Development/repos/abyss_demo/main.c:369: undefined reference to `CreateExtIO'
collect2.exe: error: ld returned 1 exit status
gnumake: *** [Makefile:50: out/a.elf] Error 1
BartmanAbyss commented 1 year ago

Sorry, Amiga.lib is not included

m1awicki commented 1 year ago

Are there any chances for this to change?

BartmanAbyss commented 1 year ago

Probably not unless there are sources of Amiga.lib available. This gcc branch operates on ELF files, not Amiga Hunk files b

m1awicki commented 1 year ago

Thank you for quick reply. I am closing the issue.