News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

Using Clang (7.0) on Windows to Build Code::Blocks for Windows

Started by smallscript, February 16, 2018, 12:40:48 AM

Previous topic - Next topic

smallscript

I predominantly use clang on Windows for Development. I am pretty expert with Visual Studio. I have the latest LLVM/Clang 7.0 fully integrated with VS2017 including full LLVM lld PDB generation for native windows debugging.

I would like to enable building [/b]Code::Blocks itself using clang. Currently it seems to depend on minggw/gcc to build itself (but with clang that should not be required).

Anyone looked at this or explored it?
As a cross-platform development compiler; clang is the cross-compiler that is most completely integrated into native windows ABI development Windows. I'd be happy to answer any questions.

Check this "Jan 09 Blog" article http://planet.clang.org/

oBFusCATed

1. there is no clang 7, this is trunk compiler...
2. as start try to compile wxwidgets
3. if you get 2 done, building cb will be easy...
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

stahta01

Quote from: oBFusCATed on February 16, 2018, 01:01:12 AM
1. there is no clang 7, this is trunk compiler...
2. as start try to compile wxwidgets
3. if you get 2 done, building cb will be easy...

Remember Code::Blocks works best with an Shared/DLL build of wxWidgets.

Just tried to build wxwidgets recent git master branch and it failed to build DLL using Clang 5.0.1.

Tim S.
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

oBFusCATed

Quote from: stahta01 on February 16, 2018, 07:56:19 PM
Just tried to build wxwidgets recent git master branch and it failed to build DLL using Clang 5.0.1.
How are you trying? I can't find any instructions about how to use clang to build wxwidgets on windows?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

stahta01

Quote from: oBFusCATed on February 16, 2018, 08:35:46 PM
Quote from: stahta01 on February 16, 2018, 07:56:19 PM
Just tried to build wxwidgets recent git master branch and it failed to build DLL using Clang 5.0.1.
How are you trying? I can't find any instructions about how to use clang to build wxwidgets on windows?

I am building under MSys2 (an fork of Cygwin) using configure/make.

It built an static wxWidgets without build errors; did not try running the sample to see if library works.

Followed an modified version of the docs/msw/msys2-msw.txt that I wrote and submitted to wxWidgets team a while ago.


  CC=clang CXX=clang++ \
    ../configure --with-msw \
    --enable-shared \
    --disable-precomp-headers \


Tim S.
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

oBFusCATed

Ok, Msys2 and cygwin are things I'm not interested at all...
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

stahta01

You might try this command and see if it works for you.


mingw32-make -f makefile.gcc CC=clang CXX=clang++ MONOLITHIC=0 SHARED=0 UNICODE=1 BUILD=debug


Tim S.
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]