Simply gcc compilation error using sys/dir.h

P

Paolini

compiling this using
gcc -o xxx xxx.c

I obtain this error message in function Main
6 storage size of 'ff' isn't known

Can any help me ?


#include <stdio.h>
#include <sys/dir.h>

int main (int argc, char* argv[])
{
struct ffblk ff;
int rc;
rc = findfirst ("*.*", &ff, ~0);
while (rc)
{
printf ("%s\n", ff.fa_name);
rc = findnext (&ff);
}
return 0;
}
 
J

Jonathan Mcdougall

compiling this using
gcc -o xxx xxx.c

I obtain this error message in function Main
6 storage size of 'ff' isn't known

Can any help me ?

Not here.
#include <stdio.h>

Non standard

# include said:
#include <sys/dir.h>

Non standard.
int main (int argc, char* argv[])
{
struct ffblk ff;

What is ffblk?

<snip>

Please, I suspect <sys/dir.h> being an implementation specific
header. Ask in the newgroup supporting that implementation.

http://www.parashift.com/c++-faq-lite/how-to-post.html#faq-5.9


Jonathan
 
P

Paolo Holzl

#include said:
Non standard

# include said:
#include <sys/dir.h>

Non standard.
int main (int argc, char* argv[])
{
struct ffblk ff;

What is ffblk?

Excuse me, i'm using Gcc where can i find correct 'standard'
libraries? name and structures documentation?
To read directory tree and make a directory whot is the correct
library to use (under Linux using gcc)?

Thank's
 
A

Alf P. Steinbach

#include <stdio.h>

Non standard

# include said:
#include <sys/dir.h>

Non standard.
int main (int argc, char* argv[])
{
struct ffblk ff;

What is ffblk?

Excuse me, i'm using Gcc where can i find correct 'standard'
libraries? name and structures documentation?
To read directory tree and make a directory whot is the correct
library to use (under Linux using gcc)?

That's off-topic in this group, try a gnu group.

But not-quite-offtopic, also take a look at <url:http//www.boost.org>. Reason
it's not quite offtopic: much of it will probably end up in the next standard.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,566
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top