Re: stati64() Problem lcc-win32



"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

  • Re: __atoi64 not working correctly
    ... are missing from header files. ... programmers have to work to is the C89/90 standard, ... of the C compilers available are C99 compliant ... I want to determine the 'best' floating point type for my ...
    (comp.lang.c)
  • Re: Compilation Error/Warning - Help
    ... > Because if I am making any such mistakes in my code thiswarning ... It's not absurd, just, in my view, a bit misguided. ... Busybody compilers can usually be quieted by ... As to suppressing it for that header, ...
    (comp.lang.cpp)
  • Re: Kernel Cross Compiling [update]
    ... >> both compilers produce the same code, ... the header changes are 'minimal' and labeled ... > caused that one diff on alpha. ... send the line "unsubscribe linux-kernel" in ...
    (Linux-Kernel)
  • Re: Portable record length
    ... 240 byte header is part of the specification and the length of the data ... direct access unformatted file. ... It sounds as if you need a "stream" - that is a file without any ... or access='transparant' (with some other compilers) or with a proper ...
    (comp.lang.fortran)
  • Re: Hollerith data initialization
    ... It was removed from the standard in f77. ... Most f90 compilers continue to implement it, ... The replacement for Hollerith is character type. ...
    (comp.lang.fortran)