Closed jackvandrunen closed 6 years ago
Thanks for this! It still seems to be failing for me with stb_image_write:
...
Hint: sdl_vk_map [Processing]
Hint: image_view [Processing]
CC: nimx_image
CC: nimx_write_image_impl
CC: nimx_load_image_impl
Hint: [Link]
/home/jack/.cache/nim/test_d/nimx_write_image_impl.c.o: In function `stbiw__linear_to_rgbe':
nimx_write_image_impl.c:(.text+0xf9c): multiple definition of `stbiw__linear_to_rgbe'
/home/jack/.cache/nim/test_d/write.c.o:write.c:(.text+0xf47): first defined here
/home/jack/.cache/nim/test_d/nimx_write_image_impl.c.o: In function `stbiw__write_run_data':
nimx_write_image_impl.c:(.text+0x1125): multiple definition of `stbiw__write_run_data'
/home/jack/.cache/nim/test_d/write.c.o:write.c:(.text+0x10d0): first defined here
/home/jack/.cache/nim/test_d/nimx_write_image_impl.c.o: In function `stbiw__write_dump_data':
nimx_write_image_impl.c:(.text+0x11c7): multiple definition of `stbiw__write_dump_data'
/home/jack/.cache/nim/test_d/write.c.o:write.c:(.text+0x1172): first defined here
/home/jack/.cache/nim/test_d/nimx_write_image_impl.c.o: In function `stbiw__write_hdr_scanline':
nimx_write_image_impl.c:(.text+0x1266): multiple definition of `stbiw__write_hdr_scanline'
/home/jack/.cache/nim/test_d/write.c.o:write.c:(.text+0x1211): first defined here
/home/jack/.cache/nim/test_d/nimx_write_image_impl.c.o: In function `stbi_zlib_compress':
nimx_write_image_impl.c:(.text+0x1ca2): multiple definition of `stbi_zlib_compress'
/home/jack/.cache/nim/test_d/write.c.o:write.c:(.text+0x1c23): first defined here
/home/jack/.cache/nim/test_d/nimx_write_image_impl.c.o: In function `stbi_write_png_to_mem':
nimx_write_image_impl.c:(.text+0x3067): multiple definition of `stbi_write_png_to_mem'
/home/jack/.cache/nim/test_d/write.c.o:write.c:(.text+0x2b52): first defined here
collect2: error: ld returned 1 exit status
...
Linker blows up at me when I use nimx/image in conjunction with the stb_image Nim wrapper:
In the long run, I suppose it'd be nice to see Nimx use the actual Nim wrapper library, but another option would be to mangle the custom stb_image code that Nimx emits?