Installing Common Areas

Installing Common Areas

I have this scenario consider file NAV1.for

block data NAV1
include 'NAV2.for'
end

now if in NAV2.for there are more then one common area is declared like NAV2.for is like this

integer *2 a
integer *2 b

common/N1/a
common/N2/b

now If I use following command to link NAV1
$ Link/Share/Exe = NAV$COMMON:NAV1.EXE -
NAV$OBJECT:NAV1.OBJ, SYS$INPUT/OPTION
SYMBOL_VECTOR=(N1=PSECT)
PSECT_ATTR=N1,SHR

in third and fourth line I have to use the name of one of the common area otherwise if I use NAV1 in third and fourth line it gives
%LINK-W-UPSCNOCONTRI, universal psect NAV1 was not contributed by any object module
deleted from Global Symbol Table

but if I use N1 and install it with following command
$ Install Create SYS$SHARE:NAV1/WRITABLE/SHARED
It does'nt work for the programs that uses N2 common areas, is there any way to link NAV1 as shareable and install it, so that both common areas are available.

Thanks

Naveed

2 post / 0 nuovi
Ultimo contenuto
Per informazioni complete sulle ottimizzazioni del compilatore, consultare l'Avviso sull'ottimizzazione

You need to make an entry for each common you want to share, so use an options file such as:

 
symbol_vector=(n1=psect) 
symbol_vector=(n2=psect) 
psect_attr=n1,shr 
psect_attr=n2,shr 

and link/share nav1,options/opt to get all your globals defined.

James

Lascia un commento

Eseguire l'accesso per aggiungere un commento. Non siete membri? Iscriviti oggi