<span id="goog_862450046"></span><span id="goog_862450047"></span><a href="/"></a>On Sat, Jul 13, 2013 at 12:09 AM, Daniel Albuschat <<a href="mailto:d.albuschat@gmail.com">d.albuschat@gmail.com</a>> wrote:<br>><br>
> I get the following error mesage from the code:<br>> > error: unknown target triple '', please use -triple or -arch<br>><br>> I thought I provided the required triple in the call to clang::TargetInfo::CreateTargetInfo, passing targetOptions, which "Triple" member has been set to "i386-pc-win32" (which was only a guess, since I did not find a reference for the string syntax of a target triple).<br>
<br><br>Try using llvm::sys::getDefaultTargetTriple().<br><br>Also you could try to look into this code to see how I initialize Clang manually (I don't know if it's the "correct" way to do it, but it's been working fine): <a href="https://github.com/mono/CppSharp/blob/master/src/Parser/Parser.cpp">https://github.com/mono/CppSharp/blob/master/src/Parser/Parser.cpp</a><br>
<br>--<br>Joćo Matos