Author Topic: Codeblocks and LLVM on windows  (Read 464 times)

Offline doskabouter2

  • Single posting newcomer
  • *
  • Posts: 2
Codeblocks and LLVM on windows
« on: June 04, 2019, 01:56:42 pm »

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?

Offline stahta01

  • Lives here!
  • ****
  • Posts: 6610
    • My Best Post
Re: Codeblocks and LLVM on windows
« Reply #1 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.

Tim S.
« Last Edit: June 04, 2019, 03:55:56 pm by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
When in doubt, read the CB WiKi FAQ.

Offline doskabouter2

  • Single posting newcomer
  • *
  • Posts: 2
Re: Codeblocks and LLVM on windows
« Reply #2 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