Developer forums (C::B DEVELOPMENT STRICTLY!) > CodeCompletion redesign
Clang based CC, new CC interface
thomas:
--- Quote from: oBFusCATed on February 07, 2014, 11:40:16 pm ---Have you tried the binaries, I think they build them everyday
--- End quote ---
Their builds don't have WinAPI, nor C++SL. That be the reason why I'd waste hours trying to do a build myself.
When you do your own build, you can either use CLang's libc++ which is a sooooo much better alternative to GCC's, or have the build process incorporate the existing host standard library from your.
Except of course, neither one works.
Telling configure to use CLang's lib results in an immediate abort (because it passes some unknown commandline option to GCC), and using the host's library "works" except it later turns out that the compiler doesn't have it. Now the obvious solution would be to first bootstrap a half-working CLang without working standard library (which nevertheless understands that command line switch!), and then build a fully functional version from that. Except of course you can't build CLang without a working standard library...
--- Quote ---Have you reported this problems to clang devs, no point shouting here:)
--- End quote ---
To what avail? Those things must be bloody evident to them. Surely I'm not the first person in the world writing a program that contains #include <algorithm>. Surely I'm not the first to try this with CLang either. They must be aware that it doesn't work.
thomas:
--- Quote from: Ceniza on February 08, 2014, 09:25:38 pm ---As for LLVM and Clang, their main platform is OS X (more like BSD in general, since FreeBSD also decided to drop GCC and move to Clang/LLVM). Linux, being related to Unix and BSD, can, of course, more easily get Clang/LLVM working. Windows, as usual, is the outsider (however popular) when it comes to standards (what Microsoft managed to implement of POSIX is, at its best, laughable).
--- End quote ---
This is not Microsoft's fault, however. It is the typical BSD/Linux/Unix shit. Programs must be super portable to run on every system that is 67 years old, with a processor that you can only find in a museum. And configure does that, isn't it just great. Except the software fails to build on the most mainstream system because the software is not written properly, but using that configure crap.
This isn't a symptom particular to CLang. It's the same with GCC and its prerequisites as well. If you try to build GMP, you get this configure error about some typedef not having the correct size. If you just comment out the stupefied line that assumes sizeof(long) == 8, everything works perfect. Now, thing is, without this "super smart portable" shit, it would work much better.
--- Quote ---What I find kind of ironic is the eagerness to bash on Clang/LLVM for its poor support for Windows, when Code::Blocks itself (and wxWidgets for that matter) is in a rather sorry state when it comes to OS X support. The interesting thing is that both projects share the same reason for it: lack of community support and contributions for a specific platform.
--- End quote ---
There are some notable differences, though:
* This is a more or less hobby-founded project, not backed by a company the size of Apple. Do we even have one single full-time developer in our team? I think not.
* C::B actually builds and runs with two clicks on all the most important systems. Except, of course, Apple. Welcome back in the 1990s when I tried to convince everybody around me that it wasn't my Mac's fault that it couldn't properly read Windows disks and Word documents (or any document from anything not Apple, for that matter). Of course that was because everybody else sucked, not Apple.
* While C::B has a lot of annoying issues (many of which come from the toolkit that we use) it nevertheless works more or less least acceptably for 90% of everything I've ever done, and despite annoyances still gets the job done in 9.5 out of the remaining 10%.
* We don't claim that Code::Blocks is the greatest thing since the invention of the wheel.
--- Quote ---By the way, I thought Eranif managed to get Clang working for his code-completion in CodeLite years ago, or am I getting confused? If so, he may be the best guy to ask about it.
--- End quote ---
I have Clang working as far as that's concerned too. Reading closely helps understanding the issue. Getting the support lib to compile (or the whole compiler suite) isn't the issue. The problem is getting a compiler that works with C++ (or Windows).
I have a perfectly working compiler for 10 or 12 different architectures with perfectly working tools and support libs. Except no single C++ header or WinAPI header (or lib) is included, nor is there a way (at least not documented) of configuring it so it will look for C++ headers in some other system path and compiling C++ will work.
thomas:
In the mean time, it seems like I've managed to do a build of an almost-working C++ compiler, which borrows the missing headers from an existing MinGW-w64 installation ("borrows" means that it looks in the other compiler's install directory, it remains to be seen how ABI compatibility will play with libs).
At least a minimum compileable C++11 example seems to compile fine. Including <algorithm> and <memory> works as well as including <windows>, further creating a unique_ptr<int> works.
On the downside, CLang fails executing its unit test suite on all std::mutex test cases. Which basically means it's a kind-of working C++11 compiler without thread support (depending on another install). Still not great, but at least getting close to something that works.
ollydbg:
See what other Open Source/Free IDE's plan on Clang:
1, Qt Creator and Clang | Qt Blog, I notice that clang can even support multiply PCHs, not the single one as GCC.
2, [Qt-creator] Future of Qt Creator's C++ parsing after their discussions [Qt-creator] QtCreator C++ code parser and clang integration status.
3, Kate/KDevelop Sprint 2014: Let There Be Clang | Milian Wolff
4, CodeLitealready integrate Clang code completion.
5, a Clang based on-line code browser, see an example: Parser.cpp [llvm/tools/clang/lib/Parse/Parser.cpp] - Woboq Code Browser, hover the mouse on the function names, you will see every thing, it is free for non-commerical project.
6, (new added), Clang Developers - Clang-based indexer and code navigator, it's demo can be seen SourceWeb
PS: Roberto Raggi, the author of the C++ parser in QtCreator and Kdevelop are now developing another parser from scratch, see: cplusplus, he try to create a new tool as alternative of clang? (he posted here in Cool stuff! about the Qt)
Meiner:
I'm very happy that there is some progress in the development of a new clang-based CC-Plugin, thanks for that.
I tried to compile the source code yesterday, but I get some weired errors. Basically classes like wxStringVec, CCToken, CCProviderStatus and CCCallTip seem not to be in scope (include paths, etc. are pointing to the right locations from my point of view). I can't figure out in which files these classes are originally located, so I'm not able to fix this error at the moment. I'd appreciate some hints what I'm doing wrong.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version