yglukhov / nimx

GUI library
MIT License
1.1k stars 75 forks source link

Incompatible with other libraries that use stb_image #328

Closed jackvandrunen closed 6 years ago

jackvandrunen commented 6 years ago

Linker blows up at me when I use nimx/image in conjunction with the stb_image Nim wrapper:

Hint: used config file '/home/jack/.choosenim/toolchains/nim-#devel/config/nim.cfg' [Conf]
Hint: system [Processing]
Hint: test [Processing]
Hint: improcs [Processing]
Hint: improcs_core [Processing]
Hint: arraymancer [Processing]
Hint: sequtils [Processing]
Hint: macros [Processing]
Hint: strutils [Processing]
Hint: parseutils [Processing]
Hint: math [Processing]
Hint: bitops [Processing]
Hint: algorithm [Processing]
Hint: unicode [Processing]
Hint: future [Processing]
Hint: nimblas [Processing]
Hint: typetraits [Processing]
Hint: random [Processing]
Hint: times [Processing]
Hint: options [Processing]
Hint: strformat [Processing]
Hint: posix [Processing]
Hint: tensor [Processing]
Hint: metadataArray [Processing]
Hint: global_config [Processing]
Hint: data_structure [Processing]
Hint: init_cpu [Processing]
Hint: functional [Processing]
Hint: nested_containers [Processing]
Hint: sequninit [Processing]
Hint: p_checks [Processing]
Hint: p_init_cpu [Processing]
Hint: init_copy_cpu [Processing]
Hint: higher_order_applymap [Processing]
Hint: openmp [Processing]
Hint: memory_optimization_hints [Processing]
Hint: accessors [Processing]
Hint: p_accessors [Processing]
Hint: p_shapeshifting [Processing]
Hint: accessors_macros_syntax [Processing]
Hint: accessors_macros_read [Processing]
Hint: p_accessors_macros_desugar [Processing]
Hint: p_accessors_macros_read [Processing]
Hint: ast_utils [Processing]
Hint: accessors_macros_write [Processing]
Hint: p_accessors_macros_write [Processing]
Hint: operators_comparison [Processing]
Hint: shapeshifting [Processing]
Hint: higher_order_foldreduce [Processing]
Hint: display [Processing]
Hint: p_display [Processing]
Hint: ufunc [Processing]
Hint: operators_blas_l1 [Processing]
Hint: operators_blas_l2l3 [Processing]
Hint: p_operator_blas_l2l3 [Processing]
Hint: blas_l3_gemm [Processing]
Hint: naive_l2_gemv [Processing]
Hint: operators_broadcasted [Processing]
Hint: operators_logical [Processing]
Hint: math_functions [Processing]
Hint: filling_data [Processing]
Hint: aggregate [Processing]
Hint: lapack [Processing]
Hint: optim_ops_fusion [Processing]
Hint: syntactic_sugar [Processing]
Hint: exporting [Processing]
Hint: nn_primitives [Processing]
Hint: nnp_activation [Processing]
Hint: p_activation [Processing]
Hint: p_logsumexp [Processing]
Hint: nnp_convolution [Processing]
Hint: p_nnp_types [Processing]
Hint: conv [Processing]
Hint: nnp_linear [Processing]
Hint: nnp_sigmoid_cross_entropy [Processing]
Hint: math_ops_fusion [Processing]
Hint: p_nnp_checks [Processing]
Hint: nnp_softmax_cross_entropy [Processing]
Hint: nnp_maxpooling [Processing]
Hint: nnp_softmax [Processing]
Hint: nnp_numerical_gradient [Processing]
Hint: autograd [Processing]
Hint: ag_data_structure [Processing]
Hint: gates_basic [Processing]
Hint: gates_blas [Processing]
Hint: gates_reduce [Processing]
Hint: ag_accessors [Processing]
Hint: nn [Processing]
Hint: sigmoid [Processing]
Hint: relu [Processing]
Hint: tanh [Processing]
Hint: linear [Processing]
Hint: conv2D [Processing]
Hint: maxpool2D [Processing]
Hint: cross_entropy_losses [Processing]
Hint: loss [Processing]
Hint: mean_square_error_loss [Processing]
Hint: ml [Processing]
Hint: accuracy_score [Processing]
Hint: common_error_functions [Processing]
Hint: pca [Processing]
Hint: linear_algebra [Processing]
Hint: least_squares [Processing]
Hint: nimlapack [Processing]
Hint: fenv [Processing]
Hint: decomposition [Processing]
Hint: optimizers [Processing]
Hint: reshape_flatten [Processing]
Hint: nn_dsl [Processing]
Hint: dsl_core [Processing]
Hint: tables [Processing]
Hint: hashes [Processing]
Hint: dsl_types [Processing]
Hint: dsl_initialization [Processing]
Hint: dsl_utils [Processing]
Hint: dsl_topology [Processing]
Hint: dsl_forwardsugar [Processing]
Hint: mnist [Processing]
Hint: streams [Processing]
Hint: endians [Processing]
Hint: os [Processing]
Hint: ospaths [Processing]
Hint: io_csv [Processing]
Hint: parsecsv [Processing]
Hint: lexbase [Processing]
Hint: stats [Processing]
Hint: read [Processing]
Hint: components [Processing]
Hint: write [Processing]
Hint: imshow [Processing]
Hint: window [Processing]
Hint: abstract_window [Processing]
Hint: view [Processing]
Hint: types [Processing]
Hint: context [Processing]
Hint: opengl [Processing]
Hint: x [Processing]
Hint: xlib [Processing]
Hint: xutil [Processing]
Hint: keysym [Processing]
Hint: dynlib [Processing]
Hint: system_logger [Processing]
Hint: logging [Processing]
Hint: matrixes [Processing]
Hint: font [Processing]
Hint: timer [Processing]
Hint: mini_profiler [Processing]
Hint: sdl2 [Processing]
Hint: unsigned [Processing]
Hint: perform_on_main_thread [Processing]
Hint: portable_gl [Processing]
Hint: font_data [Processing]
Hint: stb_ttf_glyph_provider [Processing]
Hint: url_stream [Processing]
Hint: rect_packer [Processing]
Hint: ttf [Processing]
Hint: write_image_impl [Processing]
Hint: edtaa3func [Processing]
Hint: simple_table [Processing]
Hint: image [Processing]
Hint: json [Processing]
Hint: parsejson [Processing]
Hint: asset_loading [Processing]
Hint: variant [Processing]
Hint: asset_cache [Processing]
Hint: asset_manager [Processing]
Hint: abstract_asset_bundle [Processing]
Hint: asset_loader [Processing]
Hint: pathutils [Processing]
Hint: native_asset_bundle [Processing]
Hint: load_image_impl [Processing]
Hint: threadpool [Processing]
Hint: cpuinfo [Processing]
Hint: linux [Processing]
Hint: cpuload [Processing]
Hint: worker_queue [Processing]
Hint: http_request [Processing]
Hint: async_http_request [Processing]
Hint: asyncdispatch [Processing]
Hint: heapqueue [Processing]
Hint: lists [Processing]
Hint: asyncstreams [Processing]
Hint: asyncfutures [Processing]
Hint: deques [Processing]
Hint: cstrutils [Processing]
Hint: nativesockets [Processing]
Hint: net [Processing]
Hint: sets [Processing]
Hint: selectors [Processing]
Hint: epoll [Processing]
Hint: httpclient [Processing]
Hint: uri [Processing]
Hint: strtabs [Processing]
Hint: base64 [Processing]
Hint: mimetypes [Processing]
Hint: httpcore [Processing]
Hint: asyncnet [Processing]
Hint: asyncfile [Processing]
Hint: marshal [Processing]
Hint: typeinfo [Processing]
Hint: intsets [Processing]
Hint: nimsl [Processing]
Hint: glsl_codegen [Processing]
Hint: composition [Processing]
Hint: helper_macros [Processing]
Hint: text_drawing [Processing]
Hint: animation [Processing]
Hint: animation_runner [Processing]
Hint: property_visitor [Processing]
Hint: class_registry [Processing]
Hint: serializers [Processing]
Hint: kiwi [Processing]
Hint: variable [Processing]
Hint: constraint [Processing]
Hint: expression [Processing]
Hint: term [Processing]
Hint: strength [Processing]
Hint: util [Processing]
Hint: symbolics [Processing]
Hint: solver [Processing]
Hint: symbol [Processing]
Hint: row [Processing]
Hint: notification_center [Processing]
Hint: drag_and_drop [Processing]
Hint: pasteboard_item [Processing]
Hint: sdl_window [Processing]
Hint: event [Processing]
Hint: keyboard [Processing]
Hint: js_platform_detector [Processing]
Hint: app [Processing]
Hint: window_event_handling [Processing]
Hint: view_event_handling [Processing]
Hint: screen [Processing]
Hint: linkage_details [Processing]
Hint: sdl_vk_map [Processing]
Hint: image_view [Processing]
CC: read
CC: write
Hint:  [Link]
/home/jack/.cache/nim/test_d/nimx_write_image_impl.c.o: In function `stbi_write_bmp':
nimx_write_image_impl.c:(.text+0x713): multiple definition of `stbi_write_bmp'
/home/jack/.cache/nim/test_d/write.c.o:write.c:(.text+0x9fe): first defined here
/home/jack/.cache/nim/test_d/nimx_write_image_impl.c.o: In function `stbi_write_tga':
nimx_write_image_impl.c:(.text+0x7c2): multiple definition of `stbi_write_tga'
/home/jack/.cache/nim/test_d/write.c.o:write.c:(.text+0xebd): first defined here
/home/jack/.cache/nim/test_d/nimx_write_image_impl.c.o: In function `stbiw__linear_to_rgbe':
nimx_write_image_impl.c:(.text+0x8a2): 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+0xa30): 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+0xad2): 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+0xb74): 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_write_hdr':
nimx_write_image_impl.c:(.text+0x1004): multiple definition of `stbi_write_hdr'
/home/jack/.cache/nim/test_d/write.c.o:write.c:(.text+0x1902): 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+0x13b2): 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+0x2728): multiple definition of `stbi_write_png_to_mem'
/home/jack/.cache/nim/test_d/write.c.o:write.c:(.text+0x2b52): first defined here
/home/jack/.cache/nim/test_d/nimx_write_image_impl.c.o: In function `stbi_write_png':
nimx_write_image_impl.c:(.text+0x32c5): multiple definition of `stbi_write_png'
/home/jack/.cache/nim/test_d/write.c.o:write.c:(.text+0x36ef): first defined here
/home/jack/.cache/nim/test_d/nimx_load_image_impl.c.o: In function `stbi_failure_reason':
nimx_load_image_impl.c:(.text+0x1ee): multiple definition of `stbi_failure_reason'
/home/jack/.cache/nim/test_d/read.c.o:read.c:(.text+0x1e6): first defined here
/home/jack/.cache/nim/test_d/nimx_load_image_impl.c.o: In function `stbi_image_free':
nimx_load_image_impl.c:(.text+0x22a): multiple definition of `stbi_image_free'
/home/jack/.cache/nim/test_d/read.c.o:read.c:(.text+0x4ba): first defined here
/home/jack/.cache/nim/test_d/nimx_load_image_impl.c.o: In function `stbi_set_flip_vertically_on_load':
nimx_load_image_impl.c:(.text+0x245): multiple definition of `stbi_set_flip_vertically_on_load'
/home/jack/.cache/nim/test_d/read.c.o:read.c:(.text+0x4d5): first defined here
/home/jack/.cache/nim/test_d/nimx_load_image_impl.c.o: In function `stbi_load':
nimx_load_image_impl.c:(.text+0x7a6): multiple definition of `stbi_load'
/home/jack/.cache/nim/test_d/read.c.o:read.c:(.text+0xd7c): first defined here
/home/jack/.cache/nim/test_d/nimx_load_image_impl.c.o: In function `stbi_load_from_file':
nimx_load_image_impl.c:(.text+0x827): multiple definition of `stbi_load_from_file'
/home/jack/.cache/nim/test_d/read.c.o:read.c:(.text+0xdfd): first defined here
/home/jack/.cache/nim/test_d/nimx_load_image_impl.c.o: In function `stbi_load_from_memory':
nimx_load_image_impl.c:(.text+0x902): multiple definition of `stbi_load_from_memory'
/home/jack/.cache/nim/test_d/read.c.o:read.c:(.text+0x1180): first defined here
/home/jack/.cache/nim/test_d/nimx_load_image_impl.c.o: In function `stbi_load_from_callbacks':
nimx_load_image_impl.c:(.text+0x9a7): multiple definition of `stbi_load_from_callbacks'
/home/jack/.cache/nim/test_d/read.c.o:read.c:(.text+0x1225): first defined here
/home/jack/.cache/nim/test_d/nimx_load_image_impl.c.o: In function `stbi_loadf_from_memory':
nimx_load_image_impl.c:(.text+0xb2d): multiple definition of `stbi_loadf_from_memory'
/home/jack/.cache/nim/test_d/read.c.o:read.c:(.text+0x13d5): first defined here
/home/jack/.cache/nim/test_d/nimx_load_image_impl.c.o: In function `stbi_loadf_from_callbacks':
nimx_load_image_impl.c:(.text+0xbd2): multiple definition of `stbi_loadf_from_callbacks'
/home/jack/.cache/nim/test_d/read.c.o:read.c:(.text+0x147a): first defined here
/home/jack/.cache/nim/test_d/nimx_load_image_impl.c.o: In function `stbi_loadf':
nimx_load_image_impl.c:(.text+0xc79): multiple definition of `stbi_loadf'
/home/jack/.cache/nim/test_d/read.c.o:read.c:(.text+0x1521): first defined here
/home/jack/.cache/nim/test_d/nimx_load_image_impl.c.o: In function `stbi_loadf_from_file':
nimx_load_image_impl.c:(.text+0xcfa): multiple definition of `stbi_loadf_from_file'
/home/jack/.cache/nim/test_d/read.c.o:read.c:(.text+0x15a2): first defined here
/home/jack/.cache/nim/test_d/nimx_load_image_impl.c.o: In function `stbi_is_hdr_from_memory':
nimx_load_image_impl.c:(.text+0xd93): multiple definition of `stbi_is_hdr_from_memory'
/home/jack/.cache/nim/test_d/read.c.o:read.c:(.text+0x163b): first defined here
/home/jack/.cache/nim/test_d/nimx_load_image_impl.c.o: In function `stbi_is_hdr':
nimx_load_image_impl.c:(.text+0xdfe): multiple definition of `stbi_is_hdr'
/home/jack/.cache/nim/test_d/read.c.o:read.c:(.text+0x16a6): first defined here
/home/jack/.cache/nim/test_d/nimx_load_image_impl.c.o: In function `stbi_is_hdr_from_file':
nimx_load_image_impl.c:(.text+0xe4f): multiple definition of `stbi_is_hdr_from_file'
/home/jack/.cache/nim/test_d/read.c.o:read.c:(.text+0x16f7): first defined here
/home/jack/.cache/nim/test_d/nimx_load_image_impl.c.o: In function `stbi_is_hdr_from_callbacks':
nimx_load_image_impl.c:(.text+0xeae): multiple definition of `stbi_is_hdr_from_callbacks'
/home/jack/.cache/nim/test_d/read.c.o:read.c:(.text+0x1756): first defined here
/home/jack/.cache/nim/test_d/nimx_load_image_impl.c.o: In function `stbi_ldr_to_hdr_gamma':
nimx_load_image_impl.c:(.text+0xf1b): multiple definition of `stbi_ldr_to_hdr_gamma'
/home/jack/.cache/nim/test_d/read.c.o:read.c:(.text+0x17c3): first defined here
/home/jack/.cache/nim/test_d/nimx_load_image_impl.c.o: In function `stbi_ldr_to_hdr_scale':
nimx_load_image_impl.c:(.text+0xf34): multiple definition of `stbi_ldr_to_hdr_scale'
/home/jack/.cache/nim/test_d/read.c.o:read.c:(.text+0x17dc): first defined here
/home/jack/.cache/nim/test_d/nimx_load_image_impl.c.o: In function `stbi_hdr_to_ldr_gamma':
nimx_load_image_impl.c:(.text+0xf4d): multiple definition of `stbi_hdr_to_ldr_gamma'
/home/jack/.cache/nim/test_d/read.c.o:read.c:(.text+0x17f5): first defined here
/home/jack/.cache/nim/test_d/nimx_load_image_impl.c.o: In function `stbi_hdr_to_ldr_scale':
nimx_load_image_impl.c:(.text+0xf6e): multiple definition of `stbi_hdr_to_ldr_scale'
/home/jack/.cache/nim/test_d/read.c.o:read.c:(.text+0x1816): first defined here
/home/jack/.cache/nim/test_d/nimx_load_image_impl.c.o: In function `stbi_zlib_decode_malloc_guesssize':
nimx_load_image_impl.c:(.text+0xe604): multiple definition of `stbi_zlib_decode_malloc_guesssize'
/home/jack/.cache/nim/test_d/read.c.o:read.c:(.text+0xfcb9): first defined here
/home/jack/.cache/nim/test_d/nimx_load_image_impl.c.o: In function `stbi_zlib_decode_malloc':
nimx_load_image_impl.c:(.text+0xe712): multiple definition of `stbi_zlib_decode_malloc'
/home/jack/.cache/nim/test_d/read.c.o:read.c:(.text+0xfdc7): first defined here
/home/jack/.cache/nim/test_d/nimx_load_image_impl.c.o: In function `stbi_zlib_decode_malloc_guesssize_headerflag':
nimx_load_image_impl.c:(.text+0xe742): multiple definition of `stbi_zlib_decode_malloc_guesssize_headerflag'
/home/jack/.cache/nim/test_d/read.c.o:read.c:(.text+0xfdf7): first defined here
/home/jack/.cache/nim/test_d/nimx_load_image_impl.c.o: In function `stbi_zlib_decode_buffer':
nimx_load_image_impl.c:(.text+0xe85a): multiple definition of `stbi_zlib_decode_buffer'
/home/jack/.cache/nim/test_d/read.c.o:read.c:(.text+0xff0f): first defined here
/home/jack/.cache/nim/test_d/nimx_load_image_impl.c.o: In function `stbi_zlib_decode_noheader_malloc':
nimx_load_image_impl.c:(.text+0xe912): multiple definition of `stbi_zlib_decode_noheader_malloc'
/home/jack/.cache/nim/test_d/read.c.o:read.c:(.text+0xffc7): first defined here
/home/jack/.cache/nim/test_d/nimx_load_image_impl.c.o: In function `stbi_zlib_decode_noheader_buffer':
nimx_load_image_impl.c:(.text+0xea13): multiple definition of `stbi_zlib_decode_noheader_buffer'
/home/jack/.cache/nim/test_d/read.c.o:read.c:(.text+0x100c8): first defined here
/home/jack/.cache/nim/test_d/nimx_load_image_impl.c.o: In function `stbi_set_unpremultiply_on_load':
nimx_load_image_impl.c:(.text+0x1091f): multiple definition of `stbi_set_unpremultiply_on_load'
/home/jack/.cache/nim/test_d/read.c.o:read.c:(.text+0x11ef0): first defined here
/home/jack/.cache/nim/test_d/nimx_load_image_impl.c.o: In function `stbi_convert_iphone_png_to_rgb':
nimx_load_image_impl.c:(.text+0x10932): multiple definition of `stbi_convert_iphone_png_to_rgb'
/home/jack/.cache/nim/test_d/read.c.o:read.c:(.text+0x11f03): first defined here
/home/jack/.cache/nim/test_d/nimx_load_image_impl.c.o: In function `stbi_info':
nimx_load_image_impl.c:(.text+0x172a3): multiple definition of `stbi_info'
/home/jack/.cache/nim/test_d/read.c.o:read.c:(.text+0x1908b): first defined here
/home/jack/.cache/nim/test_d/nimx_load_image_impl.c.o: In function `stbi_info_from_file':
nimx_load_image_impl.c:(.text+0x17313): multiple definition of `stbi_info_from_file'
/home/jack/.cache/nim/test_d/read.c.o:read.c:(.text+0x190fb): first defined here
/home/jack/.cache/nim/test_d/nimx_load_image_impl.c.o: In function `stbi_info_from_memory':
nimx_load_image_impl.c:(.text+0x173dc): multiple definition of `stbi_info_from_memory'
/home/jack/.cache/nim/test_d/read.c.o:read.c:(.text+0x191c4): first defined here
/home/jack/.cache/nim/test_d/nimx_load_image_impl.c.o: In function `stbi_info_from_callbacks':
nimx_load_image_impl.c:(.text+0x17471): multiple definition of `stbi_info_from_callbacks'
/home/jack/.cache/nim/test_d/read.c.o:read.c:(.text+0x19259): first defined here
collect2: error: ld returned 1 exit status
Error: execution of an external program failed: 'gcc   -o /home/jack/Documents/improcs/examples/test  /home/jack/.cache/nim/test_d/read.c.o /home/jack/.cache/nim/test_d/write.c.o /home/jack/.cache/nim/test_d/improcs_test.c.o /home/jack/.cache/nim/test_d/stdlib_system.c.o /home/jack/.cache/nim/test_d/stdlib_sharedlist.c.o /home/jack/.cache/nim/test_d/stdlib_locks.c.o /home/jack/.cache/nim/test_d/improcs_improcs.c.o /home/jack/.cache/nim/test_d/improcs_improcs_core.c.o /home/jack/.cache/nim/test_d/arraymancer_arraymancer.c.o /home/jack/.cache/nim/test_d/stdlib_sequtils.c.o /home/jack/.cache/nim/test_d/stdlib_strutils.c.o /home/jack/.cache/nim/test_d/stdlib_future.c.o /home/jack/.cache/nim/test_d/stdlib_algorithm.c.o /home/jack/.cache/nim/test_d/nimblas_nimblas.c.o /home/jack/.cache/nim/test_d/stdlib_math.c.o /home/jack/.cache/nim/test_d/stdlib_typetraits.c.o /home/jack/.cache/nim/test_d/stdlib_macros.c.o /home/jack/.cache/nim/test_d/stdlib_random.c.o /home/jack/.cache/nim/test_d/stdlib_parseutils.c.o /home/jack/.cache/nim/test_d/stdlib_bitops.c.o /home/jack/.cache/nim/test_d/stdlib_unicode.c.o /home/jack/.cache/nim/test_d/stdlib_times.c.o /home/jack/.cache/nim/test_d/stdlib_options.c.o /home/jack/.cache/nim/test_d/stdlib_strformat.c.o /home/jack/.cache/nim/test_d/stdlib_posix.c.o /home/jack/.cache/nim/test_d/arraymancer_tensor.c.o /home/jack/.cache/nim/test_d/arraymancer_metadataArray.c.o /home/jack/.cache/nim/test_d/arraymancer_global_config.c.o /home/jack/.cache/nim/test_d/arraymancer_data_structure.c.o /home/jack/.cache/nim/test_d/arraymancer_init_cpu.c.o /home/jack/.cache/nim/test_d/arraymancer_functional.c.o /home/jack/.cache/nim/test_d/arraymancer_nested_containers.c.o /home/jack/.cache/nim/test_d/arraymancer_sequninit.c.o /home/jack/.cache/nim/test_d/arraymancer_p_checks.c.o /home/jack/.cache/nim/test_d/arraymancer_p_init_cpu.c.o /home/jack/.cache/nim/test_d/arraymancer_init_copy_cpu.c.o /home/jack/.cache/nim/test_d/arraymancer_higher_order_applymap.c.o /home/jack/.cache/nim/test_d/arraymancer_openmp.c.o /home/jack/.cache/nim/test_d/arraymancer_memory_optimization_hints.c.o /home/jack/.cache/nim/test_d/arraymancer_accessors.c.o /home/jack/.cache/nim/test_d/arraymancer_p_accessors.c.o /home/jack/.cache/nim/test_d/arraymancer_p_shapeshifting.c.o /home/jack/.cache/nim/test_d/arraymancer_accessors_macros_syntax.c.o /home/jack/.cache/nim/test_d/arraymancer_accessors_macros_read.c.o /home/jack/.cache/nim/test_d/arraymancer_p_accessors_macros_desugar.c.o /home/jack/.cache/nim/test_d/arraymancer_p_accessors_macros_read.c.o /home/jack/.cache/nim/test_d/arraymancer_ast_utils.c.o /home/jack/.cache/nim/test_d/arraymancer_accessors_macros_write.c.o /home/jack/.cache/nim/test_d/arraymancer_p_accessors_macros_write.c.o /home/jack/.cache/nim/test_d/arraymancer_operators_comparison.c.o /home/jack/.cache/nim/test_d/arraymancer_shapeshifting.c.o /home/jack/.cache/nim/test_d/arraymancer_higher_order_foldreduce.c.o /home/jack/.cache/nim/test_d/arraymancer_display.c.o /home/jack/.cache/nim/test_d/arraymancer_p_display.c.o /home/jack/.cache/nim/test_d/arraymancer_ufunc.c.o /home/jack/.cache/nim/test_d/arraymancer_operators_blas_l1.c.o /home/jack/.cache/nim/test_d/arraymancer_operators_blas_l2l3.c.o /home/jack/.cache/nim/test_d/arraymancer_p_operator_blas_l2l3.c.o /home/jack/.cache/nim/test_d/arraymancer_blas_l3_gemm.c.o /home/jack/.cache/nim/test_d/arraymancer_naive_l2_gemv.c.o /home/jack/.cache/nim/test_d/arraymancer_operators_broadcasted.c.o /home/jack/.cache/nim/test_d/arraymancer_operators_logical.c.o /home/jack/.cache/nim/test_d/arraymancer_math_functions.c.o /home/jack/.cache/nim/test_d/arraymancer_filling_data.c.o /home/jack/.cache/nim/test_d/arraymancer_aggregate.c.o /home/jack/.cache/nim/test_d/arraymancer_lapack.c.o /home/jack/.cache/nim/test_d/arraymancer_optim_ops_fusion.c.o /home/jack/.cache/nim/test_d/arraymancer_syntactic_sugar.c.o /home/jack/.cache/nim/test_d/arraymancer_exporting.c.o /home/jack/.cache/nim/test_d/arraymancer_nn_primitives.c.o /home/jack/.cache/nim/test_d/arraymancer_nnp_activation.c.o /home/jack/.cache/nim/test_d/arraymancer_p_activation.c.o /home/jack/.cache/nim/test_d/arraymancer_p_logsumexp.c.o /home/jack/.cache/nim/test_d/arraymancer_nnp_convolution.c.o /home/jack/.cache/nim/test_d/arraymancer_p_nnp_types.c.o /home/jack/.cache/nim/test_d/arraymancer_conv.c.o /home/jack/.cache/nim/test_d/arraymancer_nnp_linear.c.o /home/jack/.cache/nim/test_d/arraymancer_nnp_sigmoid_cross_entropy.c.o /home/jack/.cache/nim/test_d/arraymancer_math_ops_fusion.c.o /home/jack/.cache/nim/test_d/arraymancer_p_nnp_checks.c.o /home/jack/.cache/nim/test_d/arraymancer_nnp_softmax_cross_entropy.c.o /home/jack/.cache/nim/test_d/arraymancer_nnp_maxpooling.c.o /home/jack/.cache/nim/test_d/arraymancer_nnp_softmax.c.o /home/jack/.cache/nim/test_d/arraymancer_nnp_numerical_gradient.c.o /home/jack/.cache/nim/test_d/arraymancer_autograd.c.o /home/jack/.cache/nim/test_d/arraymancer_ag_data_structure.c.o /home/jack/.cache/nim/test_d/arraymancer_gates_basic.c.o /home/jack/.cache/nim/test_d/arraymancer_gates_blas.c.o /home/jack/.cache/nim/test_d/arraymancer_gates_reduce.c.o /home/jack/.cache/nim/test_d/arraymancer_ag_accessors.c.o /home/jack/.cache/nim/test_d/arraymancer_nn.c.o /home/jack/.cache/nim/test_d/arraymancer_sigmoid.c.o /home/jack/.cache/nim/test_d/arraymancer_relu.c.o /home/jack/.cache/nim/test_d/arraymancer_tanh.c.o /home/jack/.cache/nim/test_d/arraymancer_linear.c.o /home/jack/.cache/nim/test_d/arraymancer_conv2D.c.o /home/jack/.cache/nim/test_d/arraymancer_maxpool2D.c.o /home/jack/.cache/nim/test_d/arraymancer_cross_entropy_losses.c.o /home/jack/.cache/nim/test_d/arraymancer_loss.c.o /home/jack/.cache/nim/test_d/arraymancer_mean_square_error_loss.c.o /home/jack/.cache/nim/test_d/arraymancer_ml.c.o /home/jack/.cache/nim/test_d/arraymancer_accuracy_score.c.o /home/jack/.cache/nim/test_d/arraymancer_common_error_functions.c.o /home/jack/.cache/nim/test_d/arraymancer_pca.c.o /home/jack/.cache/nim/test_d/arraymancer_linear_algebra.c.o /home/jack/.cache/nim/test_d/arraymancer_least_squares.c.o /home/jack/.cache/nim/test_d/nimlapack_nimlapack.c.o /home/jack/.cache/nim/test_d/stdlib_fenv.c.o /home/jack/.cache/nim/test_d/arraymancer_decomposition.c.o /home/jack/.cache/nim/test_d/arraymancer_optimizers.c.o /home/jack/.cache/nim/test_d/arraymancer_reshape_flatten.c.o /home/jack/.cache/nim/test_d/arraymancer_nn_dsl.c.o /home/jack/.cache/nim/test_d/arraymancer_dsl_core.c.o /home/jack/.cache/nim/test_d/arraymancer_dsl_types.c.o /home/jack/.cache/nim/test_d/stdlib_tables.c.o /home/jack/.cache/nim/test_d/stdlib_hashes.c.o /home/jack/.cache/nim/test_d/arraymancer_dsl_initialization.c.o /home/jack/.cache/nim/test_d/arraymancer_dsl_utils.c.o /home/jack/.cache/nim/test_d/arraymancer_dsl_topology.c.o /home/jack/.cache/nim/test_d/arraymancer_dsl_forwardsugar.c.o /home/jack/.cache/nim/test_d/arraymancer_mnist.c.o /home/jack/.cache/nim/test_d/stdlib_streams.c.o /home/jack/.cache/nim/test_d/stdlib_endians.c.o /home/jack/.cache/nim/test_d/stdlib_os.c.o /home/jack/.cache/nim/test_d/stdlib_ospaths.c.o /home/jack/.cache/nim/test_d/arraymancer_io_csv.c.o /home/jack/.cache/nim/test_d/stdlib_parsecsv.c.o /home/jack/.cache/nim/test_d/stdlib_lexbase.c.o /home/jack/.cache/nim/test_d/arraymancer_stats.c.o /home/jack/.cache/nim/test_d/stb_image_read.c.o /home/jack/.cache/nim/test_d/stb_image_components.c.o /home/jack/.cache/nim/test_d/stb_image_write.c.o /home/jack/.cache/nim/test_d/improcs_imshow.c.o /home/jack/.cache/nim/test_d/nimx_window.c.o /home/jack/.cache/nim/test_d/nimx_abstract_window.c.o /home/jack/.cache/nim/test_d/nimx_view.c.o /home/jack/.cache/nim/test_d/nimx_animation.c.o /home/jack/.cache/nim/test_d/nimx_context.c.o /home/jack/.cache/nim/test_d/nimx_font.c.o /home/jack/.cache/nim/test_d/nimx_composition.c.o /home/jack/.cache/nim/test_d/nimx_image.c.o /home/jack/.cache/nim/test_d/nimx_notification_center.c.o /home/jack/.cache/nim/test_d/nimx_mini_profiler.c.o /home/jack/.cache/nim/test_d/nimx_portable_gl.c.o /home/jack/.cache/nim/test_d/nimx_drag_and_drop.c.o /home/jack/.cache/nim/test_d/nimx_types.c.o /home/jack/.cache/nim/test_d/opengl_opengl.c.o /home/jack/.cache/nim/test_d/x11_x.c.o /home/jack/.cache/nim/test_d/x11_xlib.c.o /home/jack/.cache/nim/test_d/x11_xutil.c.o /home/jack/.cache/nim/test_d/x11_keysym.c.o /home/jack/.cache/nim/test_d/stdlib_dynlib.c.o /home/jack/.cache/nim/test_d/nimx_system_logger.c.o /home/jack/.cache/nim/test_d/stdlib_logging.c.o /home/jack/.cache/nim/test_d/nimx_matrixes.c.o /home/jack/.cache/nim/test_d/nimx_timer.c.o /home/jack/.cache/nim/test_d/sdl2_sdl2.c.o /home/jack/.cache/nim/test_d/stdlib_unsigned.c.o /home/jack/.cache/nim/test_d/nimx_perform_on_main_thread.c.o /home/jack/.cache/nim/test_d/nimx_font_data.c.o /home/jack/.cache/nim/test_d/nimx_stb_ttf_glyph_provider.c.o /home/jack/.cache/nim/test_d/nimx_url_stream.c.o /home/jack/.cache/nim/test_d/rect_packer_rect_packer.c.o /home/jack/.cache/nim/test_d/ttf_ttf.c.o /home/jack/.cache/nim/test_d/nimx_write_image_impl.c.o /home/jack/.cache/nim/test_d/ttf_edtaa3func.c.o /home/jack/.cache/nim/test_d/nimx_simple_table.c.o /home/jack/.cache/nim/test_d/stdlib_json.c.o /home/jack/.cache/nim/test_d/stdlib_parsejson.c.o /home/jack/.cache/nim/test_d/nimx_asset_loading.c.o /home/jack/.cache/nim/test_d/variant_variant.c.o /home/jack/.cache/nim/test_d/nimx_asset_cache.c.o /home/jack/.cache/nim/test_d/nimx_asset_manager.c.o /home/jack/.cache/nim/test_d/nimx_abstract_asset_bundle.c.o /home/jack/.cache/nim/test_d/nimx_asset_loader.c.o /home/jack/.cache/nim/test_d/nimx_pathutils.c.o /home/jack/.cache/nim/test_d/nimx_native_asset_bundle.c.o /home/jack/.cache/nim/test_d/nimx_load_image_impl.c.o /home/jack/.cache/nim/test_d/stdlib_threadpool.c.o /home/jack/.cache/nim/test_d/stdlib_cpuinfo.c.o /home/jack/.cache/nim/test_d/stdlib_linux.c.o /home/jack/.cache/nim/test_d/stdlib_cpuload.c.o /home/jack/.cache/nim/test_d/nimx_worker_queue.c.o /home/jack/.cache/nim/test_d/nimx_http_request.c.o /home/jack/.cache/nim/test_d/async_http_request_async_http_request.c.o /home/jack/.cache/nim/test_d/stdlib_asyncdispatch.c.o /home/jack/.cache/nim/test_d/stdlib_heapqueue.c.o /home/jack/.cache/nim/test_d/stdlib_lists.c.o /home/jack/.cache/nim/test_d/stdlib_asyncstreams.c.o /home/jack/.cache/nim/test_d/stdlib_asyncfutures.c.o /home/jack/.cache/nim/test_d/stdlib_deques.c.o /home/jack/.cache/nim/test_d/stdlib_cstrutils.c.o /home/jack/.cache/nim/test_d/stdlib_nativesockets.c.o /home/jack/.cache/nim/test_d/stdlib_net.c.o /home/jack/.cache/nim/test_d/stdlib_sets.c.o /home/jack/.cache/nim/test_d/stdlib_selectors.c.o /home/jack/.cache/nim/test_d/stdlib_epoll.c.o /home/jack/.cache/nim/test_d/stdlib_httpclient.c.o /home/jack/.cache/nim/test_d/stdlib_uri.c.o /home/jack/.cache/nim/test_d/stdlib_strtabs.c.o /home/jack/.cache/nim/test_d/stdlib_base64.c.o /home/jack/.cache/nim/test_d/stdlib_mimetypes.c.o /home/jack/.cache/nim/test_d/stdlib_httpcore.c.o /home/jack/.cache/nim/test_d/stdlib_asyncnet.c.o /home/jack/.cache/nim/test_d/stdlib_asyncfile.c.o /home/jack/.cache/nim/test_d/stdlib_marshal.c.o /home/jack/.cache/nim/test_d/stdlib_typeinfo.c.o /home/jack/.cache/nim/test_d/stdlib_intsets.c.o /home/jack/.cache/nim/test_d/nimsl_nimsl.c.o /home/jack/.cache/nim/test_d/nimsl_glsl_codegen.c.o /home/jack/.cache/nim/test_d/nimx_helper_macros.c.o /home/jack/.cache/nim/test_d/nimx_text_drawing.c.o /home/jack/.cache/nim/test_d/nimx_animation_runner.c.o /home/jack/.cache/nim/test_d/nimx_property_visitor.c.o /home/jack/.cache/nim/test_d/nimx_class_registry.c.o /home/jack/.cache/nim/test_d/nimx_serializers.c.o /home/jack/.cache/nim/test_d/kiwi_kiwi.c.o /home/jack/.cache/nim/test_d/kiwi_variable.c.o /home/jack/.cache/nim/test_d/kiwi_constraint.c.o /home/jack/.cache/nim/test_d/kiwi_expression.c.o /home/jack/.cache/nim/test_d/kiwi_term.c.o /home/jack/.cache/nim/test_d/kiwi_strength.c.o /home/jack/.cache/nim/test_d/kiwi_util.c.o /home/jack/.cache/nim/test_d/kiwi_symbolics.c.o /home/jack/.cache/nim/test_d/kiwi_solver.c.o /home/jack/.cache/nim/test_d/kiwi_symbol.c.o /home/jack/.cache/nim/test_d/kiwi_row.c.o /home/jack/.cache/nim/test_d/nimx_pasteboard_item.c.o /home/jack/.cache/nim/test_d/nimx_sdl_window.c.o /home/jack/.cache/nim/test_d/nimx_event.c.o /home/jack/.cache/nim/test_d/nimx_keyboard.c.o /home/jack/.cache/nim/test_d/nimx_js_platform_detector.c.o /home/jack/.cache/nim/test_d/nimx_app.c.o /home/jack/.cache/nim/test_d/nimx_window_event_handling.c.o /home/jack/.cache/nim/test_d/nimx_view_event_handling.c.o /home/jack/.cache/nim/test_d/nimx_screen.c.o /home/jack/.cache/nim/test_d/nimx_linkage_details.c.o /home/jack/.cache/nim/test_d/nimx_sdl_vk_map.c.o /home/jack/.cache/nim/test_d/nimx_image_view.c.o  -pthread -lm -lrt -lm -lm -lm   -ldl'

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?

jackvandrunen commented 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
...