Solved

what "PRAGMA   , "implementation  "" means?

Posted on 2001-07-02
6
621 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
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!

 
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

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!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How to convert MFC APP to Win32 APP. 19 134
Unable to start eclipse ? 17 176
passing data from one form to another form in c++ 27 104
What is sub-make ? 2 107
Templates For Beginners Or How To Encourage The Compiler To Work For You Introduction This tutorial is targeted at the reader who is, perhaps, familiar with the basics of C++ but would prefer a little slower introduction to the more ad…
Many modern programming languages support the concept of a property -- a class member that combines characteristics of both a data member and a method.  These are sometimes called "smart fields" because you can add logic that is applied automaticall…
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
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.

752 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