Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
86 user(s) are online (64 user(s) are browsing Forums)

Members: 2
Guests: 84

Futaura, walkero, more...

Support us!

Headlines

Report message:*
 

Re: SDL2

Subject: Re: SDL2
by SinanSam460 on 2021/2/24 16:21:50

@all

I am following multi-platform SDL2 tutorials on this page. I was able to compile and run first 5 examples. However I have a difficulty with SDL2_image.

The example basically loads a PNG file and displays on the screen.

I am compiling the examples with this following command
ppc-amigaos-g++ -w -athread=native 06_extension_libraries_and_loading_other_image_formats.cpp -o 06_SDL -lSDL2_image -lSDL2

However I get following errors:
$ ppc-amigaos-g++ -w -athread=native 06_extension_libraries_and_loading_other_image_formats.cpp -o 06_SDL -lSDL2_image -lSDL2
/usr/local/amiga/ppc-amigaos/SDK/local/newlib/lib/libSDL2_image.a(IMG_jpg.o): In function `IMG_SaveJPG_RW_jpeglib':
/home/Michael/SDL2_image-2.0.5/IMG_jpg.c:499: undefined reference to `jpeg_std_error'
/home/Michael/SDL2_image-2.0.5/IMG_jpg.c:503: undefined reference to `jpeg_CreateCompress'
/home/Michael/SDL2_image-2.0.5/IMG_jpg.c:511: undefined reference to `jpeg_set_defaults'
/home/Michael/SDL2_image-2.0.5/IMG_jpg.c:512: undefined reference to `jpeg_set_quality'
/home/Michael/SDL2_image-2.0.5/IMG_jpg.c:513: undefined reference to `jpeg_start_compress'
/home/Michael/SDL2_image-2.0.5/IMG_jpg.c:518: undefined reference to `jpeg_write_scanlines'
/home/Michael/SDL2_image-2.0.5/IMG_jpg.c:521: undefined reference to `jpeg_finish_compress'
/home/Michael/SDL2_image-2.0.5/IMG_jpg.c:522: undefined reference to `jpeg_destroy_compress'
/home/Michael/SDL2_image-2.0.5/IMG_jpg.c:499: undefined reference to `jpeg_std_error'
/home/Michael/SDL2_image-2.0.5/IMG_jpg.c:503: undefined reference to `jpeg_CreateCompress'
/usr/local/amiga/ppc-amigaos/SDK/local/newlib/lib/libSDL2_image.a(IMG_jpg.o): In function `IMG_LoadJPG_RW':
/home/Michael/SDL2_image-2.0.5/IMG_jpg.c:339: undefined reference to `jpeg_std_error'
/home/Michael/SDL2_image-2.0.5/IMG_jpg.c:353: undefined reference to `jpeg_CreateDecompress'
/usr/local/amiga/ppc-amigaos/SDK/local/newlib/lib/libSDL2_image.a(IMG_jpg.o): In function `jpeg_SDL_RW_src':
/home/Michael/SDL2_image-2.0.5/IMG_jpg.c:296: undefined reference to `jpeg_resync_to_restart'
/home/Michael/SDL2_image-2.0.5/IMG_jpg.c:296: undefined reference to `jpeg_resync_to_restart'
/usr/local/amiga/ppc-amigaos/SDK/local/newlib/lib/libSDL2_image.a(IMG_jpg.o): In function `IMG_LoadJPG_RW':
/home/Michael/SDL2_image-2.0.5/IMG_jpg.c:355: undefined reference to `jpeg_read_header'
/home/Michael/SDL2_image-2.0.5/IMG_jpg.c:381: undefined reference to `jpeg_calc_output_dimensions'
/home/Michael/SDL2_image-2.0.5/IMG_jpg.c:402: undefined reference to `jpeg_start_decompress'
/home/Michael/SDL2_image-2.0.5/IMG_jpg.c:406: undefined reference to `jpeg_read_scanlines'
/home/Michael/SDL2_image-2.0.5/IMG_jpg.c:408: undefined reference to `jpeg_finish_decompress'
/home/Michael/SDL2_image-2.0.5/IMG_jpg.c:409: undefined reference to `jpeg_destroy_decompress'
/home/Michael/SDL2_image-2.0.5/IMG_jpg.c:344: undefined reference to `jpeg_destroy_decompress'
/home/Michael/SDL2_image-2.0.5/IMG_jpg.c:361: undefined reference to `jpeg_calc_output_dimensions'
/home/Michael/SDL2_image-2.0.5/IMG_jpg.c:395: undefined reference to `jpeg_destroy_decompress'
/usr/local/amiga/ppc-amigaos/SDK/local/newlib/lib/libSDL2_image.a(IMG_png.o): In function `png_read_data':
/home/Michael/SDL2_image-2.0.5/IMG_png.c:246: undefined reference to `png_get_io_ptr'
/usr/local/amiga/ppc-amigaos/SDK/local/newlib/lib/libSDL2_image.a(IMG_png.o): In function `png_write_data':
/home/Michael/SDL2_image-2.0.5/IMG_png.c:526: undefined reference to `png_get_io_ptr'
/usr/local/amiga/ppc-amigaos/SDK/local/newlib/lib/libSDL2_image.a(IMG_png.o): In function `IMG_SavePNG_RW_libpng':
/home/Michael/SDL2_image-2.0.5/IMG_png.c:544: undefined reference to `png_create_write_struct'
/home/Michael/SDL2_image-2.0.5/IMG_png.c:550: undefined reference to `png_create_info_struct'
/home/Michael/SDL2_image-2.0.5/IMG_png.c:558: undefined reference to `png_set_longjmp_fn'
/home/Michael/SDL2_image-2.0.5/IMG_png.c:586: undefined reference to `png_set_PLTE'
/home/Michael/SDL2_image-2.0.5/IMG_png.c:593: undefined reference to `png_set_write_fn'
/home/Michael/SDL2_image-2.0.5/IMG_png.c:595: undefined reference to `png_set_IHDR'
/home/Michael/SDL2_image-2.0.5/IMG_png.c:613: undefined reference to `png_set_rows'
/home/Michael/SDL2_image-2.0.5/IMG_png.c:614: undefined reference to `png_write_png'
/home/Michael/SDL2_image-2.0.5/IMG_png.c:621: undefined reference to `png_destroy_write_struct'
/home/Michael/SDL2_image-2.0.5/IMG_png.c:552: undefined reference to `png_destroy_write_struct'
/home/Michael/SDL2_image-2.0.5/IMG_png.c:564: undefined reference to `png_destroy_write_struct'
/home/Michael/SDL2_image-2.0.5/IMG_png.c:605: undefined reference to `png_destroy_write_struct'
/home/Michael/SDL2_image-2.0.5/IMG_png.c:577: undefined reference to `png_destroy_write_struct'
/usr/local/amiga/ppc-amigaos/SDK/local/newlib/lib/libSDL2_image.a(IMG_png.o): In function `IMG_LoadPNG_RW':
/home/Michael/SDL2_image-2.0.5/IMG_png.c:283: undefined reference to `png_create_read_struct'
/home/Michael/SDL2_image-2.0.5/IMG_png.c:291: undefined reference to `png_create_info_struct'
/home/Michael/SDL2_image-2.0.5/IMG_png.c:304: undefined reference to `png_set_longjmp_fn'
/home/Michael/SDL2_image-2.0.5/IMG_png.c:458: undefined reference to `png_destroy_read_struct'
/home/Michael/SDL2_image-2.0.5/IMG_png.c:314: undefined reference to `png_set_read_fn'
/home/Michael/SDL2_image-2.0.5/IMG_png.c:317: undefined reference to `png_read_info'
/home/Michael/SDL2_image-2.0.5/IMG_png.c:318: undefined reference to `png_get_IHDR'
/home/Michael/SDL2_image-2.0.5/IMG_png.c:322: undefined reference to `png_set_strip_16'
/home/Michael/SDL2_image-2.0.5/IMG_png.c:325: undefined reference to `png_set_interlace_handling'
/home/Michael/SDL2_image-2.0.5/IMG_png.c:330: undefined reference to `png_set_packing'
/home/Michael/SDL2_image-2.0.5/IMG_png.c:334: undefined reference to `png_set_expand'
/home/Michael/SDL2_image-2.0.5/IMG_png.c:339: undefined reference to `png_get_valid'
/home/Michael/SDL2_image-2.0.5/IMG_png.c:369: undefined reference to `png_set_gray_to_rgb'
/home/Michael/SDL2_image-2.0.5/IMG_png.c:371: undefined reference to `png_read_update_info'
/home/Michael/SDL2_image-2.0.5/IMG_png.c:373: undefined reference to `png_get_IHDR'
/home/Michael/SDL2_image-2.0.5/IMG_png.c:378: undefined reference to `png_get_channels'
/home/Michael/SDL2_image-2.0.5/IMG_png.c:423: undefined reference to `png_read_image'
/home/Michael/SDL2_image-2.0.5/IMG_png.c:438: undefined reference to `png_get_PLTE'
/home/Michael/SDL2_image-2.0.5/IMG_png.c:342: undefined reference to `png_get_tRNS'
/home/Michael/SDL2_image-2.0.5/IMG_png.c:361: undefined reference to `png_set_expand'
/usr/local/amiga/ppc-amigaos/SDK/local/newlib/lib/libSDL2_image.a(IMG_tif.o): In function `IMG_LoadTIF_RW':
/home/Michael/SDL2_image-2.0.5/IMG_tif.c:179: undefined reference to `TIFFClientOpen'
/home/Michael/SDL2_image-2.0.5/IMG_tif.c:185: undefined reference to `TIFFGetField'
/home/Michael/SDL2_image-2.0.5/IMG_tif.c:186: undefined reference to `TIFFGetField'
/home/Michael/SDL2_image-2.0.5/IMG_tif.c:197: undefined reference to `TIFFReadRGBAImageOriented'
/home/Michael/SDL2_image-2.0.5/IMG_tif.c:210: undefined reference to `TIFFClose'
/home/Michael/SDL2_image-2.0.5/IMG_tif.c:200: undefined reference to `TIFFClose'
/usr/local/amiga/ppc-amigaos/SDK/local/newlib/lib/libSDL2_image.a(IMG_webp.o): In function `IMG_LoadWEBP_RW':
/home/Michael/SDL2_image-2.0.5/IMG_webp.c:201: undefined reference to `WebPGetFeaturesInternal'
/home/Michael/SDL2_image-2.0.5/IMG_webp.c:232: undefined reference to `WebPDecodeRGBAInto'
/home/Michael/SDL2_image-2.0.5/IMG_webp.c:234: undefined reference to `WebPDecodeRGBInto'
collect2: error: ld returned 1 exit status



Powered by XOOPS 2.0 © 2001-2016 The XOOPS Project