Re : mktime not includet other ways?
by lexbguard-usenet » Fri, 04 Feb 2005 23:06:03 GMT
Hello JC,
I think you mean time.h ?
Had the same problem over here today. I included a large
portion of native C which came from a linux system
which uses mktime. I could include the time.h file and
get the proto types but I couldn't use the mktime function
in my native C parts (also not in the C++ parts of the project).
It can be fixed by creating a file e.g. ce_conv.cpp
containing :
/* BEGIN CODE */
/*
** standard C functions (wrapped Windows CE C++ code)
*/
#include <Afx.h> // needed for CTime and WCE_FCTN
#include <time.h> // needed for time_t
extern "C" time_t mktime(struct tm *tm);
time_t mktime(struct tm *tm)
{
return WCE_FCTN(mktime)(tm) ;
}
/* END CODE */
Just include time.h into the C source file where you need the
mktime function.
In the C++ source file where you need the mktime
just add the above extern "C" time_t mktime.... declaration.
This trick also works with other stdlibC functions.
Similar Threads:
1.mktime not includet other ways?
hi guys,
i try to convert a tm struct with date time to secounds since 1.1.1970.
normaly it works with the mktime function in the timer.h but in eVC it
seems that this funktion is not includet.
do anybody knows an other way to convert the tm struct in secounds?
with best regards,
jc
2.How to use mktime?
Hello
I would like to use the function mktime. I have found the declaration in
time.h but I get an linker error while building. Which library do I need?
Regards Peter
3.strftime & mktime
Deal All,
How do I build the procjet that uses strftime & mktime?
That library I must include?
Thanks
Miky
4.mktime linker error?
I've create a DLL (not using MFC)
In the DLL, I make a call to the "mktime" and "time" run-time-library functions
The source compiles fine, as they are both declared in the time.h header file
But the linker keeps telling me they are undefined. I do understand that the linker can't find them
but I don't know why that should be the case
Why should these common functions be missing from the runtime library
I can't find any information anywhere about this problem
What am I missing. Please help
Thanks
-- Sanjay
5.Media Sharing not working both ways.
Hi I have two Win XP Pro machines whoes media is shared and One Vista
ulitmate machine whose media is also shared.
the problem is that although Vista machien can access media of both the XP
machines but none of the XP machienes can access media of other XP machine or
Vista machine.
Any idea how to make WMP in XP access media of other XP machine?
All three machines are on same network and they all are running WMP11.
Will be thankful for your replies.
6. DFS / FRS Not replicating two ways
7. Windows Messenger 4.7 voice not working BOTH ways
8. FAQ - Including not 1 but 2 ways of killing popups :-)