<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML xmlns="http://www.w3.org/TR/REC-html40" xmlns:v =
"urn:schemas-microsoft-com:vml" xmlns:o =
"urn:schemas-microsoft-com:office:office" xmlns:w =
"urn:schemas-microsoft-com:office:word" xmlns:m =
"http://schemas.microsoft.com/office/2004/12/omml"><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.6000.16640" name=GENERATOR>
<STYLE>@font-face {
font-family: Cambria Math;
}
@font-face {
font-family: Calibri;
}
@page Section1 {size: 612.0pt 792.0pt; margin: 72.0pt 72.0pt 72.0pt 72.0pt; }
P.MsoNormal {
FONT-SIZE: 11pt; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Calibri","sans-serif"
}
LI.MsoNormal {
FONT-SIZE: 11pt; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Calibri","sans-serif"
}
DIV.MsoNormal {
FONT-SIZE: 11pt; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Calibri","sans-serif"
}
A:link {
COLOR: blue; TEXT-DECORATION: underline; mso-style-priority: 99
}
SPAN.MsoHyperlink {
COLOR: blue; TEXT-DECORATION: underline; mso-style-priority: 99
}
A:visited {
COLOR: purple; TEXT-DECORATION: underline; mso-style-priority: 99
}
SPAN.MsoHyperlinkFollowed {
COLOR: purple; TEXT-DECORATION: underline; mso-style-priority: 99
}
SPAN.EmailStyle17 {
COLOR: windowtext; FONT-FAMILY: "Calibri","sans-serif"; mso-style-type: personal-compose
}
.MsoChpDefault {
mso-style-type: export-only
}
DIV.Section1 {
page: Section1
}
</STYLE>
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></HEAD>
<BODY lang=EN-US vLink=purple link=blue>
<DIV dir=ltr align=left><SPAN class=602431510-28052008><FONT face=Arial
size=2>Nicolas,</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=602431510-28052008><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=602431510-28052008><FONT face=Arial
size=2>In Visual Studio 2005, you can force the linker to include specific
symbols. In your project, under "Configuration Properties/Linker/Input/Force
Symbol References", try adding <FONT face="Courier New"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">_X86TargetMachineModule<FONT
face=Arial>.</FONT></SPAN></FONT></FONT></SPAN></DIV>
<DIV><FONT face=Arial color=#0000ff></FONT> </DIV>
<DIV><SPAN class=602431510-28052008></SPAN><FONT face=Arial><FONT size=2><SPAN
class=602431510-28052008>Hope that helps!</SPAN></FONT></FONT></DIV>
<DIV><FONT face=Arial><FONT size=2><SPAN
class=602431510-28052008></SPAN></FONT></FONT> </DIV>
<DIV><FONT face=Arial><FONT size=2><SPAN class=602431510-28052008></SPAN>S<SPAN
class=602431510-28052008>tein Pedersen</SPAN><BR></DIV></FONT></FONT>
<BLOCKQUOTE dir=ltr
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px solid; MARGIN-RIGHT: 0px">
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> llvmdev-bounces@cs.uiuc.edu
[mailto:llvmdev-bounces@cs.uiuc.edu] <B>On Behalf Of </B>Nicolas
Capens<BR><B>Sent:</B> 27. mai 2008 00:11<BR><B>To:</B> 'LLVM Developers
Mailing List'<BR><B>Subject:</B> [LLVMdev] X86TargetMachineModule not
helping<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV class=Section1>
<P class=MsoNormal>Hi all,<o:p></o:p></P>
<P class=MsoNormal><o:p> </o:p></P>
<P class=MsoNormal>After creating a new LLVM-based project, I faced an odd
problem. <SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">ExecutionEngine::create
</SPAN>always retuned null. After some investigation I found out that it was
due to the target architecture not getting registered. I’m using Visual C++
2005 and in the X86TargetMachine.cpp file an extern variable <SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">X86TargetMachineModule
</SPAN>is created to ‘ensure’ that the module is linked in. It works for the
example projects, but not for the one I created. When I write a value to <SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">X86TargetMachineModule</SPAN>
in another module, all is fine and dandy…<o:p></o:p></P>
<P class=MsoNormal><o:p> </o:p></P>
<P class=MsoNormal>Although it’s a viable workaround for now I was wondering
if anyone knew a more elegant solution, or has an explanation why <SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">X86TargetMachineModule
</SPAN>works for the example projects but not for mine.<o:p></o:p></P>
<P class=MsoNormal><o:p> </o:p></P>
<P class=MsoNormal>Thanks,<o:p></o:p></P>
<P class=MsoNormal><o:p> </o:p></P>
<P class=MsoNormal>Nicolas
Capens<o:p></o:p></P></DIV></BLOCKQUOTE></BODY></HTML>