Re: [Dev-C++] Thanks and Another question (windows/linux)
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: <or...@vp...> - 2003-08-02 19:32:40
|
Pukara Rob wrote: > Thank you for helping me. > Yes actualy the file contains the following: > > > #ifdef linux > #include <stdio.h> > #endif > > which I guess means the include is done only for linux but since I wortk > for windows... > I wonder why the designers of that system put that line. Any idea...? I dunno. What exactly is this library, that you are working with? > ---------------------------------------------------------------------------------------------------------------- > Another question. In another file called arutils.h I got > > #ifdef WIN32 > #include <sys/timeb.h> > #endif > #ifdef linux > #include <sys/time.h> > #include <unistd.h> > #endif > > and as a result I got an error message saying that: > > C:\\PROGRA~1\\ACTIVM~1\\ARIA\\include\\ariaUtil.h:558: `time_t' was not > declared in this scope > Can someone tell me about these library details diferences in windows > and linux??? Yes, as you see, it tells you, that time_t is not declared. Which means, that (assuming you have -DWIN32 on command line) sys/timeb.h is not going to be good for you. I suppose, that they used MSVC for the library's Windows port, and probably sys/timeb.h worked well for them. It is only my guess though. Anyway, if you look at <sys/time.h>, you'll notice, that it actually includes <time.h>, which has time_t. So what you need is: <sys/time.h> I guess you already noticed all the above, as you asked about the difference details. I cannot tell you that, as I have never worked with time stuff under linux. Maybe a linux guru here can tell you more. I hope this helps. -- Greetings, Balázs |