<html 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" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:굴림;
panose-1:2 11 6 0 0 1 1 1 1 1;}
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:"맑은 고딕";
panose-1:2 11 5 3 2 0 0 2 0 4;}
@font-face
{font-family:"\@굴림";
panose-1:2 11 6 0 0 1 1 1 1 1;}
@font-face
{font-family:"\@맑은 고딕";
panose-1:2 11 5 3 2 0 0 2 0 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:굴림;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
p
{mso-style-priority:99;
mso-margin-top-alt:auto;
margin-right:0cm;
mso-margin-bottom-alt:auto;
margin-left:0cm;
font-size:12.0pt;
font-family:굴림;}
span.EmailStyle18
{mso-style-type:personal-reply;
font-family:"맑은 고딕";
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"맑은 고딕";}
@page WordSection1
{size:612.0pt 792.0pt;
margin:3.0cm 72.0pt 72.0pt 72.0pt;}
div.WordSection1
{page:WordSection1;}
--></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="KO" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal" style="word-break:break-hangul"><span lang="EN-US" style="font-size:10.0pt;font-family:"맑은 고딕";color:#1F497D">Thanks, Joel,<o:p></o:p></span></p>
<p class="MsoNormal" style="word-break:break-hangul"><span lang="EN-US" style="font-size:10.0pt;font-family:"맑은 고딕";color:#1F497D">I added the ‘-lm’ option using XCFLAGS variable (which should be extra compile flags).<o:p></o:p></span></p>
<p class="MsoNormal" style="word-break:break-hangul"><span lang="EN-US" style="font-size:10.0pt;font-family:"맑은 고딕";color:#1F497D">So the ‘-lm’ option was given to the compile command (-c) only and was not being given to the link command. So I added –lm option
at the end of COBJS list in my Makefile.base (which my Makefile includes).<o:p></o:p></span></p>
<p class="MsoNormal" style="word-break:break-hangul"><span lang="EN-US" style="font-size:10.0pt;font-family:"맑은 고딕";color:#1F497D">I tried using XLDCONFIGS but it didn’t’ work I don’t know why.<o:p></o:p></span></p>
<p class="MsoNormal" style="word-break:break-hangul"><span lang="EN-US" style="font-size:10.0pt;font-family:"맑은 고딕";color:#1F497D">Thanks!<o:p></o:p></span></p>
<p class="MsoNormal" style="word-break:break-hangul"><span lang="EN-US" style="font-size:10.0pt;font-family:"맑은 고딕";color:#1F497D">Chan
<o:p></o:p></span></p>
<p class="MsoNormal" style="word-break:break-hangul"><span lang="EN-US" style="font-size:10.0pt;font-family:"맑은 고딕";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif">From:</span></b><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif"> Joel Sherrill [mailto:joel@rtems.org]
<br>
<b>Sent:</b> Saturday, November 12, 2016 11:37 PM<br>
<b>To:</b> </span><span style="font-size:11.0pt">김찬</span><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif"> <ckim@etri.re.kr><br>
<b>Cc:</b> rtems-users@rtems.org <users@rtems.org><br>
<b>Subject:</b> Re: how to use powf or ceilingf function in rtems..<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p><span lang="EN-US">On Nov 12, 2016 4:44 AM, "</span>김찬<span lang="EN-US">" <<a href="mailto:ckim@etri.re.kr">ckim@etri.re.kr</a>> wrote:<br>
><br>
> Hello,<br>
><br>
> I’m trying to make an rtems application which uses some math function.<br>
><br>
> I put #include <math.h>. When the powf function is in the Init() function, it works,<br>
><br>
> But when powf is called from another function(I want to call this function from Init..), I get ‘undefined reference to powf’ error.<br>
><br>
> I tried merning the files into one but it is the same. What can be the problem?<o:p></o:p></span></p>
<p><span lang="EN-US">You should only have to include math.h and link against libm. There should be nothing odd.<o:p></o:p></span></p>
<p><span lang="EN-US">My first guess is that the -lm argument is before the other .o on the link command.<o:p></o:p></span></p>
<p><span lang="EN-US">Check that and if that isn't it, can you produce an example?<o:p></o:p></span></p>
<p><span lang="EN-US">> Thanks!<br>
><br>
> Chan Kim<br>
><br>
> <br>
><br>
> </span>김 찬<span lang="EN-US"> (Chan Kim)<br>
><br>
> </span>책임연구원<span lang="EN-US">, </span>프로세서연구실<span lang="EN-US">, </span>지능형반도체연구부<span lang="EN-US"><br>
><br>
> </span>한국전자통신연구원<span lang="EN-US"><br>
><br>
> O) 042-860-5773 C) 010-3418-9152 E) <a href="mailto:ckim@etri.re.kr">ckim@etri.re.kr</a><br>
><br>
> <br>
><br>
><br>
> _______________________________________________<br>
> users mailing list<br>
> <a href="mailto:users@rtems.org">users@rtems.org</a><br>
> <a href="http://lists.rtems.org/mailman/listinfo/users">http://lists.rtems.org/mailman/listinfo/users</a><o:p></o:p></span></p>
</div>
</body>
</html>