Solved

what "PRAGMA   , "implementation  "" means?

Posted on 2001-07-02
6
636 Views
Last Modified: 2012-06-27
#ifdef PRAGMA
#pragma implementation "OtEchoMae_Actor.h"



0
Comment
Question by:she25
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 30

Expert Comment

by:Axter
ID: 6246704
"#pragma" are directives that are specific to the compiler.
What compiler are you using, and what OS?
0
 

Author Comment

by:she25
ID: 6246707
I am not sure, unix, sloris!
0
 
LVL 30

Expert Comment

by:Axter
ID: 6246713
What is the command line that you use to compile your code?
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 30

Accepted Solution

by:
Axter earned 50 total points
ID: 6246718
Because the #pragma are compiler specific, you should check the man-page to find the specific meaning for your compiler.

On the commandline, type the following:
man c++
or
man cc
or
man gpp
or
man gcc

Depending on which of the above you use to compile you code, would depend on which man page you should type in.
0
 

Author Comment

by:she25
ID: 6246742
I am not sure, unix, sloris!
0
 

Expert Comment

by:MichelHermier
ID: 6252220
Pragmas are specific to each compiler, but somes are common.

On the short part of code you have done it says :

#ifdef PRAGMA
     if the preprocessor as the macro PRAGMA definied
     then do all to the next #endif

#pragma implementation "OtEchoMae_Actor.h"
     then preprocessor do implemetation of file...

for an explanation of pragma implementation, take a look at this extract of the web page http://www.cis.ksu.edu/Systems/Info/develop/gcc.info.C++_Interface.html

`#pragma implementation'
`#pragma implementation "OBJECTS.h"'
     Use this pragma in a *main input file*, when you want full output
     from included header files to be generated (and made globally
     visible).  The included header file, in turn, should use `#pragma
     interface'.  Backup copies of inline member functions, debugging
     information, and the internal tables used to implement virtual
     functions are all generated in implementation files.

     `#pragma implementation' is *implied* whenever the basename(1) of
     your source file matches the basename of a header file it
     includes.  There is no way to turn this off (other than using a
     different name for one of the two files).  In the same vein, if
     you use `#pragma implementation' with no argument, it applies to an
     include file with the same basename as your source file.  For
     example, in `allclass.cc', `#pragma implementation' by itself is
     equivalent to `#pragma implementation "allclass.h"'; but even if
     you do not say `#pragma implementation' at all, `allclass.h' is
     treated as an implementation file whenever you include it from
     `allclass.cc'.

     If you use an explicit `#pragma implementation', it must appear in
     your source file *before* you include the affected header files.

     Use the string argument if you want a single implementation file to
     include code from multiple header files.  (You must also use
     `#include' to include the header file; `#pragma implementation'
     only specifies how to use the file--it doesn't actually include
     it.)

     There is no way to split up the contents of a single header file
     into multiple implementation files.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When writing generic code, using template meta-programming techniques, it is sometimes useful to know if a type is convertible to another type. A good example of when this might be is if you are writing diagnostic instrumentation for code to generat…
Introduction This article is the first in a series of articles about the C/C++ Visual Studio Express debugger.  It provides a quick start guide in using the debugger. Part 2 focuses on additional topics in breakpoints.  Lastly, Part 3 focuses on th…
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

632 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question