-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
A problem with building the raylib-test executable (Windows) #5
Comments
Did you add |
To swap Following #3:
Setting Another option would be to use manually built or system-wide raylib. See raylib's Working on Windows or Working with CMake. To use it add |
Well, I'm still working on this. Thanks for the points, they gave me some ideas, but there are still problems. For now all I'm getting are the usual kinds of unimaginable C/C++ errors that break linking at one stage or another because why not. Tried 3 dfirrerent toolchains: MinGW-w64, w64devkit, and just I'll post an update when I've got something. |
Ok, so I got back to it, and finally figured out the remaining points. There were some differences to #3. I wrote all my steps in the form of instruction for myself, I'll just post it here. If you have any comments or think that I missed something, it would be great ot know. Otherwise I think the issue is solved, since the demo now runs for me. The Process0 - Pre-requesitesMake sure a Lean toolchain is installed in a known location, for example:
Have I used Note: If at any moment of following these steps an error comes up that the 1 - Create new project
2 - Add the Lean Raylib dependencyIn the project def raylibConfig : NameMap String := Id.run $ do
let mut cfg := NameMap.empty
cfg := cfg.insert `cc "gcc"
cfg := cfg.insert `raygui "raygui"
cfg
require raylib from git
"https://github.com/KislyjKisel/Raylib.lean" @ "main" with raylibConfig The config sets Run lake update in the project directory to fetch the dependencies. This should create the Optional?Go to git submodule update --init --recursive The 3 - Edit the Lean Raylib lakefileOpen 3.1 - Additional linker argsTo moreLinkArgs := #[
"-LC:/Users/user/.elan/toolchains/leanprover--lean4---v4.13.0/lib" -- should point to the `lib` folder of your current toolchain
, s!"-L{__dir__}/../pod/.lake/build/lib"
, "-llean-pod"
, s!"-L{__dir__}/raylib/build/raylib"
, "-lraylib"
, s!"-L{__dir__}/raylib/build/raylib/external/glfw/src"
, "-LC:/Windows/System32"
-- ,"-lglfw3" -- only add if linking fails otherwise
, "-lgdi32"
, "-lwinmm"
, "-lopengl32"
, "-lmsvcrt"
] 3.2 - CMake generator setupTo the "-G Unix Makefiles" Explanation: this is needed to prevent the possibility of cmake generating the project for 4 - Generate CMake projectsRun lake run raylib/buildSubmodule This should generate all makefiles for the future build. 5 - Build the Raylib Lean example exeRun lake exe raylib-test This should build the test and run it. |
Running You can use
Maybe it would be better to change this repo's lakefile to include the additional link args when Can you test if building the project with |
I was trying to find out what you asked about The first is: I realized that if I was not specifying
So I have no idea how it worked, because combining The second puzzle is that after the updates from 2025.01.04 I couldn't manage to build it again, even following the instruction -- the linking errors have returned. Since prior to that I managed to build and run the demo in fresh projects on 2 different machines, that was quite surprising. I tried changing some stuff back and forth, but no luck, either way it can't either link some libraries or find some symbols, depending on settings. I'm still figuring this out. But I see that now it's updated to v4.15.0, so I'll retry with the latest version now. I'll post an update when I get something.
There is some slight delay, but not really a big lag. Maybe 10-15 seconds or so. Yeah, it's visible in the VSCode explorer that it clones and/or builds Raylib, so no big problem there. Never got any git errors or issues.
I'll try experimenting with that.
That's the interesting part, actually. I figured that it should've been somehow included automatically, but it wasn't! Literally,
Yeah, maybe. I wish we really figure out how to write the lakefile in a way that it just works on Windows. Sorry for longer reply times, I try when I can, so far this experimentation is taking a lot of time, I don't understand why something so simple should be so hard. But it's often the case when dealing with building C/C++ stuff, especially when using some intermediate tools like |
Ok, so, it's amazing, but with the new version the instruction works again. I don't think that the toolchain verison should influence something like that, and I think that I might've messed something up the last time, but not sure what. Anyway, it works again now. I think it was good before that the example of using Raygui was in, kinda straight to business. Using something like Lean with something like Raylib is not the most popular usecase, so that was very instructive. Maybe it's worth having it, or a separate example with Raygui usage. Regarding your question, I checked that. Specifying PS D:\work\my\_lean\lean-test-project\raylib-try-v15> $env:LEAN_CC="gcc"
PS D:\work\my\_lean\lean-test-project\raylib-try-v15> lake exe raylib-test
warning: raylib: repository '.\.\.lake/packages\raylib' has local changes
тЬЦ [5/111] Building ┬лlean-pod┬╗.static:shared
trace: .> c:\Users\user\.elan\toolchains\leanprover--lean4---v4.15.0\bin\leanc.exe -shared -o .\.\.lake/packages\pod\.lake\build\lib\lean-pod.dll -Wl,--whole-archive .\.\.lake/packages\pod\.lake\build\lib\lean-pod.a -Wl,--no-whole-archive
info: stderr:
D:/storage/distribs/programming/____mingw64/x86_64-14.2.0-release-posix-seh-ucrt-rt_v12-rev0/mingw64/bin/ld.exe: cannot find -lc++: No such file or directory
D:/storage/distribs/programming/____mingw64/x86_64-14.2.0-release-posix-seh-ucrt-rt_v12-rev0/mingw64/bin/ld.exe: cannot find -lc++abi: No such file or directory
D:/storage/distribs/programming/____mingw64/x86_64-14.2.0-release-posix-seh-ucrt-rt_v12-rev0/mingw64/bin/ld.exe: cannot find -lgmp: No such file or directory
D:/storage/distribs/programming/____mingw64/x86_64-14.2.0-release-posix-seh-ucrt-rt_v12-rev0/mingw64/bin/ld.exe: cannot find -luv: No such file or directory
collect2.exe: error: ld returned 1 exit status
error: external command 'c:\Users\user\.elan\toolchains\leanprover--lean4---v4.15.0\bin\leanc.exe' exited with code 1
тЬЦ [108/111] Building ┬лraylib-lean┬╗.static:shared
trace: .> c:\Users\user\.elan\toolchains\leanprover--lean4---v4.15.0\bin\leanc.exe -shared -o .\.\.lake/packages\raylib\.lake\build\lib\raylib-lean.dll -Wl,--whole-archive .\.\.lake/packages\raylib\.lake\build\lib\raylib-lean.a -Wl,--no-whole-archive -LC:/Users/user/.elan/toolchains/leanprover--lean4---v4.15.0/lib -L.\.\.lake/packages\raylib/../pod/.lake/build/lib -llean-pod -L.\.\.lake/packages\raylib/raylib/build/raylib -lraylib -L.\.\.lake/packages\raylib/raylib/build/raylib/external/glfw/src
info: stderr:
D:/storage/distribs/programming/____mingw64/x86_64-14.2.0-release-posix-seh-ucrt-rt_v12-rev0/mingw64/bin/ld.exe: cannot find -llean-pod: No such file or directory
D:/storage/distribs/programming/____mingw64/x86_64-14.2.0-release-posix-seh-ucrt-rt_v12-rev0/mingw64/bin/ld.exe: note to link with .\.\.lake/packages\raylib/../pod/.lake/build/lib\lean-pod.a use -l:lean-pod.a or rename it to liblean-pod.a
collect2.exe: error: ld returned 1 exit status
error: external command 'c:\Users\user\.elan\toolchains\leanprover--lean4---v4.15.0\bin\leanc.exe' exited with code 1
Some required builds logged failures:
- ┬лlean-pod┬╗.static:shared
- ┬лraylib-lean┬╗.static:shared
error: build failed Removing these dependencies produces even more errors. Here's the log with these libraries, and PS D:\work\my\_lean\lean-test-project\raylib-try-v15> lake exe raylib-test
warning: raylib: repository '.\.\.lake/packages\raylib' has local changes
тЬЦ [5/111] Building ┬лlean-pod┬╗.static:shared
trace: .> c:\Users\user\.elan\toolchains\leanprover--lean4---v4.15.0\bin\leanc.exe -shared -o .\.\.lake/packages\pod\.lake\build\lib\lean-pod.dll -Wl,--whole-archive .\.\.lake/packages\pod\.lake\build\lib\lean-pod.a -Wl,--no-whole-archive
info: stderr:
D:/storage/distribs/programming/____mingw64/x86_64-14.2.0-release-posix-seh-ucrt-rt_v12-rev0/mingw64/bin/ld.exe: cannot find -lc++: No such file or directory
D:/storage/distribs/programming/____mingw64/x86_64-14.2.0-release-posix-seh-ucrt-rt_v12-rev0/mingw64/bin/ld.exe: cannot find -lc++abi: No such file or directory
D:/storage/distribs/programming/____mingw64/x86_64-14.2.0-release-posix-seh-ucrt-rt_v12-rev0/mingw64/bin/ld.exe: cannot find -lgmp: No such file or directory
D:/storage/distribs/programming/____mingw64/x86_64-14.2.0-release-posix-seh-ucrt-rt_v12-rev0/mingw64/bin/ld.exe: cannot find -luv: No such file or directory
collect2.exe: error: ld returned 1 exit status
error: external command 'c:\Users\user\.elan\toolchains\leanprover--lean4---v4.15.0\bin\leanc.exe' exited with code 1
тЬЦ [108/111] Building ┬лraylib-lean┬╗.static:shared
trace: .> c:\Users\user\.elan\toolchains\leanprover--lean4---v4.15.0\bin\leanc.exe -shared -o .\.\.lake/packages\raylib\.lake\build\lib\raylib-lean.dll -Wl,--whole-archive .\.\.lake/packages\raylib\.lake\build\lib\raylib-lean.a -Wl,--no-whole-archive -LC:/Users/user/.elan/toolchains/leanprover--lean4---v4.15.0/lib -L.\.\.lake/packages\raylib/raylib/build/raylib -lraylib -L.\.\.lake/packages\raylib/raylib/build/raylib/external/glfw/src
info: stderr:
D:/storage/distribs/programming/____mingw64/x86_64-14.2.0-release-posix-seh-ucrt-rt_v12-rev0/mingw64/bin/ld.exe: .\.\.lake/packages\raylib\.lake\build\lib\raylib-lean.a(structures.o):structures.c:(.rdata$.refptr.lean_pod_BytesView_class[.refptr.lean_pod_BytesView_class]+0x0): undefined reference to `lean_pod_BytesView_class'
D:/storage/distribs/programming/____mingw64/x86_64-14.2.0-release-posix-seh-ucrt-rt_v12-rev0/mingw64/bin/ld.exe: .\.\.lake/packages\raylib\.lake\build\lib\raylib-lean.a(functions.o):functions.c:(.rdata$.refptr.lean_pod_Buffer_class[.refptr.lean_pod_Buffer_class]+0x0): undefined reference to `lean_pod_Buffer_class'
D:/storage/distribs/programming/____mingw64/x86_64-14.2.0-release-posix-seh-ucrt-rt_v12-rev0/mingw64/bin/ld.exe: .\.\.lake/packages\raylib\.lake\build\lib\raylib-lean.a(functions.o):functions.c:(.rdata$.refptr.lean_pod_Ptr_class[.refptr.lean_pod_Ptr_class]+0x0): undefined reference to `lean_pod_Ptr_class'
D:/storage/distribs/programming/____mingw64/x86_64-14.2.0-release-posix-seh-ucrt-rt_v12-rev0/mingw64/bin/ld.exe: .\.\.lake/packages\raylib/raylib/build/raylib/libraylib.a(rcore.c.obj): in function `ClosePlatform':
D:/work/my/_lean/lean-test-project/raylib-try-v15/.lake/packages/raylib/raylib/src/platforms/rcore_desktop_glfw.c:1697:(.text+0x2b2f8): undefined reference to `__imp_timeEndPeriod'
D:/storage/distribs/programming/____mingw64/x86_64-14.2.0-release-posix-seh-ucrt-rt_v12-rev0/mingw64/bin/ld.exe: .\.\.lake/packages\raylib/raylib/build/raylib/libraylib.a(rcore.c.obj): in function `InitTimer':
D:/work/my/_lean/lean-test-project/raylib-try-v15/.lake/packages/raylib/raylib/src/rcore.c:3520:(.text+0x32ec3): undefined reference to `__imp_timeBeginPeriod'
D:/storage/distribs/programming/____mingw64/x86_64-14.2.0-release-posix-seh-ucrt-rt_v12-rev0/mingw64/bin/ld.exe: .\.\.lake/packages\raylib/raylib/build/raylib/libraylib.a(win32_monitor.c.obj): in function `createMonitor':
D:/work/my/_lean/lean-test-project/raylib-try-v15/.lake/packages/raylib/raylib/src/external/glfw/src/win32_monitor.c:82:(.text+0x175): undefined reference to `__imp_CreateDCW'
D:/storage/distribs/programming/____mingw64/x86_64-14.2.0-release-posix-seh-ucrt-rt_v12-rev0/mingw64/bin/ld.exe: D:/work/my/_lean/lean-test-project/raylib-try-v15/.lake/packages/raylib/raylib/src/external/glfw/src/win32_monitor.c:86:(.text+0x1ad): undefined reference to `__imp_GetDeviceCaps'
D:/storage/distribs/programming/____mingw64/x86_64-14.2.0-release-posix-seh-ucrt-rt_v12-rev0/mingw64/bin/ld.exe: D:/work/my/_lean/lean-test-project/raylib-try-v15/.lake/packages/raylib/raylib/src/external/glfw/src/win32_monitor.c:87:(.text+0x1cb): undefined reference to `__imp_GetDeviceCaps'
D:/storage/distribs/programming/____mingw64/x86_64-14.2.0-release-posix-seh-ucrt-rt_v12-rev0/mingw64/bin/ld.exe: D:/work/my/_lean/lean-test-project/raylib-try-v15/.lake/packages/raylib/raylib/src/external/glfw/src/win32_monitor.c:91:(.text+0x22b): undefined reference to `__imp_GetDeviceCaps'
D:/storage/distribs/programming/____mingw64/x86_64-14.2.0-release-posix-seh-ucrt-rt_v12-rev0/mingw64/bin/ld.exe: D:/work/my/_lean/lean-test-project/raylib-try-v15/.lake/packages/raylib/raylib/src/external/glfw/src/win32_monitor.c:92:(.text+0x29c): undefined reference to `__imp_GetDeviceCaps'
D:/storage/distribs/programming/____mingw64/x86_64-14.2.0-release-posix-seh-ucrt-rt_v12-rev0/mingw64/bin/ld.exe: D:/work/my/_lean/lean-test-project/raylib-try-v15/.lake/packages/raylib/raylib/src/external/glfw/src/win32_monitor.c:95:(.text+0x2c8): undefined reference to `__imp_DeleteDC'
D:/storage/distribs/programming/____mingw64/x86_64-14.2.0-release-posix-seh-ucrt-rt_v12-rev0/mingw64/bin/ld.exe: .\.\.lake/packages\raylib/raylib/build/raylib/libraylib.a(win32_monitor.c.obj): in function `_glfwGetHMONITORContentScaleWin32':
D:/work/my/_lean/lean-test-project/raylib-try-v15/.lake/packages/raylib/raylib/src/external/glfw/src/win32_monitor.c:336:(.text+0xc75): undefined reference to `__imp_GetDeviceCaps'
D:/storage/distribs/programming/____mingw64/x86_64-14.2.0-release-posix-seh-ucrt-rt_v12-rev0/mingw64/bin/ld.exe: D:/work/my/_lean/lean-test-project/raylib-try-v15/.lake/packages/raylib/raylib/src/external/glfw/src/win32_monitor.c:337:(.text+0xc8d): undefined reference to `__imp_GetDeviceCaps'
D:/storage/distribs/programming/____mingw64/x86_64-14.2.0-release-posix-seh-ucrt-rt_v12-rev0/mingw64/bin/ld.exe: .\.\.lake/packages\raylib/raylib/build/raylib/libraylib.a(win32_monitor.c.obj): in function `_glfwGetGammaRampWin32':
D:/work/my/_lean/lean-test-project/raylib-try-v15/.lake/packages/raylib/raylib/src/external/glfw/src/win32_monitor.c:501:(.text+0x12e4): undefined reference to `__imp_CreateDCW'
D:/storage/distribs/programming/____mingw64/x86_64-14.2.0-release-posix-seh-ucrt-rt_v12-rev0/mingw64/bin/ld.exe: D:/work/my/_lean/lean-test-project/raylib-try-v15/.lake/packages/raylib/raylib/src/external/glfw/src/win32_monitor.c:502:(.text+0x1302): undefined reference to `__imp_GetDeviceGammaRamp'
D:/storage/distribs/programming/____mingw64/x86_64-14.2.0-release-posix-seh-ucrt-rt_v12-rev0/mingw64/bin/ld.exe: D:/work/my/_lean/lean-test-project/raylib-try-v15/.lake/packages/raylib/raylib/src/external/glfw/src/win32_monitor.c:503:(.text+0x1315): undefined reference to `__imp_DeleteDC'
D:/storage/distribs/programming/____mingw64/x86_64-14.2.0-release-posix-seh-ucrt-rt_v12-rev0/mingw64/bin/ld.exe: .\.\.lake/packages\raylib/raylib/build/raylib/libraylib.a(win32_monitor.c.obj): in function `_glfwSetGammaRampWin32':
D:/work/my/_lean/lean-test-project/raylib-try-v15/.lake/packages/raylib/raylib/src/external/glfw/src/win32_monitor.c:530:(.text+0x1474): undefined reference to `__imp_CreateDCW'
D:/storage/distribs/programming/____mingw64/x86_64-14.2.0-release-posix-seh-ucrt-rt_v12-rev0/mingw64/bin/ld.exe: D:/work/my/_lean/lean-test-project/raylib-try-v15/.lake/packages/raylib/raylib/src/external/glfw/src/win32_monitor.c:531:(.text+0x1492): undefined reference to `__imp_SetDeviceGammaRamp'
D:/storage/distribs/programming/____mingw64/x86_64-14.2.0-release-posix-seh-ucrt-rt_v12-rev0/mingw64/bin/ld.exe: D:/work/my/_lean/lean-test-project/raylib-try-v15/.lake/packages/raylib/raylib/src/external/glfw/src/win32_monitor.c:532:(.text+0x14a5): undefined reference to `__imp_DeleteDC'
D:/storage/distribs/programming/____mingw64/x86_64-14.2.0-release-posix-seh-ucrt-rt_v12-rev0/mingw64/bin/ld.exe: .\.\.lake/packages\raylib/raylib/build/raylib/libraylib.a(win32_window.c.obj): in function `createIcon':
D:/work/my/_lean/lean-test-project/raylib-try-v15/.lake/packages/raylib/raylib/src/external/glfw/src/win32_window.c:125:(.text+0x232): undefined reference to `__imp_CreateDIBSection'
D:/storage/distribs/programming/____mingw64/x86_64-14.2.0-release-posix-seh-ucrt-rt_v12-rev0/mingw64/bin/ld.exe: D:/work/my/_lean/lean-test-project/raylib-try-v15/.lake/packages/raylib/raylib/src/external/glfw/src/win32_window.c:140:(.text+0x2a3): undefined reference to `__imp_CreateBitmap'
D:/storage/distribs/programming/____mingw64/x86_64-14.2.0-release-posix-seh-ucrt-rt_v12-rev0/mingw64/bin/ld.exe: D:/work/my/_lean/lean-test-project/raylib-try-v15/.lake/packages/raylib/raylib/src/external/glfw/src/win32_window.c:145:(.text+0x2d2): undefined reference to `__imp_DeleteObject'
D:/storage/distribs/programming/____mingw64/x86_64-14.2.0-release-posix-seh-ucrt-rt_v12-rev0/mingw64/bin/ld.exe: D:/work/my/_lean/lean-test-project/raylib-try-v15/.lake/packages/raylib/raylib/src/external/glfw/src/win32_window.c:168:(.text+0x3da): undefined reference to `__imp_DeleteObject'
D:/storage/distribs/programming/____mingw64/x86_64-14.2.0-release-posix-seh-ucrt-rt_v12-rev0/mingw64/bin/ld.exe: D:/work/my/_lean/lean-test-project/raylib-try-v15/.lake/packages/raylib/raylib/src/external/glfw/src/win32_window.c:169:(.text+0x3ea): undefined reference to `__imp_DeleteObject'
D:/storage/distribs/programming/____mingw64/x86_64-14.2.0-release-posix-seh-ucrt-rt_v12-rev0/mingw64/bin/ld.exe: .\.\.lake/packages\raylib/raylib/build/raylib/libraylib.a(win32_window.c.obj): in function `updateFramebufferTransparency':
D:/work/my/_lean/lean-test-project/raylib-try-v15/.lake/packages/raylib/raylib/src/external/glfw/src/win32_window.c:386:(.text+0xc76): undefined reference to `__imp_CreateRectRgn'
D:/storage/distribs/programming/____mingw64/x86_64-14.2.0-release-posix-seh-ucrt-rt_v12-rev0/mingw64/bin/ld.exe: D:/work/my/_lean/lean-test-project/raylib-try-v15/.lake/packages/raylib/raylib/src/external/glfw/src/win32_window.c:393:(.text+0xcdb): undefined reference to `__imp_DeleteObject'
D:/storage/distribs/programming/____mingw64/x86_64-14.2.0-release-posix-seh-ucrt-rt_v12-rev0/mingw64/bin/ld.exe: .\.\.lake/packages\raylib/raylib/build/raylib/libraylib.a(wgl_context.c.obj): in function `choosePixelFormatWGL':
D:/work/my/_lean/lean-test-project/raylib-try-v15/.lake/packages/raylib/raylib/src/external/glfw/src/wgl_context.c:75:(.text+0xdc): undefined reference to `__imp_DescribePixelFormat'
D:/storage/distribs/programming/____mingw64/x86_64-14.2.0-release-posix-seh-ucrt-rt_v12-rev0/mingw64/bin/ld.exe: D:/work/my/_lean/lean-test-project/raylib-try-v15/.lake/packages/raylib/raylib/src/external/glfw/src/wgl_context.c:220:(.text+0xe32): undefined reference to `__imp_DescribePixelFormat'
D:/storage/distribs/programming/____mingw64/x86_64-14.2.0-release-posix-seh-ucrt-rt_v12-rev0/mingw64/bin/ld.exe: .\.\.lake/packages\raylib/raylib/build/raylib/libraylib.a(wgl_context.c.obj): in function `swapBuffersWGL':
D:/work/my/_lean/lean-test-project/raylib-try-v15/.lake/packages/raylib/raylib/src/external/glfw/src/wgl_context.c:344:(.text+0x123d): undefined reference to `__imp_SwapBuffers'
D:/storage/distribs/programming/____mingw64/x86_64-14.2.0-release-posix-seh-ucrt-rt_v12-rev0/mingw64/bin/ld.exe: .\.\.lake/packages\raylib/raylib/build/raylib/libraylib.a(wgl_context.c.obj): in function `_glfwInitWGL':
D:/work/my/_lean/lean-test-project/raylib-try-v15/.lake/packages/raylib/raylib/src/external/glfw/src/wgl_context.c:452:(.text+0x1683): undefined reference to `__imp_ChoosePixelFormat'
D:/storage/distribs/programming/____mingw64/x86_64-14.2.0-release-posix-seh-ucrt-rt_v12-rev0/mingw64/bin/ld.exe: D:/work/my/_lean/lean-test-project/raylib-try-v15/.lake/packages/raylib/raylib/src/external/glfw/src/wgl_context.c:452:(.text+0x169c): undefined reference to `__imp_SetPixelFormat'
D:/storage/distribs/programming/____mingw64/x86_64-14.2.0-release-posix-seh-ucrt-rt_v12-rev0/mingw64/bin/ld.exe: .\.\.lake/packages\raylib/raylib/build/raylib/libraylib.a(wgl_context.c.obj): in function `_glfwCreateContextWGL':
D:/work/my/_lean/lean-test-project/raylib-try-v15/.lake/packages/raylib/raylib/src/external/glfw/src/wgl_context.c:565:(.text+0x1b34): undefined reference to `__imp_DescribePixelFormat'
D:/storage/distribs/programming/____mingw64/x86_64-14.2.0-release-posix-seh-ucrt-rt_v12-rev0/mingw64/bin/ld.exe: D:/work/my/_lean/lean-test-project/raylib-try-v15/.lake/packages/raylib/raylib/src/external/glfw/src/wgl_context.c:573:(.text+0x1b7a): undefined reference to `__imp_SetPixelFormat'
collect2.exe: error: ld returned 1 exit status
error: external command 'c:\Users\user\.elan\toolchains\leanprover--lean4---v4.15.0\bin\leanc.exe' exited with code 1
Some required builds logged failures:
- ┬лlean-pod┬╗.static:shared
- ┬лraylib-lean┬╗.static:shared
error: build failed So specifying
results in linking errors. Not sure what to do with that. So I just add it to fix the errors. |
After googling a bit I think they are compatible, at least in some cases.
For me clean
Then I'll make some more examples related to bindings' features like raygui soon.
Thanks for checking! I hoped that the system compiler will have these libraries available by default. I guess it is fixable, but probably not worth it. On Linux it did help when Luau was failing to link due to something with c++ std lib. Regarding |
There's an interesting thing. Sorry for the off-topic, it's mostly a note-in-context for my future reference, feel free to skip. It always amazes me how doing such basic things always feels like navigating in the dark, while in reality these things are invented by us, to help us, are just mere service tools, and have a very well defined behavior. There's always a clear reason why something does or doesn't work, and always a clear and well-defined set of possible options and actions from each point of the process. The complexity is times lower than that of a large business application. There's no RNG involved, no surprises, no divine intervention, no side effects. Parameters, programs and source files in, generated files out, that's it. Problems of this level, if projected outside of IT feel just idiculous. It's like not being able to walk out of home for a week because you can't figure out how to tie your laces because they just keep raining errors. How did we get outselves into this? I would think that I'm just stupid, ok no problem, but when I search for answers in google, there are countless forums where even C/C++ pros are unable to help in many situations other people have the same problems, and they keep repeating. I hope that one day all this is just as verified and checked, as a Lean program. At any point it should be able to verify the build script and propose solutions. It should never be more complex than the menu of a McDonald's kiosks where you build a hamburger, figuratively speaking. There were similar attempts like the Nix, and then Guix package managers, but the fundamental flaw was always that they were mathematically incomplete, not even talking about that they did not manage to cover the Windows algebra. There's Maven/Gradle, but that's a different story. There's also Unison, with the groundbreakingly new promising paradigm for all this, but it's too early to say something yet. Let's see, I just wonder, who's going to be the first to solve the "compilation problem" -- will it be a human-built tool based on mathematical rigor, understanding, and intelligent design, or will it be an AI-based tool? And if it's going to be the latter, then that's gonna be really funny news, we're just unable to.
Wow, strange. For me it's like always, cloning goes fast like of any other repo on github. Just letting you know. Maybe it's an internet problem where you are or something like that.
Thanks! I think that'll be great! |
@KislyjKisel well, not surprisingly, the new update broke it again 😄 I'm trying to figure out how to fix it. Currently this is here it breaks: PS D:\work\my\_lean\lean-test-project\raylib-try-v03\.lake\packages\raylib> lake -d=examples exe Minimal
тЬЦ [19/100] Building raylib/┬лraylib-lean┬╗.static
trace: .> c:\Users\user\.elan\toolchains\leanprover--lean4---v4.15.0\bin\clang.exe -c -o examples\.\./..\.lake\build\ir\native\structures.o examples\.\./..\src\native\structures.c -I c:\Users\user\.elan\toolchains\leanprover--lean4---v4.15.0\include -I examples\.\.lake/packages\pod\src\native\include -I examples\.\./..\raygui\src -I c:\Users\user\.elan\toolchains\leanprover--lean4---v4.15.0\include\clang -fPIC -I examples\.\./..\raylibFork\build\raylib\include -I examples\.\./..\raylibFork\src\external\glfw\include -DLEAN_RAYLIB_FORK
info: stderr:
In file included from examples\.\./..\src\native\structures.c:3:
In file included from examples\.\.lake/packages\pod\src\native\include/lean_pod.h:4:
In file included from D:/storage/distribs/programming/____mingw64/x86_64-14.2.0-release-posix-seh-ucrt-rt_v12-rev0/mingw64/x86_64-w64-mingw32/include/stdlib.h:770:
D:/storage/distribs/programming/____mingw64/x86_64-14.2.0-release-posix-seh-ucrt-rt_v12-rev0/mingw64/x86_64-w64-mingw32/include/malloc.h:84:10: fatal error: 'mm_malloc.h' file not found
#include <mm_malloc.h>
^~~~~~~~~~~~~
1 error generated.
error: external command 'c:\Users\user\.elan\toolchains\leanprover--lean4---v4.15.0\bin\clang.exe' exited with code 1
... many more instances of the same error ... So the problem is that it can't find the
Ultimately, a part of the problem is that it's not clear how does the toolchain coin each of the strings it uses during the process, where from do the parameters come, and where do I specify them. So do you know if there's maybe some good manual on lake which explains all this? Because the only documentation I found explains only the barest minimum of options, and there's nothing like configuring what params does it pass to the C compiler, etc. |
Where the strings come from (not relevant - I forgot a thing, see below):
Now I remember that when trying out an example on a different pc, I also had problems. They ignore |
@KislyjKisel I keep mentioning you explicitly because idk if closed issues send any notifications, sorry :)
Yeah, as I execute But it's still kinda weird because:
I think that the issue is in that lake doesn't have the concept of project modules, like in for example Gradle. It solves so many problems... Yeah, maybe I should stop trying to build examples as the first step of verifying that I got a working Lean+Raylib setup, and just actually start the project I was thinking of, so that I don't deal with the build system troubles that much. But still, the fact that these problems come up is kinda worrysome, simply skipping such stuff doesn't feel right. |
Actually, I meant that I tried to configure raylib using
My bad, I didn't use a permalink. I have already deleted it and moved examples
|
Hello! I'm trying to experiment with Raylib in Lean under Windows, and it seems to work out-of-the-box until the last step of building the example exe. Here's the error I'm getting:
As I understand, the line it passes to
leanc.exe
indeed only mentions the bindings, and completely misses the parameters for linking the Raylib library itself. I can't however, find any way to influence what's being passed there, whatever I do the command remains the same.I tried even switching the whole build to
gcc
, partly borrowing some advise from #3, in hopes thatgcc
will be used for everything, and it seemed to work, but again only up to this same point of building the exe sincelean_exe
still usesleanc.exe
despite anything.What is the actual expected behavior of the build system at that point? It doesn't seem to me like that command would succeed, but I might be wrong. How would I go about fixing that?
The text was updated successfully, but these errors were encountered: