> Also - for future reference - any quick ways to resolve a linker reference
> from an include like #include <sys/stat.h> in order to beat these linker
> errors quickly?
There isn't necessarily a correllation between header includes and
linker import libraries. You should consult your API documentation to
find out what import libraries are required for the functions you intend
to link against. In general, Visual Studio sets up default import
libraries for common Windows APIs and the C standard library.
The function stat() should have been included in one of those default
libraries, likely libcmt.lib. I haven't physically checked this myself
for the case of stat(), but this is what the documentation has.
Thobias Jones
Murray Foxcroft - 02 Jun 2004 06:27 GMT
Thanks Thobias,
As far as the documentation is concerned, it should have been in
msvcrt.lib - which is linked in to my project already. 8-(
>> Also - for future reference - any quick ways to resolve a linker
>> reference from an include like #include <sys/stat.h> in order to beat
[quoted text clipped - 11 lines]
>
> Thobias Jones
Thobias Jones - 02 Jun 2004 14:58 GMT
> Thanks Thobias,
>
> As far as the documentation is concerned, it should have been in
> msvcrt.lib - which is linked in to my project already. 8-(
Is there some reason you are linking against stat() instead of _stat()?
If you really need stat(), link against oldnames.lib.
Thobias Jones
http://ace.roqs.net
Murray Foxcroft - 03 Jun 2004 06:36 GMT
I got away with using the managed stuff - File.Exists and <myfile>.Length
Thanks for the help tho - much appreciated.
>> Thanks Thobias,
>>
[quoted text clipped - 6 lines]
> Thobias Jones
> http://ace.roqs.net