[LLVMdev] Minor correction to the Visual Studio documentation

Nathan Jeffords blunted2night at gmail.com
Fri May 25 08:57:31 PDT 2012


I checkout LLVM and clang from SVN, then use CMake to generate project
files for Visual Studio 2010 (I started with 2008). The LLVM project
compiles successfully and gives me all the tools including Clang. For a few
tests, I compile C++ code with Clang which if I need to I link, I use
MinGW's ld passing all the relevant object files and libraries including
correctly ordering the start-up code and such.

My project is C++ language front end using a CMake build script to generate
a Visual Studio 2010 project. Within the CMake build script I specify each
individual library I need to link against in the correct order.

LLVM is written in C++ so it is the de facto interface.  From what I
understand the C bindings are not complete, but they are quite usable.

this is the library section of my CMake build script for the final
executable:

${PLATFORM_LIBS}

#LLVMX86Disassembler
#LLVMX86AsmParser
LLVMX86AsmPrinter
LLVMX86CodeGen
LLVMX86Utils
LLVMX86Desc
LLVMX86Info

LLVMSelectionDAG

LLVMAsmPrinter

#LLVMJIT
#LLVMExecutionEngine

LLVMCodeGen
LLVMScalarOpts
LLVMTransformUtils

#LLVMipa
LLVMAnalysis
LLVMTarget
 LLVMMCParser
LLVMMC

LLVMCore
LLVMSupport

It took me a little while to get the ordering right the first time, but it
has been pretty stable since then.

On Fri, May 25, 2012 at 6:24 AM, Mikael Lyngvig <mikael at lyngvig.org> wrote:

> So you are using Visual Studio?!  I tried that path but ran into all sorts
> of problems with unresolved symbols, when linking C++ code, even though I
> experimentally linked in each and every LLVM library.  I would be very
> interested in hearing how you manage to use VS.  Are you using the VS
> libraries for a project of your own or are you only using them for working
> on LLVM/Clang?  Also, what language are you using: C or C++?  I understood
> from the mailing list that the C++ support is not mature enough for it to
> be used succesfully.
>
> By the way, that shell script (llvm-config) is now a program (.exe) so it
> is easy to use also on Windows.
>

<snip>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120525/348905ff/attachment.html>


More information about the llvm-dev mailing list