Solved

what "PRAGMA   , "implementation  "" means?

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



0
Comment
Question by:she25
  • 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
Is Your AD Toolbox Looking More Like a Toybox?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

 
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

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

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…
Errors will happen. It is a fact of life for the programmer. How and when errors are detected have a great impact on quality and cost of a product. It is better to detect errors at compile time, when possible and practical. Errors that make their wa…
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

777 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