18 March 2020, 22:26 | #1 |
Registered User
Join Date: Sep 2019
Location: Essen/Germany
Age: 55
Posts: 463
|
setjump with m68k-amigaos gives an error
I tried to compile the libpng library, which worked so far. However, when I try to build a sample code using it, I get some error when I try to use the setjump function which should be used for error handling:
The example I used is here: http://zarb.org/~gc/html/libpng.html Code:
if (setjmp(png_jmpbuf(png_ptr))) return PNGShutdown(false, fp, "Error during init io"); Code:
main.cpp:60:72: error: invalid conversion from 'void (__attribute__((__stkparm__)) *)(int*, int)' to 'png_longjmp_ptr {aka void (*)(int*, int)}' [-fpermissive] if (setjmp(png_jmpbuf(png_ptr))) Any idea how to fix it? I recompiled libPNG with setjump disabled, but then I get some other error, because you have to provide your own function instead and I haven't figured out yet, what it expects. Maybe this would be the way to go? Or is there some easier way to fix the above error? |
25 March 2020, 11:46 | #2 | |
bye
Join Date: Jun 2016
Location: Some / Where
Posts: 680
|
Quote:
uhm... this code compiles and seems to run Code:
m68k-amigaos-gcc test.c -noixemul -m68020 -Os -o b -lpng -lm -lz vamos -C20 test Usage: program_name <file_in> <file_out> Program aborted |
|
26 March 2020, 07:17 | #3 |
Registered User
Join Date: Sep 2019
Location: Essen/Germany
Age: 55
Posts: 463
|
I also fixed this already with a workaround by putting a helper in a ".c" file. When I compile this from g++ then I get this error, apparently again a __stdarg problem.
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
m68k-amigaos-gdb | bebbo | Coders. C/C++ | 94 | 06 May 2023 21:56 |
trying to make m68k-amigaos-gdb on windows | jotd | Coders. C/C++ | 12 | 30 December 2020 06:09 |
Calling convention for gcc (m68k-amigaos) | sparhawk | Coders. Language | 3 | 11 January 2020 18:36 |
m68k-amigaos-ld.exe bug ? | FrenchShark | Coders. General | 2 | 30 November 2009 09:54 |
Shorten ported to AmigaOS m68k and WarpOS | Paul | News | 0 | 20 August 2006 12:05 |
|
|