<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.arm.com/utility/feedstylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Weird error with mktime..</title><link>https://community.arm.com/developer/tools-software/tools/f/keil-forum/24847/weird-error-with-mktime</link><description> 
Hi, 

 
I&amp;#39;m using uVision 3,23 with CA.exe (compiler) V2.41 and LA.exe
(linker) 2.41. The program compiles, but with the linking run, I get
errors; 

 
*** WARNING L23: UNRESOLVED EXTERNAL SYMBOLS 
*** ERROR L128: REFERENCE MADE TO UNRESOLVED EXTERNAL</description><dc:language>en-US</dc:language><generator>Telligent Community 10</generator><item><title>RE: Weird error with mktime..</title><link>https://community.arm.com/thread/139065?ContentTypeID=1</link><pubDate>Thu, 26 Feb 2009 00:42:19 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:8cc653f6-0bf3-4bda-8c71-a3da08553689</guid><dc:creator>John Linq</dc:creator><description>&lt;p&gt;&lt;p&gt;
I don&amp;#39;t know much about this. But according to your post, you told
us that: &amp;quot;I&amp;#39;m using uVision 3,23 with CA.exe (compiler) V2.41 and
LA.exe (linker) 2.41.&amp;quot;&lt;/p&gt;

&lt;p&gt;
I think what you use is this:&lt;/p&gt;

&lt;pre&gt;
&lt;a href="http://www.keil.com/support/man/docs/ca/ca_library.htm"&gt;http://www.keil.com/support/man/docs/ca/ca_library.htm&lt;/a&gt;
&lt;/pre&gt;

&lt;p&gt;
There are no &amp;quot;time.h&amp;quot; and &amp;quot;mktime()&amp;quot; in CA.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Weird error with mktime..</title><link>https://community.arm.com/thread/135690?ContentTypeID=1</link><pubDate>Thu, 26 Feb 2009 00:16:16 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:c8efd99f-437c-4a87-b389-dee4b652262e</guid><dc:creator>Jay Kay</dc:creator><description>&lt;p&gt;&lt;p&gt;
Per Westermark,&lt;/p&gt;

&lt;p&gt;
I&amp;#39;ve tried almost every time.h header file I could find.. But..
Still no luck. Yesterday you said that you use mktime() ok, with no
extra work. Can you please send me your time.h or/and your
implementation of it.. Because I cannot get it work, and it looks
like I need using mktime.. :S.&lt;/p&gt;

&lt;p&gt;
Thank you very very much.&lt;/p&gt;

&lt;p&gt;
Jay.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Weird error with mktime..</title><link>https://community.arm.com/thread/142224?ContentTypeID=1</link><pubDate>Wed, 25 Feb 2009 22:44:29 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:fd6b3559-5e94-4677-a318-e504bb0dba3d</guid><dc:creator>John Linq</dc:creator><description>&lt;p&gt;&lt;p&gt;
Hi,&lt;/p&gt;

&lt;p&gt;
I am trying to use the RTC of LPC2378 and the RTX kernel of
KEIL.&lt;/p&gt;

&lt;p&gt;
After reading this thread, I started to study the mktime() and
localtime().&lt;/p&gt;

&lt;p&gt;
The return value of localtime() looks strange to me. After some
further study, I found another function, localtime_r(), &amp;quot;which is
thread-safe and returns values in a user-supplied buffer instead of
possibly using a static data area that may be overwritten by each
call.&amp;quot;&lt;/p&gt;

&lt;p&gt;
To define/reduce the Task stack size of RTX is difficult to
someone like me. My question is: if I use&lt;br /&gt;
localtime() in one Task, does it need larger Task stack size?&lt;/p&gt;

&lt;p&gt;
It seems that snprintf() needs a larger Task stack size. If this
is true, then why? does snprintf() also use a static data area?&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Weird error with mktime..</title><link>https://community.arm.com/thread/139060?ContentTypeID=1</link><pubDate>Wed, 25 Feb 2009 07:32:50 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:f28888e0-b864-4fe1-b676-1c4beb2f05ea</guid><dc:creator>ImPer Westermark</dc:creator><description>&lt;p&gt;&lt;p&gt;
Here is something to think about.&lt;/p&gt;

&lt;p&gt;
If you have written partial support yourself, you may have used a
symbol name that is clashing with a symbol name of one of the object
files in the library, this blocking the linker from linking in the
object file that contains mktime().&lt;/p&gt;

&lt;p&gt;
I was in a hurry myself, so I never had the time to read how to
get time() to work. I just created my own 1s interrupt for internal
timing and when I need time, I use mktime() on this 1s variable. On
startup, the initial value is loaded from the RTC.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Weird error with mktime..</title><link>https://community.arm.com/thread/135691?ContentTypeID=1</link><pubDate>Wed, 25 Feb 2009 07:26:12 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:11b4b2e4-81ef-40b2-aa8f-6c9ee82a51a1</guid><dc:creator>Jay Kay</dc:creator><description>&lt;p&gt;&lt;p&gt;
Hm.&lt;/p&gt;

&lt;p&gt;
First; here&amp;#39;s my story.. I wanted to use the rtc, and I didn&amp;#39;t
know how to use it, so I&amp;#39;ve searched for a C-example. I&amp;#39;ve found one
and implemented it in my own code. Then I realised I needed time.h,
which Keil didn&amp;#39;t provide with uVision. I found one on the ST-forum,
which is in ANSI-c and ARM-limited. And when I use it, I get no
errors, no warnings, just an error with the linking stage....&lt;/p&gt;

&lt;p&gt;
I program in ANSII-C, I&amp;#39;ve checked, re-checked and double-checked
all function names, variables arguments, structs, pointers,
everything, I&amp;#39;m not using microlib and.. The linking-problem with
mktime drives me crazy.. :S&lt;/p&gt;

&lt;p&gt;
Thnx.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Weird error with mktime..</title><link>https://community.arm.com/thread/125266?ContentTypeID=1</link><pubDate>Wed, 25 Feb 2009 06:30:50 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:709443d8-67bc-4f1b-8b90-47451caeec1e</guid><dc:creator>ImPer Westermark</dc:creator><description>&lt;p&gt;&lt;p&gt;
Yes, I am using mktime() ok with the full library. I did not have
to do anything extra to get it to work.&lt;/p&gt;

&lt;p&gt;
And it is the full library that says that mktime() and localtime()
can be used immediately, but that functions like time() require you
to implement code to interface with the RTC of your specific
hardware.&lt;/p&gt;

&lt;p&gt;
But before writing my previous post, I did look in the library
manual but failed to find out if mktime() is or isn&amp;#39;t available in
the microlib or if the text &amp;quot;mktime() can be used immediately&amp;quot; is
only applicable for the full library. That was the reason I asked if
you used the microlib.&lt;/p&gt;

&lt;p&gt;
One other thing: Are you compiling C or C++? Might you have a
problem where the linker looks for a name-mangled variant of
mktime()? C header files should contain extern &amp;quot;C&amp;quot; { ... } to make
sure that the compiler uses the C naming convention and not the C++
naming convention for the external references.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Weird error with mktime..</title><link>https://community.arm.com/thread/114710?ContentTypeID=1</link><pubDate>Wed, 25 Feb 2009 06:12:05 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:75eb8458-9a8d-4d50-90ec-82058712b813</guid><dc:creator>Jay Kay</dc:creator><description>&lt;p&gt;&lt;p&gt;
First of all; thnx for your help!&lt;/p&gt;

&lt;p&gt;
second; I guess (I&amp;#39;m pretty sure) I don&amp;#39;t use microlib.. And..
this page (from the keil-site) says that &amp;quot;mktime() can be used
immediately&amp;quot;: &lt;a href="http://www.keil.com/support/man/docs/armlib/armlib_chdfdcai.htm"&gt;http://www.keil.com/support/man/docs/armlib/armlib_chdfdcai.htm&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;
And.. I&amp;#39;m searching for two days or something, and nothing on the
keil-site or other sites says that I cannot use mktime().&lt;/p&gt;

&lt;p&gt;
The code I use is from an example from ST, an application note for
the RTC in the ST71x.. So.. I suppose it should work...&lt;/p&gt;

&lt;p&gt;
Thnx for your time!!&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Weird error with mktime..</title><link>https://community.arm.com/thread/102979?ContentTypeID=1</link><pubDate>Wed, 25 Feb 2009 05:57:48 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:59920142-3d1f-4ac5-94ce-2129ce46a36b</guid><dc:creator>Andy Neil</dc:creator><description>&lt;p&gt;&lt;p&gt;
True, but you&amp;#39;re using an &lt;i&gt;&lt;b&gt;embedded&lt;/b&gt;&lt;/i&gt; toolset - and
these often omit some of the standard functions.&lt;/p&gt;

&lt;p&gt;
Have you specifically checked that mktime isn&amp;#39;t on the &amp;quot;not
implemented&amp;quot; list - especially, as already noted, if you&amp;#39;re using the
microlib...?&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Weird error with mktime..</title><link>https://community.arm.com/thread/77200?ContentTypeID=1</link><pubDate>Wed, 25 Feb 2009 05:34:36 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:82431147-3ff4-4076-94c6-d8bc5f81eff1</guid><dc:creator>Jay Kay</dc:creator><description>&lt;p&gt;&lt;p&gt;
But.. But..&lt;/p&gt;

&lt;p&gt;
mktime() is a ANSI-standard-function, right? The compiler should
get it and translate it for me.. right? :S&lt;/p&gt;

&lt;p&gt;
Thanks for the replies anyway...&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Weird error with mktime..</title><link>https://community.arm.com/thread/55491?ContentTypeID=1</link><pubDate>Wed, 25 Feb 2009 02:09:32 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:4337f8b2-7a9d-4df6-a0e4-ed3eda8286b4</guid><dc:creator>ImPer Westermark</dc:creator><description>&lt;p&gt;&lt;p&gt;
Are you using microlib? Are you sure that mktime() is available in
the microlib?&lt;/p&gt;

&lt;p&gt;
The header file just tells the function prototype. The linker
error on the other hand says that you have not supplied any
implementation of a function named mktime() - either because a
library isn&amp;#39;t linked, or the library doesn&amp;#39;t contain any such
function.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Weird error with mktime..</title><link>https://community.arm.com/thread/55492?ContentTypeID=1</link><pubDate>Wed, 25 Feb 2009 02:03:56 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:b637a757-8c03-4119-9f3d-f29b2c037c9f</guid><dc:creator>Andy Neil</dc:creator><description>&lt;p&gt;&lt;p&gt;
The header file just tells the &lt;i&gt;compiler&lt;/i&gt; that a function
matching the prototype will be provided by some external means.&lt;/p&gt;

&lt;p&gt;
It&amp;#39;s up to you to ensure that you make good on that promise by
providing the actual function itself to the &lt;i&gt;Linker&lt;/i&gt; - either
from another source file, or from a &lt;b&gt;Library&lt;/b&gt;...&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>