I used the clang that comes as part of VS download. Is there another version somewhere?Joost Buijs wrote: ↑Wed May 24, 2023 3:28 pmVery strange. Over here I can build and link it with a "binary.bin" file without any problems. It only works with the CLang "C" compiler though, with the C++ compiler I get undefined symbols, C++ name mangling is probably the cause of this.chrisw wrote: ↑Wed May 24, 2023 8:28 amSame error in Cchrisw wrote: ↑Tue May 23, 2023 9:21 pm C? I’ll give that a try. Right now the entire everything is sort of disintegrating, debug mode and optimisations off won’t turn optimisations off, so single stepping keeps jumping over code and variables say they’re optimised away. Some code isn’t being executed even. Chaos. Reboot and try again tomorrow.
Build started...
1>------ Build started: Project: incbin-test, Configuration: Debug x64 ------
1>lld-link : error : undefined symbol: gbookbinSize
1>>>> referenced by C:\Users\chris\source\repos\incbin-test\incbin-test\incbin.c:14
1>>>> x64\Debug\incbin.obj:(main)
1>
1>lld-link : error : undefined symbol: gbookbinData
1>>>> referenced by C:\Users\chris\source\repos\incbin-test\incbin-test\incbin.c:15
1>>>> x64\Debug\incbin.obj:(main)
1>
1>lld-link : error : undefined symbol: gbookbinEnd
1>>>> referenced by C:\Users\chris\source\repos\incbin-test\incbin-test\incbin.c:16
1>>>> x64\Debug\incbin.obj:(main)
1>Done building project "incbin-test.vcxproj" -- FAILED.
It builds without a hitch:
The output looks fine too:Code: Select all
Rebuild started... 1>------ Rebuild All started: Project: incbin, Configuration: Release x64 ------ 1>incbin.vcxproj -> D:\incbin\x64\Release\incbin.exe ========== Rebuild All: 1 succeeded, 0 failed, 0 skipped ========== ========== Rebuild started at 3:23 PM and took 00,508 seconds ==========
Code: Select all
start = 00007FF699282000 end = 00007FF69A2B9E48 size = 17006152 first byte = 0x00 D:\incbin\x64\Release\incbin.exe (process 9672) exited with code 0. Press any key to close this window . . .
Actually clang is giving me much grief since I made the switch a few weeks ago, it insists on optimising when in debug-optimisations-off mode, and stuff gets impossible to single step or view. So, gave up and reverted to the VS compiler. I guess it I could get incbin to work, then clang could just be used for final builds.