1826103 Members
4598 Online
109690 Solutions
New Discussion

C Compile Flags

 
mephisto890
New Member

C Compile Flags

I have C source code currently running on VMS 7.2 and we use the DEC C 6.0 compiler.
We use the Vax C compatibility switch to compile the code as well.

We are having some problems with the include files during compilation.

I want to see all the include files during the precomipled phase to create a single file for compile analysis. In ANSI C, the developer would set a flag to create a .i or .p file which has all the include file references in the source code.

I am search for a like precompile FLAG to create a similier file on the VMS environment we are currently working on.

Thanks in Advance.
5 REPLIES 5
Robert Gezelter
Honored Contributor

Re: C Compile Flags

mephisto890,

I believe that you will find this is the /PREPROCESS_ONLY qualifier. Check the HELP text for how to direct the resulting output file.

I would recommend checking the HELP text for the CC command to see if any of the other qualifiers are appropriate for your situation.

- Bob Gezelter, http://www.rlgsc.com
Bojan Nemec
Honored Contributor

Re: C Compile Flags

Maybe this will do the task:

$ CC /LIST/SHOW=INCLUDE ...

This will produce a listing with all #include included.

For more see: $ HELP CC /SHOW

Bojan
mephisto890
New Member

Re: C Compile Flags

Robert.....

Would I include the /PREPROCESS_ONLY flag in the make file right???
Bojan Nemec
Honored Contributor

Re: C Compile Flags

With the /PREPROCESS_ONLY the compiler executes only the preprocess phase and will create a preprocessed file (no # commands except #line).

With the /LIST/SHOW the compiler creates the object file (.OBJ) and a listing file (.LIS).

So it depends on yours make file. If some parts depends on created object files that parts of make will not execute.

Bojan
Steven Schweda
Honored Contributor

Re: C Compile Flags

I use "/show = (all,nomessages)", to get the
macro expansions, too.

> [...] In ANSI C [...]

You seem to be coming from UNIX. Around here,
we can get onject files and compiler listings
in one pass.