I tried compiling some of the example code that comes with DEC Windows but ran into a wall when trying to link:
%LINK-W-NUDFSYMS, 10 undefined symbols:
%LINK-I-UDFSYM, MRMFETCHSETVALUES
%LINK-I-UDFSYM, MRMFETCHWIDGET
%LINK-I-UDFSYM, MRMINITIALIZE
%LINK-I-UDFSYM, MRMOPENHIERARCHY
%LINK-I-UDFSYM, MRMREGISTERNAMES
%LINK-I-UDFSYM, XTAPPINITIALIZE
%LINK-I-UDFSYM, XTAPPMAINLOOP
%LINK-I-UDFSYM, XTMANAGECHILD
%LINK-I-UDFSYM, XTREALIZEWIDGET
%LINK-I-UDFSYM, _XMSTRINGS
%LINK-W-USEUNDEF, undefined symbol MRMOPENHIERARCHY referenced
It goes on...
I found the respective header files but couldn't get cc to use the DECC$USER_INCLUDE logical, only the /INCLUDE_DIRECTORY parameter. It compiles to an .OBJ but that was it.
Any ideas?
Added in 1 hour 8 minutes 31 seconds:
I modifed the source file so that header files are not expected in subdirectories, since they aren't on the system.
$ cc helloint.c
#include <Xm.h> /* Motif Toolkit */
.^
%CC-F-NOINCLFILEF, Cannot find file <Xm.h> specified in #include directive.
at line number 8 in file SYS$SYSDEVICE:[AJBREHM]HELLOINT.C;4
$ cc helloint.c/include_directory=DKA0:[VMS$COMMON.DECW$INCLUDE]
$
It works with the /include_directory parameter.
However:
$ link helloint
%LINK-W-NUDFSYMS, 10 undefined symbols:
%LINK-I-UDFSYM, MRMFETCHSETVALUES
%LINK-I-UDFSYM, MRMFETCHWIDGET
%LINK-I-UDFSYM, MRMINITIALIZE
%LINK-I-UDFSYM, MRMOPENHIERARCHY
%LINK-I-UDFSYM, MRMREGISTERNAMES
%LINK-I-UDFSYM, XTAPPINITIALIZE
%LINK-I-UDFSYM, XTAPPMAINLOOP
%LINK-I-UDFSYM, XTMANAGECHILD
%LINK-I-UDFSYM, XTREALIZEWIDGET
%LINK-I-UDFSYM, _XMSTRINGS
%LINK-W-USEUNDEF, undefined symbol MRMOPENHIERARCHY referenced
in psect $LINK$ offset %X00000000
in module HELLOINT file SYS$SYSDEVICE:[AJBREHM]HELLOINT.OBJ;5
%LINK-W-USEUNDEF, undefined symbol XTAPPINITIALIZE referenced
in psect $LINK$ offset %X00000040
in module HELLOINT file SYS$SYSDEVICE:[AJBREHM]HELLOINT.OBJ;5
%LINK-W-USEUNDEF, undefined symbol XTAPPMAINLOOP referenced
in psect $LINK$ offset %X00000050
in module HELLOINT file SYS$SYSDEVICE:[AJBREHM]HELLOINT.OBJ;5
%LINK-W-USEUNDEF, undefined symbol XTREALIZEWIDGET referenced
in psect $LINK$ offset %X000000C0
in module HELLOINT file SYS$SYSDEVICE:[AJBREHM]HELLOINT.OBJ;5
%LINK-W-USEUNDEF, undefined symbol MRMINITIALIZE referenced
in psect $LINK$ offset %X000000D0
in module HELLOINT file SYS$SYSDEVICE:[AJBREHM]HELLOINT.OBJ;5
%LINK-W-USEUNDEF, undefined symbol MRMREGISTERNAMES referenced
in psect $LINK$ offset %X000000E0
in module HELLOINT file SYS$SYSDEVICE:[AJBREHM]HELLOINT.OBJ;5
%LINK-W-USEUNDEF, undefined symbol MRMFETCHWIDGET referenced
in psect $LINK$ offset %X000000F0
in module HELLOINT file SYS$SYSDEVICE:[AJBREHM]HELLOINT.OBJ;5
%LINK-W-USEUNDEF, undefined symbol XTMANAGECHILD referenced
in psect $LINK$ offset %X00000100
in module HELLOINT file SYS$SYSDEVICE:[AJBREHM]HELLOINT.OBJ;5
%LINK-W-USEUNDEF, undefined symbol _XMSTRINGS referenced
in psect $LINK$ offset %X00000170
in module HELLOINT file SYS$SYSDEVICE:[AJBREHM]HELLOINT.OBJ;5
%LINK-W-USEUNDEF, undefined symbol MRMFETCHSETVALUES referenced
in psect $LINK$ offset %X00000190
in module HELLOINT file SYS$SYSDEVICE:[AJBREHM]HELLOINT.OBJ;5
Coming from a Windows world, I am not very familiar with X. Am I missing some configuration?
Any luck with compiling and linking X11 programs?
-
- VSI Expert
- Active Contributor
- Posts: 25
- Joined: Mon Jun 24, 2019 9:51 am
- Reputation: 0
- Status: Offline
Re: Any luck with compiling and linking X11 programs?
You will need to link with one or more of the X11 libraries; by default the linker will not automatically pull these in. For example, try creating a link options file (let's say "junk.opt") with the following contents:
sys$share:decw$mrmlibshr12.exe/share
sys$share:decw$dxmlibshr12.exe/share
sys$share:decw$xmlibshr12.exe/share
sys$share:decw$xtlibshrr5.exe/share
sys$share:decw$xlibshr.exe/share
Now link as follows:
$ link helloint.obj,junk.opt/opt
With any luck this will at least reduce the number of unresolved symbols. You may need to include additional libraries, or possibly you don't need all of those I listed; without seeing your program and playing around I'm partially guessing as to what is required.
BTW, these "libraries" such as decw$xlibshr.exe are better referred to as "shareable images"; essentially the Windows equivalent of a DLL.
Also, check whether you have a logical name decw$examples defined. There might be some useful examples in the directory pointed to by this logical name...
$ sh log decw$examples
"DECW$EXAMPLES" = "SYS$SYSROOT:[SYSHLP.EXAMPLES.DECW]" (DECW$LOGICAL_NAMES)
$
sys$share:decw$mrmlibshr12.exe/share
sys$share:decw$dxmlibshr12.exe/share
sys$share:decw$xmlibshr12.exe/share
sys$share:decw$xtlibshrr5.exe/share
sys$share:decw$xlibshr.exe/share
Now link as follows:
$ link helloint.obj,junk.opt/opt
With any luck this will at least reduce the number of unresolved symbols. You may need to include additional libraries, or possibly you don't need all of those I listed; without seeing your program and playing around I'm partially guessing as to what is required.
BTW, these "libraries" such as decw$xlibshr.exe are better referred to as "shareable images"; essentially the Windows equivalent of a DLL.
Also, check whether you have a logical name decw$examples defined. There might be some useful examples in the directory pointed to by this logical name...
$ sh log decw$examples
"DECW$EXAMPLES" = "SYS$SYSROOT:[SYSHLP.EXAMPLES.DECW]" (DECW$LOGICAL_NAMES)
$
-
- Master
- Posts: 104
- Joined: Fri Jun 14, 2019 11:05 pm
- Reputation: 0
- Location: Goslar, Germany
- Status: Offline
- Contact:
Re: Any luck with compiling and linking X11 programs?
Just a quick addition to Brett's excellent introduction to DECwindows programming ![Smile :-)](./images/smilies/icon_e_smile.gif)
You can leave the X include statements as-is (e.g. #include <X11/Xm.h>) if you define the logical name X11 to point to DECW$INCLUDE, i.e.
![Smile :-)](./images/smilies/icon_e_smile.gif)
You can leave the X include statements as-is (e.g. #include <X11/Xm.h>) if you define the logical name X11 to point to DECW$INCLUDE, i.e.
Code: Select all
$ define/job X11 DECW$INCLUDE
Last edited by martinv on Sun Sep 08, 2019 2:33 am, edited 1 time in total.
There is something wrong with everything that is popular.
(Charles Fort)
(Charles Fort)