Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: doskabouter2 on June 04, 2019, 01:56:42 pm

Title: Codeblocks and LLVM on windows
Post by: doskabouter2 on June 04, 2019, 01:56:42 pm
Hi,

I'm struggling with compiling and debugging mapbox-gl-native in code::blocks, and I'm not getting the results I expected.
For some reason the only compiler that is able to compile the mapbox-gl-native is clang-cl (clang version 8.0.0 (tags/RELEASE_800/final)
Target: x86_64-pc-windows-msvc
Thread model: posix
InstalledDir: C:\PROGRA~1\LLVM\bin
)

That's fine for me, but I can't get it so I can debug (step through the code in code::blocks) the sources.
Created a simple hello-world to test this toolchain and tried various linkers (lld-link, mingw32-g++, x86_64-w64-mingw32-g++, and probably some visual studio ones).
The mingw ones are complaining about a corrupt .def file and quitting after that
The lld-link is only capable (as far as I could find out) to output .pdb as symbolfile, and gdb is not able to read pdb-files.
Also lldb doesn't seem to read in the pdb file (Unable to resolve breakpoint to any actual locations. when trying to set a breakpoint in lldb)
Can anyone shed any lights on this?
Title: Re: Codeblocks and LLVM on windows
Post by: stahta01 on June 04, 2019, 03:53:09 pm
Under Code::Blocks, I believe the Microsoft debugger is called cdb.

Edit: "Target: x86_64-pc-windows-msvc" this implies you need to use the Microsoft debugger.

https://docs.microsoft.com/en-us/windows-hardware/drivers/debugger/ (https://docs.microsoft.com/en-us/windows-hardware/drivers/debugger/)

Tim S.
Title: Re: Codeblocks and LLVM on windows
Post by: doskabouter2 on June 05, 2019, 04:56:21 pm
Ok, I've managed to do get it to compile with gcc (found a newer version and that fixed the issues)
Only a few linker errors to go and then I can finally start doing some serious development in code::blocks