Re: stati64() Problem lcc-win32
- From: "Rainer Bröring" <R.Broering@xxxxxxxxx>
- Date: Sun, 4 Mar 2007 19:27:01 +0100
"Keith Thompson" <kst-u@xxxxxxx> schrieb im Newsbeitrag
news:lnodng4vtr.fsf@xxxxxxxxxxxxxxxxxx
"Bart" <bc@xxxxxxxxxx> writes:
The following program fails to link due to not finding __stati64():
#include < stdio.h>
Drop the space after the '<'. For some compilers, this will try (and
fail) to read a header called " stdio.h".
#include "c:\lcc\include\sys\types.h"
#include "c:\lcc\include\sys\stat.h"
I don't know how lcc-win32 interprets header names, but you might need
to double the '\' characters. In an ordinary string literal, "\t" is
a tab character; the rules *might* be different for #include
directives.
You might also be better off using the compiler's search path for
headers rather than specifying full path names. It probably searches
in C:\lcc\include automatically (a path that may vary depending on how
the compiler is installed).
Try changing the above lines to:
#include "sys\\types.h"
#include "sys\\stat.h"
or perhaps
#include <sys\\stat.h>
#include <sys\\types.h>
A little advice
To prevent the problems with backslash and for compatibilityreasons (UNIX) I
only use the
slash in include-directives. Windows (and DOS) is able to recognize this
character as Pathdelimiter too,
so there is no confusion about the special meaning for the backslash.
#include "sys/types.h"
#include "sys/stat.h"
R. Bröring
void main()
main returns int, not void, though some compilers may allow
alternative declarations. Change the above to:
int main(void)
{
_stati64(0,0);
}
The compiler is from March 2006, which on another machine worked once.
All variations stati64, _stati64 and __stati64 were tried. The file
msvcrt.lib seems to contain "_stati64" and/or "__stati64".
Any ideas?
Do you need to specify an option to the linker to tell it where to
find the library that contains the function you're calling?
I'm addressing C issues here; I'm not very familar with lcc-win32.
Have you checked the lcc-win32 documentation?
--
Keith Thompson (The_Other_Keith) kst-u@xxxxxxx
<http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*>
<http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
.
Relevant Pages
|
|