<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head>
<body text="#000000" bgcolor="#FFFFFF">
Hello,<br>
<br>
<meta http-equiv="content-type" content="text/html;
charset=ISO-8859-1">
<p style="margin: 0px 0px 1em; padding: 0px; border: 0px; font-size:
14px; vertical-align: baseline; background-color: rgb(255, 255,
255); clear: both; color: rgb(0, 0, 0); font-family: Arial,
'Liberation Sans', 'DejaVu Sans', sans-serif; font-style: normal;
font-variant: normal; font-weight: normal; letter-spacing: normal;
line-height: 17.804800033569336px; orphans: auto; text-align:
left; text-indent: 0px; text-transform: none; white-space: normal;
widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;
background-position: initial initial; background-repeat: initial
initial;">I am using Linux Mint 15 Olivia, and I installed the
clang compiler and libclang-dev packages available in the
repositories, they are version 3.2.</p>
<p style="margin: 0px 0px 1em; padding: 0px; border: 0px; font-size:
14px; vertical-align: baseline; background-color: rgb(255, 255,
255); clear: both; color: rgb(0, 0, 0); font-family: Arial,
'Liberation Sans', 'DejaVu Sans', sans-serif; font-style: normal;
font-variant: normal; font-weight: normal; letter-spacing: normal;
line-height: 17.804800033569336px; orphans: auto; text-align:
left; text-indent: 0px; text-transform: none; white-space: normal;
widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;
background-position: initial initial; background-repeat: initial
initial;">I am trying to compile and link the example from clang
repository<span class="Apple-converted-space"> </span><a
href="http://llvm.org/svn/llvm-project/cfe/tags/RELEASE_32/final/examples/clang-interpreter/main.cpp"
rel="nofollow" style="margin: 0px; padding: 0px; border: 0px;
font-size: 14px; vertical-align: baseline; background-color:
transparent; color: rgb(74, 107, 130); text-decoration: none;
cursor: pointer; background-position: initial initial;
background-repeat: initial initial;">http://llvm.org/svn/llvm-project/cfe/tags/RELEASE_32/final/examples/clang-interpreter/main.cpp</a><span
class="Apple-converted-space"> </span>as you can see it's from
clang version 3.2.</p>
<p style="margin: 0px 0px 1em; padding: 0px; border: 0px; font-size:
14px; vertical-align: baseline; background-color: rgb(255, 255,
255); clear: both; color: rgb(0, 0, 0); font-family: Arial,
'Liberation Sans', 'DejaVu Sans', sans-serif; font-style: normal;
font-variant: normal; font-weight: normal; letter-spacing: normal;
line-height: 17.804800033569336px; orphans: auto; text-align:
left; text-indent: 0px; text-transform: none; white-space: normal;
widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;
background-position: initial initial; background-repeat: initial
initial;">When I compiled it with the command:</p>
<pre class="lang-cpp prettyprint prettyprinted" style="margin: 0px 0px 10px; padding: 5px; border: 0px; font-size: 14px; vertical-align: baseline; background-color: rgb(238, 238, 238); font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; overflow: auto; width: auto; max-height: 600px; word-wrap: normal; color: rgb(0, 0, 0); font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 17.804800033569336px; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-position: initial initial; background-repeat: initial initial;"><code style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; background-color: rgb(238, 238, 238); font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans!
Mono', 'B
itstream Vera Sans Mono', 'Courier New', monospace, serif; background-position: initial initial; background-repeat: initial initial;"><span class="pln" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial;">$</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial;">></span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial;"> clang</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; background!
-color: tr
ansparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial;">++</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial;"> </span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial;">`</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial;">llvm</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; background-color: transparent; co!
lor: rgb(0
, 0, 0); background-position: initial initial; background-repeat: initial initial;">-</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial;">config </span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial;">--</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial;">cflags</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; background-color: transparent; color: rgb(0, 0, !
0); backgr
ound-position: initial initial; background-repeat: initial initial;">`</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial;"> </span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial;">-</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial;">c main</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; background-color: transparent; color: rgb(0, 0, 0); background-positio!
n: initial
initial; background-repeat: initial initial;">.</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial;">cpp</span></code></pre>
<p style="margin: 0px 0px 1em; padding: 0px; border: 0px; font-size:
14px; vertical-align: baseline; background-color: rgb(255, 255,
255); clear: both; color: rgb(0, 0, 0); font-family: Arial,
'Liberation Sans', 'DejaVu Sans', sans-serif; font-style: normal;
font-variant: normal; font-weight: normal; letter-spacing: normal;
line-height: 17.804800033569336px; orphans: auto; text-align:
left; text-indent: 0px; text-transform: none; white-space: normal;
widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;
background-position: initial initial; background-repeat: initial
initial;">I got the file main.o which contains some undefined
symbols to clang/llvm libraries. I made sure it contains the
symbols by using the nm command:</p>
<pre class="lang-cpp prettyprint prettyprinted" style="margin: 0px 0px 10px; padding: 5px; border: 0px; font-size: 14px; vertical-align: baseline; background-color: rgb(238, 238, 238); font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; overflow: auto; width: auto; max-height: 600px; word-wrap: normal; color: rgb(0, 0, 0); font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 17.804800033569336px; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-position: initial initial; background-repeat: initial initial;"><code style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; background-color: rgb(238, 238, 238); font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans!
Mono', 'B
itstream Vera Sans Mono', 'Courier New', monospace, serif; background-position: initial initial; background-repeat: initial initial;"><span class="pln" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial;">$</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial;">></span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial;"> nm main</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; backgrou!
nd-color:
transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial;">.</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial;">o</span></code></pre>
<p style="margin: 0px 0px 1em; padding: 0px; border: 0px; font-size:
14px; vertical-align: baseline; background-color: rgb(255, 255,
255); clear: both; color: rgb(0, 0, 0); font-family: Arial,
'Liberation Sans', 'DejaVu Sans', sans-serif; font-style: normal;
font-variant: normal; font-weight: normal; letter-spacing: normal;
line-height: 17.804800033569336px; orphans: auto; text-align:
left; text-indent: 0px; text-transform: none; white-space: normal;
widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;
background-position: initial initial; background-repeat: initial
initial;">A symbol from clang would be</p>
<pre class="lang-cpp prettyprint prettyprinted" style="margin: 0px 0px 10px; padding: 5px; border: 0px; font-size: 14px; vertical-align: baseline; background-color: rgb(238, 238, 238); font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; overflow: auto; width: auto; max-height: 600px; word-wrap: normal; color: rgb(0, 0, 0); font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 17.804800033569336px; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-position: initial initial; background-repeat: initial initial;"><code style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; background-color: rgb(238, 238, 238); font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans!
Mono', 'B
itstream Vera Sans Mono', 'Courier New', monospace, serif; background-position: initial initial; background-repeat: initial initial;"><span class="pln" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial;">_ZN5clang16CompilerInstanceC1Ev</span></code></pre>
<p style="margin: 0px 0px 1em; padding: 0px; border: 0px; font-size:
14px; vertical-align: baseline; background-color: rgb(255, 255,
255); clear: both; color: rgb(0, 0, 0); font-family: Arial,
'Liberation Sans', 'DejaVu Sans', sans-serif; font-style: normal;
font-variant: normal; font-weight: normal; letter-spacing: normal;
line-height: 17.804800033569336px; orphans: auto; text-align:
left; text-indent: 0px; text-transform: none; white-space: normal;
widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;
background-position: initial initial; background-repeat: initial
initial;">Until now everything worked fine, until I tried to link
the 'main.o' file with clang/llvm libraries. When I issue the
command:</p>
<pre class="lang-cpp prettyprint prettyprinted" style="margin: 0px 0px 10px; padding: 5px; border: 0px; font-size: 14px; vertical-align: baseline; background-color: rgb(238, 238, 238); font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; overflow: auto; width: auto; max-height: 600px; word-wrap: normal; color: rgb(0, 0, 0); font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 17.804800033569336px; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-position: initial initial; background-repeat: initial initial;"><code style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; background-color: rgb(238, 238, 238); font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans!
Mono', 'B
itstream Vera Sans Mono', 'Courier New', monospace, serif; background-position: initial initial; background-repeat: initial initial;"><span class="pln" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial;">$</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial;">></span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial;"> clang</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; background!
-color: tr
ansparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial;">++</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial;"> </span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial;">`</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial;">llvm</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; background-color: transparent; co!
lor: rgb(0
, 0, 0); background-position: initial initial; background-repeat: initial initial;">-</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial;">config </span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial;">--</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial;">ldflags</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; background-color: transparent; color: rgb(0, 0,!
0); backg
round-position: initial initial; background-repeat: initial initial;">`</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial;"> main</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial;">.</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial;">o </span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; background-color: transparent; color: rgb(0, 0, 0); background-positi!
on: initia
l initial; background-repeat: initial initial;">`</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial;">llvm</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial;">-</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial;">config </span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initia!
l; backgro
und-repeat: initial initial;">--</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial;">libs</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial;">`</span></code></pre>
<p style="margin: 0px 0px 1em; padding: 0px; border: 0px; font-size:
14px; vertical-align: baseline; background-color: rgb(255, 255,
255); clear: both; color: rgb(0, 0, 0); font-family: Arial,
'Liberation Sans', 'DejaVu Sans', sans-serif; font-style: normal;
font-variant: normal; font-weight: normal; letter-spacing: normal;
line-height: 17.804800033569336px; orphans: auto; text-align:
left; text-indent: 0px; text-transform: none; white-space: normal;
widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;
background-position: initial initial; background-repeat: initial
initial;">It fails with the following output (I just put the first
error to not clutter this post):</p>
<pre class="lang-cpp prettyprint prettyprinted" style="margin: 0px 0px 10px; padding: 5px; border: 0px; font-size: 14px; vertical-align: baseline; background-color: rgb(238, 238, 238); font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; overflow: auto; width: auto; max-height: 600px; word-wrap: normal; color: rgb(0, 0, 0); font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 17.804800033569336px; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-position: initial initial; background-repeat: initial initial;"><code style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; background-color: rgb(238, 238, 238); font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans!
Mono', 'B
itstream Vera Sans Mono', 'Courier New', monospace, serif; background-position: initial initial; background-repeat: initial initial;"><span class="pln" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial;">main</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial;">.</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial;">o</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; background-colo!
r: transpa
rent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial;">:</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial;"> </span><span class="typ" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; background-color: transparent; color: rgb(43, 145, 175); background-position: initial initial; background-repeat: initial initial;">In</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial;"> function </span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; background-color: transpare!
nt; color:
rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial;">`</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial;">main</span><span class="str" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; background-color: transparent; color: rgb(128, 0, 0); background-position: initial initial; background-repeat: initial initial;">':</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial;">
main</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial;">.</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial;">cpp</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial;">:</span><span class="lit" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; background-color: transparent; color: rgb(128, 0, 0); background-position: initial initial; background-repeat: initial initial;">74</span><!
span class
="pun" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial;">:</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial;"> undefined reference to </span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial;">`</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial;">clang</span><!
span class
="pun" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial;">::</span><span class="typ" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; background-color: transparent; color: rgb(43, 145, 175); background-position: initial initial; background-repeat: initial initial;">TextDiagnosticPrinter</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial;">::</span><span class="typ" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; background-color: transparent; color: rgb(43, 145, 175); background-position: initial initial; background-repeat: initial initial;">Text!
Diagnostic
Printer</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial;">(</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial;">llvm</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial;">::</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial;">raw_ost!
ream</span
><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial;">&,</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial;"> clang</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial;">::</span><span class="typ" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; background-color: transparent; color: rgb(43, 145, 175); background-position: initial initial; background-repeat: initial initial;">Diagnost!
icOptions<
/span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial;">*,</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial;"> </span><span class="kwd" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; background-color: transparent; color: rgb(0, 0, 139); background-position: initial initial; background-repeat: initial initial;">bool</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial;">)</span><span!
class="st
r" style="margin: 0px; padding: 0px; border: 0px; font-size: 14px; vertical-align: baseline; background-color: transparent; color: rgb(128, 0, 0); background-position: initial initial; background-repeat: initial initial;">'</span></code></pre>
<p style="margin: 0px 0px 1em; padding: 0px; border: 0px; font-size:
14px; vertical-align: baseline; background-color: rgb(255, 255,
255); clear: both; color: rgb(0, 0, 0); font-family: Arial,
'Liberation Sans', 'DejaVu Sans', sans-serif; font-style: normal;
font-variant: normal; font-weight: normal; letter-spacing: normal;
line-height: 17.804800033569336px; orphans: auto; text-align:
left; text-indent: 0px; text-transform: none; white-space: normal;
widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;
background-position: initial initial; background-repeat: initial
initial;">Basically I get a whole bunch of undefined references to
clang libraries. I've tried researching on this and all I've found
is that this has to do with the order you put the libraries flags
on the command line. In addition to this, I also tried some other
things:</p>
<ol style="margin: 0px 0px 1em 30px; padding: 0px; border: 0px;
font-size: 14px; vertical-align: baseline; background-color:
rgb(255, 255, 255); list-style: decimal; color: rgb(0, 0, 0);
font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif;
font-style: normal; font-variant: normal; font-weight: normal;
letter-spacing: normal; line-height: 17.804800033569336px;
orphans: auto; text-align: left; text-indent: 0px; text-transform:
none; white-space: normal; widows: auto; word-spacing: 0px;
-webkit-text-stroke-width: 0px; background-position: initial
initial; background-repeat: initial initial;">
<li style="margin: 0px; padding: 0px; border: 0px; font-size:
14px; vertical-align: baseline; background-color: transparent;
background-position: initial initial; background-repeat: initial
initial;">I tried a bunch of compiler flags, changing the order
in which the linker flags appear, they never worked.</li>
<li style="margin: 0px; padding: 0px; border: 0px; font-size:
14px; vertical-align: baseline; background-color: transparent;
background-position: initial initial; background-repeat: initial
initial;">I downloaded and compiled the LLVM and clang source
code version 3.2, and 3.4, same result: compiling works, linking
fails. It's worth mentioning to say that for each version
reordering the linker flags always gave different link errors
(this is of course due to the way the link searches for
libraries).</li>
</ol>
<p style="margin: 0px 0px 1em; padding: 0px; border: 0px; font-size:
14px; vertical-align: baseline; background-color: rgb(255, 255,
255); clear: both; color: rgb(0, 0, 0); font-family: Arial,
'Liberation Sans', 'DejaVu Sans', sans-serif; font-style: normal;
font-variant: normal; font-weight: normal; letter-spacing: normal;
line-height: 17.804800033569336px; orphans: auto; text-align:
left; text-indent: 0px; text-transform: none; white-space: normal;
widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;
background-position: initial initial; background-repeat: initial
initial;">I ran out of ideas, and already spent 2 hours trying to
compile a simple example from clang's repository, any help would
be appreciated.</p>
<p style="margin: 0px 0px 1em; padding: 0px; border: 0px; font-size:
14px; vertical-align: baseline; background-color: rgb(255, 255,
255); clear: both; color: rgb(0, 0, 0); font-family: Arial,
'Liberation Sans', 'DejaVu Sans', sans-serif; font-style: normal;
font-variant: normal; font-weight: normal; letter-spacing: normal;
line-height: 17.804800033569336px; orphans: auto; text-align:
left; text-indent: 0px; text-transform: none; white-space: normal;
widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;
background-position: initial initial; background-repeat: initial
initial;">Thank you</p>
<br>
</body>
</html>