|
|
Home » Developing U++ » UppHub » Upp package binding for LLVM/Clang library (libclang)
Re: Upp package binding for LLVM/Clang library (libclang) [message #30403 is a reply to message #30400] |
Tue, 28 December 2010 15:48   |
Sender Ghost
Messages: 301 Registered: November 2008
|
Senior Member |
|
|
Hello, Sgifan.
As you can see, I explained how to compile LLVM/Clang on Windows and didn't say about using Clang compiler. That's it for Windows operating system (for now, at least).
Yes, you can use Clang to compile C++ source code (even whole Upp TheIDE) on Unix-like operating systems.
The purpose of this thread is to use Clang library (libclang) with Upp build system (as package). The libclang library is not a whole compiler, but also can suffer from its features for particular operating system.
To understand about libclang, please watch slides or video(s) from 2010 LLVM Developer's Meeting.
To use libclang with Clang compiler you need to compile it first using Clang, not GCC (but there is a possibility with the same ABI between them, of course). Also, you need to specify correct paths for Clang.
As you may know, latest GCC version which use Clang is 4.2 version (by developers). But there is a possibility to use newer versions. For example, if you install LLVM/Clang with TDM-GCC v4.5.2 then you can specify following paths for TheIDE build method:
PATH - executable directories:
C:\BuildSystem\install\llvm\bin
C:\MinGW\bin
INCLUDE directories:
C:\BuildSystem\install\llvm\include
C:\MinGW\lib\gcc\mingw32\4.5.2\include\c++
C:\MinGW\lib\gcc\mingw32\4.5.2\include\c++\mingw32
C:\MinGW\lib\gcc\mingw32\4.5.2\include\c++\backward
C:\MinGW\include
C:\MinGW\lib\gcc\mingw32\4.5.2\include
C:\MinGW\lib\gcc\mingw32\4.5.2\include-fixed
LIB directories:
C:\BuildSystem\install\llvm\lib
C:\MinGW\lib
And now you can change compiler name to "clang++" for build method and try to build C++ source code.
For example, I did it in the past and had linker errors.
If you want to improve possibility to compile C++ source code on Windows then there is LLVM Bug Database for various projects including Clang.
Edit (2011-04-07):
From LLVM 2.9 release, it possible to build applications on Windows. But there are stability issues of compiled applications (especially on exit) and multithreading source code issues (which tested for TDM GCC v4.5.2).
[Updated on: Thu, 07 April 2011 19:17] Report message to a moderator
|
|
|
Goto Forum:
Current Time: Sun Aug 24 16:32:45 CEST 2025
Total time taken to generate the page: 0.04046 seconds
|
|
|