Linux apt/debian has a package management system. It means that if I want to download a library then that library has requisites (dependencies) and they are implicitly retrieved and installed.
- Is there a package management system for the Amiga?
- If not, then for those developing using SDL does this mean that you are needing to manually install all the dependencies of - for example - libSDL2_image? i.e. the JPEG libraries/PNG etc
- When linking a program with a mere call to Load_BMP I see that the linker complains about undefined references (hence why I make this thread regarding package management / dependencies). I am surprised though, because I get undefined references to functions that I am not using in my program. I know that there are different implementations of linkers; those that require symbols to ALL functions in the library and those that only need the symbols to those functions used in your application. Is this the way the Amiga is? That all functions must be resolved even if you are not using them?
make
gcc -c -o main.o main.c
gcc -use-dynld -o main main.o -lSDL2 -lSDL2_image
ld: warning: libpng16.so.16, needed by /SDK/local/newlib/lib/libSDL2_image.so, not found (try using -rpath or -rpath-link)
ld: warning: libtiff.so.9, needed by /SDK/local/newlib/lib/libSDL2_image.so, not found (try using -rpath or -rpath-link)
ld: warning: libjpeg.so.12, needed by /SDK/local/newlib/lib/libSDL2_image.so, not found (try using -rpath or -rpath-link)
ld: warning: libz.so.1, needed by /SDK/local/newlib/lib/libSDL2_image.so, not found (try using -rpath or -rpath-link)
ld: warning: libwebp.so.7, needed by /SDK/local/newlib/lib/libSDL2_image.so, not found (try using -rpath or -rpath-link)
ld: warning: libpthread.so, needed by /SDK/local/newlib/lib/libSDL2_image.so, not found (try using -rpath or -rpath-link)
/SDK/local/newlib/lib/libSDL2_image.so: undefined reference to `png_set_rows@PNG16_0'
/SDK/local/newlib/lib/libSDL2_image.so: undefined reference to `jpeg_set_defaults@LIBJPEG_9.0'
/SDK/local/newlib/lib/libSDL2_image.so: undefined reference to `png_set_write_fn@PNG16_0'
/SDK/local/newlib/lib/libSDL2_image.so: undefined reference to `png_set_interlace_handling@PNG16_0'
/SDK/local/newlib/lib/libSDL2_image.so: undefined reference to `png_write_png@PNG16_0'
/SDK/local/newlib/lib/libSDL2_image.so: undefined reference to `png_get_valid@PNG16_0'
/SDK/local/newlib/lib/libSDL2_image.so: undefined reference to `jpeg_read_header@LIBJPEG_9.0'
/SDK/local/newlib/lib/libSDL2_image.so: undefined reference to `jpeg_resync_to_restart@LIBJPEG_9.0'
/SDK/local/newlib/lib/libSDL2_image.so: undefined reference to `jpeg_start_compress@LIBJPEG_9.0'
/SDK/local/newlib/lib/libSDL2_image.so: undefined reference to `jpeg_destroy_compress@LIBJPEG_9.0'
/SDK/local/newlib/lib/libSDL2_image.so: undefined reference to `png_get_PLTE@PNG16_0'
/SDK/local/newlib/lib/libSDL2_image.so: undefined reference to `WebPDecodeRGBInto'
/SDK/local/newlib/lib/libSDL2_image.so: undefined reference to `png_read_image@PNG16_0'
/SDK/local/newlib/lib/libSDL2_image.so: undefined reference to `jpeg_calc_output_dimensions@LIBJPEG_9.0'
/SDK/local/newlib/lib/libSDL2_image.so: undefined reference to `png_get_channels@PNG16_0'
/SDK/local/newlib/lib/libSDL2_image.so: undefined reference to `png_set_IHDR@PNG16_0'
/SDK/local/newlib/lib/libSDL2_image.so: undefined reference to `png_create_info_struct@PNG16_0'
/SDK/local/newlib/lib/libSDL2_image.so: undefined reference to `png_create_read_struct@PNG16_0'
/SDK/local/newlib/lib/libSDL2_image.so: undefined reference to `png_set_expand@PNG16_0'
/SDK/local/newlib/lib/libSDL2_image.so: undefined reference to `jpeg_CreateCompress@LIBJPEG_9.0'
/SDK/local/newlib/lib/libSDL2_image.so: undefined reference to `png_create_write_struct@PNG16_0'
/SDK/local/newlib/lib/libSDL2_image.so: undefined reference to `WebPDecodeRGBAInto'
/SDK/local/newlib/lib/libSDL2_image.so: undefined reference to `jpeg_destroy_decompress@LIBJPEG_9.0'
/SDK/local/newlib/lib/libSDL2_image.so: undefined reference to `__NewlibCall@LIBJPEG_9.0'
/SDK/local/newlib/lib/libSDL2_image.so: undefined reference to `png_get_io_ptr@PNG16_0'
/SDK/local/newlib/lib/libSDL2_image.so: undefined reference to `png_set_packing@PNG16_0'
/SDK/local/newlib/lib/libSDL2_image.so: undefined reference to `TIFFClientOpen'
/SDK/local/newlib/lib/libSDL2_image.so: undefined reference to `png_read_info@PNG16_0'
/SDK/local/newlib/lib/libSDL2_image.so: undefined reference to `png_set_strip_16@PNG16_0'
/SDK/local/newlib/lib/libSDL2_image.so: undefined reference to `TIFFClose'
/SDK/local/newlib/lib/libSDL2_image.so: undefined reference to `memcpy@LIBJPEG_9.0'
/SDK/local/newlib/lib/libSDL2_image.so: undefined reference to `jpeg_set_quality@LIBJPEG_9.0'
/SDK/local/newlib/lib/libSDL2_image.so: undefined reference to `jpeg_write_scanlines@LIBJPEG_9.0'
/SDK/local/newlib/lib/libSDL2_image.so: undefined reference to `png_get_IHDR@PNG16_0'
/SDK/local/newlib/lib/libSDL2_image.so: undefined reference to `TIFFReadRGBAImageOriented'
/SDK/local/newlib/lib/libSDL2_image.so: undefined reference to `png_read_update_info@PNG16_0'
/SDK/local/newlib/lib/libSDL2_image.so: undefined reference to `png_set_PLTE@PNG16_0'
/SDK/local/newlib/lib/libSDL2_image.so: undefined reference to `png_set_gray_to_rgb@PNG16_0'
/SDK/local/newlib/lib/libSDL2_image.so: undefined reference to `jpeg_CreateDecompress@LIBJPEG_9.0'
/SDK/local/newlib/lib/libSDL2_image.so: undefined reference to `jpeg_finish_decompress@LIBJPEG_9.0'
/SDK/local/newlib/lib/libSDL2_image.so: undefined reference to `png_destroy_write_struct@PNG16_0'
/SDK/local/newlib/lib/libSDL2_image.so: undefined reference to `png_set_longjmp_fn@PNG16_0'
/SDK/local/newlib/lib/libSDL2_image.so: undefined reference to `jpeg_read_scanlines@LIBJPEG_9.0'
/SDK/local/newlib/lib/libSDL2_image.so: undefined reference to `jpeg_start_decompress@LIBJPEG_9.0'
/SDK/local/newlib/lib/libSDL2_image.so: undefined reference to `png_destroy_read_struct@PNG16_0'
/SDK/local/newlib/lib/libSDL2_image.so: undefined reference to `jpeg_finish_compress@LIBJPEG_9.0'
/SDK/local/newlib/lib/libSDL2_image.so: undefined reference to `WebPGetFeaturesInternal'
/SDK/local/newlib/lib/libSDL2_image.so: undefined reference to `jpeg_std_error@LIBJPEG_9.0'
/SDK/local/newlib/lib/libSDL2_image.so: undefined reference to `png_get_tRNS@PNG16_0'
/SDK/local/newlib/lib/libSDL2_image.so: undefined reference to `png_set_read_fn@PNG16_0'
/SDK/local/newlib/lib/libSDL2_image.so: undefined reference to `TIFFGetField'
make: *** [all] Error 1
This is SDK 53.30 / gcc 4.2.4 / Native on Amiga X1000 and only with the libSDL2 installed.
I know how to fix this, I am just wondering about answers to my questions above.
Edited by rjd324 on 2022/1/3 3:19:40
Edited by rjd324 on 2022/1/5 12:43:23