Results 1 to 6 of 6
Where can I get the description of following g++ compilation flags:
-D_UNIX
-D_REENTRANT
-DUNICODE
-D_UNICODE
-D__LITTLE_ENDIAN__
-D_FILE_OFFSET_BITS=64
-D_LARGEFILE_SOURCE
-D_LARGEFILE64_SOURCE
-D_LARGE_FILES
-DLINUX
-D__x86__
-D__linux__
-D____
-D__OSVERSION__=2...
- 02-03-2010 #1Just Joined!
- Join Date
- Oct 2009
- Posts
- 17
g++ compilation flags description
Where can I get the description of following g++ compilation flags:
-D_UNIX
-D_REENTRANT
-DUNICODE
-D_UNICODE
-D__LITTLE_ENDIAN__
-D_FILE_OFFSET_BITS=64
-D_LARGEFILE_SOURCE
-D_LARGEFILE64_SOURCE
-D_LARGE_FILES
-DLINUX
-D__x86__
-D__linux__
-D____
-D__OSVERSION__=2
- 02-09-2010 #2
There is only one compiler flag used in your sample: '-D' Each of them performs the equivalent of "#define" in the source code. This is common practice for conditional compilation to suit differing target architectures.
--- rod.Stuff happens. Then stays happened.
- 03-05-2010 #3Just Joined!
- Join Date
- Oct 2009
- Posts
- 17
Rod,
Where can I get description of these #defines? Or is there any standard or particular file where they might have defined?
- 03-05-2010 #4Linux Guru
- Join Date
- Apr 2009
- Location
- I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
- Posts
- 8,961
No. They are entirely dependent upon the source code being compiled. Some are "common" in that they are used in a number of programs for cross-platform operation. Example: the __LITTLE_ENDIAN__ flag is telling the code to use the code for Intel type of processors, vs Sparc or MC68K processors. From your question and cluelessness I have to assume that this is for a class?
Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!
- 03-08-2010 #5Just Joined!
- Join Date
- Oct 2009
- Posts
- 17
Rubberman,
I am trying to build my entire C++ code base and not just a class. These options are there in my make file but I am not getting from where they come or why some of them are there.
- 03-08-2010 #6Linux Guru
- Join Date
- Apr 2009
- Location
- I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
- Posts
- 8,961
You say they are in your makefile. How did you generate the makefile? With an IDE? If so, what was it? Also, what type of application are you building?
Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!


Reply With Quote
