<br>I just downloaded LLVM a couple days ago -- I got everything built and installed quite easily using CMake to generate build files for Eclipse CDT + MinGW. That much worked like a charm -- but I've spent most of the intervening time trying to get a simple project set up.  :-P<br>
<br>My goal is to create a project consisting of two main parts:<br>   - A backend for WDC 65816<br>   - A frontend including a simple programming language and tools for managing generated code<br><br>It's my understanding that it's necessary to develop the backend as part of the LLVM source tree. The frontend, though, I would like to maintain as a separate project, with as little coupling as possible to the rest of the LLVM source and build configuration.<br>
<br>The problem, though, is that I'm having a heck of a time figuring out how to do this. I started with the "Creating an LLVM Project" documentation:<br><br>        <a href="http://llvm.org/docs/Projects.html">http://llvm.org/docs/Projects.html</a><br>
<br>Which advises copying projects/sample to a location of your choosing and modifying it with autoconf. That seems to be a tricky proposition on Windows, though, especially if you want to use Eclipse CDT to build and maintain your project. For one thing, since I built using CMake instead of using the configure script, some files (like Makefile.config in LLVM_OBJ_ROOT) do not exist.<tt></tt><br>
<br>Eventually I decided to just try compiling the source for Chapter 3 of the Kaleidoscope tutorial directly with GCC. Here was the command line I used:<br><br>        g++ toy.cpp `llvm-config --cxxflags` `llvm-config --libs core` `llvm-config --ldflags`<br>
<br>This compiled just fine, with no warnings; but when I tried to run the program, as soon as I entered an expression for Kaleidoscope to compile, I got an assert failure like this:<br><br>        define double @0()Assertion failed: errorcode == 0, file c:/llvm-2.7/lib/System/RWMutex.cpp, line 87<br>
<br>When I built the examples using Eclipse CDT (via the CMake-generated project files), the Kaleidoscope examples all worked perfectly.<br><br>So what's the scoop? Is there any way I can conveniently create a project with Eclipse CDT that uses LLVM? What do I actually need to include and link? Any advice or guidance would be greatly appreciated.<br>