`dirent.h` in multiple directories
up vote
2
down vote
favorite
I searched dirent
to find C routines
find / -iregex ".*/dirent.h$" 2>/dev/null
Which return series of identical ones
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/dirent.h
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/dirent.h
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Kernel.framework/Versions/A/Headers/sys/dirent.h
/Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/usr/include/dirent.h
How could I ensure which dirent.h
is the one my program invoke?
c macos
add a comment |
up vote
2
down vote
favorite
I searched dirent
to find C routines
find / -iregex ".*/dirent.h$" 2>/dev/null
Which return series of identical ones
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/dirent.h
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/dirent.h
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Kernel.framework/Versions/A/Headers/sys/dirent.h
/Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/usr/include/dirent.h
How could I ensure which dirent.h
is the one my program invoke?
c macos
add a comment |
up vote
2
down vote
favorite
up vote
2
down vote
favorite
I searched dirent
to find C routines
find / -iregex ".*/dirent.h$" 2>/dev/null
Which return series of identical ones
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/dirent.h
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/dirent.h
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Kernel.framework/Versions/A/Headers/sys/dirent.h
/Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/usr/include/dirent.h
How could I ensure which dirent.h
is the one my program invoke?
c macos
I searched dirent
to find C routines
find / -iregex ".*/dirent.h$" 2>/dev/null
Which return series of identical ones
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/dirent.h
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/dirent.h
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Kernel.framework/Versions/A/Headers/sys/dirent.h
/Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/usr/include/dirent.h
How could I ensure which dirent.h
is the one my program invoke?
c macos
c macos
asked Nov 10 at 14:56
Sawajiri
2019
2019
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
up vote
1
down vote
accepted
If you get the compiler to show you the code after pre-processing, you should be able to work it out.
So, for example, with gcc
, you can write a nominal program.c
:
#include <dirent.h>
main(int argc, char **argv){
return 0;
}
And then run:
gcc -E program.c
and study what it includes.
Related useful info here.
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
accepted
If you get the compiler to show you the code after pre-processing, you should be able to work it out.
So, for example, with gcc
, you can write a nominal program.c
:
#include <dirent.h>
main(int argc, char **argv){
return 0;
}
And then run:
gcc -E program.c
and study what it includes.
Related useful info here.
add a comment |
up vote
1
down vote
accepted
If you get the compiler to show you the code after pre-processing, you should be able to work it out.
So, for example, with gcc
, you can write a nominal program.c
:
#include <dirent.h>
main(int argc, char **argv){
return 0;
}
And then run:
gcc -E program.c
and study what it includes.
Related useful info here.
add a comment |
up vote
1
down vote
accepted
up vote
1
down vote
accepted
If you get the compiler to show you the code after pre-processing, you should be able to work it out.
So, for example, with gcc
, you can write a nominal program.c
:
#include <dirent.h>
main(int argc, char **argv){
return 0;
}
And then run:
gcc -E program.c
and study what it includes.
Related useful info here.
If you get the compiler to show you the code after pre-processing, you should be able to work it out.
So, for example, with gcc
, you can write a nominal program.c
:
#include <dirent.h>
main(int argc, char **argv){
return 0;
}
And then run:
gcc -E program.c
and study what it includes.
Related useful info here.
answered Nov 10 at 19:26
Mark Setchell
83.5k568167
83.5k568167
add a comment |
add a comment |
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53240152%2fdirent-h-in-multiple-directories%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown