[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference bulova::decw_jan-89_to_nov-90

Title:DECWINDOWS 26-JAN-89 to 29-NOV-90
Notice:See 1639.0 for VMS V5.3 kit; 2043.0 for 5.4 IFT kit
Moderator:STAR::VATNE
Created:Mon Oct 30 1989
Last Modified:Mon Dec 31 1990
Last Successful Update:Fri Jun 06 1997
Number of topics:3726
Total number of notes:19516

3177.0. "Compiling Ada?" by NITTY::DIERCKS (Bent, in a straight world...) Tue Aug 07 1990 12:44

    
    
    I teach the DECwindows Programming I class in Chicago and, for the
    first time since I've taught it, I have people wanting to use Ada.  I
    have many of the course examples in Ada, but can't figure out how to
    compile the blooming things.  My students (completely new to DW and
    relatively new to Ada) tell me that some special libraries have to be
    created in a user's subdirectory, etc. etc. etc.  I would greatly
    appreciate it if someone could mail me (or post here) the complete
    sequence of commands to create such libraries and then compile and link
    an Ada windows application.  (Or if you happen to have a command
    procedure which does so, all the better.)  
    
    Thanks!
    
    	Greg	NITTY::DIERCKS  
T.RTitleUserPersonal
Name
DateLines
3177.1QUARK::LIONELFree advice is worth every centTue Aug 07 1990 12:5430
Try HELP ADA Getting_Started for the basics on compiling Ada programs.  As
for using the DECwindows bindings, the VMS release notes tell you how to
execute (preferably as a batch job) SYS$UPDATE:DECW$COMPILE_ADA_UNITS
to compile the DECwindows Ada bindings into the predefined library. 
From then on, when you create an Ada program library, it will have the
units in it.

As of T5.4-4G1, the DECwindows example Ada programs have compile and link
instructions in their comments.

In summary, the steps are:

Do these once:

	$ SUBMIT/USER=SYSTEM SYS$UPDATE:DECW$COMPILE_ADA_UNITS
	$! wait for it to finish
	$ ACS CREATE LIBRARY [.ADALIB]	! Or whatever you want

When you want to use Ada:

	$ ACS SET LIBRARY
	$ ADA programs
	$ ACS LINK main-program-unit-name

Note that with Ada, no special link qualifiers or options files are needed
to link to the DECwindows libraries.

See DECW$EXAMPLES:HELLOWORLD.ADA for an example.

				Steve
3177.2Thanks!NITTY::DIERCKSBent, in a straight world...Tue Aug 07 1990 14:568
    
    
    Gotcha!  The problem is our distribution for Ada does not contain
    the command procedure you mention.  Can you post one or mail me one?
    
    And, for no reason that I understand, the person who installed
    the compiler opted not to have the on-line help installed or the
    release-notes kept around!  Grrrrr
3177.3QUARK::LIONELFree advice is worth every centTue Aug 07 1990 16:0617
The DECwindows bindings are not provided with Ada, but with VMS.  The VMS
installation asks you if you want DECwindows programming support, and if you
say yes, you are given the further option of selecting all languages or
a subset.  Ada is one of the choices, and the Ada files are provided there.

The description of how to use these files were in the VMS V5.1 Release Notes,
but I think disappeared in V5.3.  They reappear in V5.4 in another manual,
though I forget which one.  I do believe, though, that the package sources
have errors in V5.3 that cause them to compile with errors.

As for the Ada help, yes that is a separate saveset that needs to be installed
when Ada is installed.

There are three Ada examples provided in DECW$EXAMPLES:, HELLOWORLD,
DECBURGER and XLIBINTRO.

				Steve
3177.4the fix for 5.3TOOLEY::B_WACKERWed Aug 08 1990 13:396
And I think the fix for the error is to edit in and 
import_VALUED_procedure on the one that fails.

I don't do Ada, but do catch the spray.

Bruce
3177.5more 2 cents worth...GSRC::WESTSCARY : A programmer with a screwdriver.Thu Aug 09 1990 12:2212
  The call is XCreateImage in DECW$X_.ADA.  Bruce (.-1) gave the correct
fix for the PRAGMA IMPORT_mumble statement.

  Just change PRAGMA IMPORT_PROCEDURE to PRAGMA IMPORT_VALUED_PROCEDURE and
it will then compile correctly.

  When you get these files there is a com file in SYS$UPDATE that will
compile the DECwindows Ada units into the master Ada library, ADA$PREDEFINED.
The com file is DECW$COMPILE_ADA_UNITS.COM.

						-=> Jim <=-
3177.6for the future...MINNIE::DOUGjust sing it like you feel itThu Aug 30 1990 06:1919
    this should be a lesson to _all_ decwindows instructors.  you may think
    that the whole world programs in c under vms, but such is not the case.
    i suggest you become familiar with, and have ready to use in a course:
    ada, pascal, fortran; and the most amazing thing most training centres
    and instructors lack: unix/ultrix. 
    
    note, i'm not some ivory tower engineer just dreaming of all the
    things people may want; i'm an instructor with the scars of experience
    to prove that these are definite NEEDS.
    
    i have had, on three occasions (when visiting other training centres
    and customer sites), to hurriedly get ada and decwindows to work
    together.  i have also failed, on two occasions, to make an ultrix
    machine available to ultrix students.  there is nothing more pathetic
    than making people who don't know vms (and don't want to know vms)
    use vms, unless it's making people who want to program in ada program
    in c.
    
    			--dd
3177.7PSW::WINALSKICareful with that VAX, EugeneThu Aug 30 1990 16:0610
RE: .6

>    there is nothing more pathetic
>    than making people who don't know vms (and don't want to know vms)
>    use vms,

It's even worse making people who don't know Unix (and don't want to know Unix)
use Unix.  At least VMS has HELP that can be read by normal human beings.

--PSW
3177.8SUBWAY::GRAHAMThe revolution will be televisedFri Aug 31 1990 01:057
    >At least VMS has HELP that can be read by normal human beings.
    
    So why not get them the ultimate text?
    
    "Gulliver Travels to Mars"  ;-)
    
    Kris...