You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please provide any relevant information about your setup. This is important in case the issue is not reproducible except for under certain conditions.
Operating System & Odin Version:
Please paste odin report output:
Odin: dev-2023-08-nightly:9453b238
OS: Windows 10 Enterprise (version: 22H2), build 19045.3324
CPU: Intel(R) Core(TM) i5-8250U CPU @ 1.60GHz
RAM: 32662 MiB
Expected Behavior
No linker multiple defines errors when using libc with raylib
Current Behavior
What is the current behavior?
Failure Information (for bugs)
When I attempt to use core:c/libc and vendor:raylib at the same time, I get a number of linker errors when compiling:
ucrt.lib(api-ms-win-crt-stdio-l1-1-0.dll) : error LNK2005: fclose already defined in libucrt.lib(fclose.obj)
ucrt.lib(api-ms-win-crt-heap-l1-1-0.dll) : error LNK2005: calloc already defined in libucrt.lib(calloc.obj)
ucrt.lib(api-ms-win-crt-runtime-l1-1-0.dll) : error LNK2005: _errno already defined in libucrt.lib(errno.obj)
ucrt.lib(api-ms-win-crt-runtime-l1-1-0.dll) : error LNK2005: system already defined in libucrt.lib(system.obj)
ucrt.lib(api-ms-win-crt-filesystem-l1-1-0.dll) : error LNK2005: _access already defined in libucrt.lib(access.obj)
ucrt.lib(api-ms-win-crt-runtime-l1-1-0.dll) : error LNK2005: exit already defined in libucrt.lib(exit.obj)
ucrt.lib(api-ms-win-crt-stdio-l1-1-0.dll) : error LNK2005: __acrt_iob_func already defined in libucrt.lib(_file.obj)
ucrt.lib(api-ms-win-crt-stdio-l1-1-0.dll) : error LNK2005: fflush already defined in libucrt.lib(fflush.obj)
libucrt.lib(argv_data.obj) : error LNK2005: __p___argc already defined in ucrt.lib(api-ms-win-crt-runtime-l1-1-0.dll)
libucrt.lib(argv_data.obj) : error LNK2005: __p___argv already defined in ucrt.lib(api-ms-win-crt-runtime-l1-1-0.dll)
libucrt.lib(matherr.obj) : error LNK2005: __setusermatherr already defined in ucrt.lib(api-ms-win-crt-math-l1-1-0.dll)
It appears that raylib uses ucrt.lib (I couldn't find an explicit CRT load in raylib's code), and libc pulls in libucrt.lib. When I replaced libucrt.lib with ucrt.lib in my Odin installation's core:c/libc files, the issue went away, and I was able to compile without issues (at least for the small subset of both Raylib and libc that I'm currently using :-) )
Steps to Reproduce
Please provide detailed steps for reproducing the issue.
I use raylib for windowing and graphics, and am attempting to hot-reload a dll. I use libc.system() to copy and delete the DLL before loading and after rebuilding, respectively. Using both these libraries together causes the above linker errors.
Failure Logs
Please include any relevant log snippets or files here.
The text was updated successfully, but these errors were encountered:
Uh oh!
There was an error while loading. Please reload this page.
Context
Please provide any relevant information about your setup. This is important in case the issue is not reproducible except for under certain conditions.
odin report
output:Odin: dev-2023-08-nightly:9453b238
OS: Windows 10 Enterprise (version: 22H2), build 19045.3324
CPU: Intel(R) Core(TM) i5-8250U CPU @ 1.60GHz
RAM: 32662 MiB
Expected Behavior
No linker
multiple defines
errors when using libc with raylibCurrent Behavior
What is the current behavior?
Failure Information (for bugs)
When I attempt to use
core:c/libc
andvendor:raylib
at the same time, I get a number of linker errors when compiling:It appears that raylib uses
ucrt.lib
(I couldn't find an explicit CRT load in raylib's code), and libc pulls inlibucrt.lib
. When I replacedlibucrt.lib
withucrt.lib
in my Odin installation'score:c/libc
files, the issue went away, and I was able to compile without issues (at least for the small subset of both Raylib and libc that I'm currently using :-) )Steps to Reproduce
Please provide detailed steps for reproducing the issue.
I use raylib for windowing and graphics, and am attempting to hot-reload a dll. I use
libc.system()
to copy and delete the DLL before loading and after rebuilding, respectively. Using both these libraries together causes the above linker errors.Failure Logs
Please include any relevant log snippets or files here.
The text was updated successfully, but these errors were encountered: