Please update PB's C runtime on Windows (e.g.: msvcrt.lib)
Posted: Sun Feb 19, 2023 9:45 am
see here:
posting.php?mode=quote&p=595813
posting.php?mode=quote&p=595813
chi wrote: Tue Feb 14, 2023 9:56 pmI'm pretty sure you can't! PB's C runtime on Windows is very old and Raylib needs some of the newer features...ccode_new wrote: Mon Feb 13, 2023 8:52 pm How to statically build the "raylib" library on Windows with PureBasic compatibility? (.lib / .a)
Fortunately, you can do it the other way around. I created a custom msvcrt.lib so you can use UCRT with PB (C backend only). Just rename the original msvcrt.lib (PB64Folder\PureLibraries\Windows\Libraries) to msvcrt_orig.lib and copy msvcrt_v143.lib from the zip file to the same folder. Now make a copy of msvcrt_v143.lib and rename it to msvcrt.lib. (Don't forget to rename msvcrt_orig.lib to msvcrt.lib if you want to go back and use the old CRT and/or the ASM backend)
To create a statically linked raylib.lib, just clone the Github repository and open raylib/projects/VS2022/Raylib.sln with VS and compile Release | x64. Replace your libraylib_win_x64.lib with the one you just created and you should be able to compile all examples statically linked without the need for raylib.dll. I've also included the 4.2 lib in the zip.
ray_msvcrt.7z (4.52MB)