Author Topic: SOMOBJ.H syntax errors  (Read 992 times)

André Heldoorn

• Hero Member
• Thank You
• -Given: 119
• Posts: 787
SOMOBJ.H syntax errors
« on: July 24, 2019, 06:51:05 pm »
I'm trying to recompile the WPS DLL of CmdHere_1-12b402.zip with IBM VAC 3.08 and theTK 4.52, just to see if it's not that hard to translate the WPS UI's "OS/2 windowed" to, let's say, the usual "eCS-opdrachtaanwijzing (Venster)". After editing a few paths in CMDHERE.MAK, this is the output of NMAKE CMDHERE.MAK:

Code: [Select]
`Operating System/2 Program Maintenance UtilityVersion 4.00.001 Oct  4 2001Copyright (C) IBM Corporation 1988-2001Copyright (C) Microsoft Corp. 1988-1991All rights reserved." Compile::SOM Compiler "        sc.exe -p -S65536 -C65536 -mnoint CMDHERE.IDL" Compile::C++ Compiler "        icc.exe /Ss /Gm /Ge- /Ms /C C:\cmdhere\WPSDLL\CMDHERE.cIBM VisualAge C++ for OS/2, Version 3(C) Copyright IBM Corp. 1991, 1995.- Licensed Materials - Program Property of IBM - All Rights Reserved.C:\cmdhere\WPSDLL\cmdhere.ih(59:1) : warning EDC0523: Obsolete #pragmacheckout ignored. Use #pragma info or the /W options.E:\IBMCPP\som\include\somobj.h(249:17) : error EDC0046: Syntax error.E:\IBMCPP\som\include\somobj.h(277:17) : error EDC0046: Syntax error.E:\IBMCPP\som\include\somobj.h(304:17) : error EDC0046: Syntax error.E:\IBMCPP\som\include\somobj.h(330:17) : error EDC0046: Syntax error.E:\IBMCPP\som\include\somobj.h(356:17) : error EDC0046: Syntax error.E:\IBMCPP\som\include\somobj.h(381:17) : error EDC0046: Syntax error.E:\IBMCPP\som\include\somobj.h(406:17) : error EDC0046: Syntax error.E:\IBMCPP\som\include\somobj.h(431:17) : error EDC0046: Syntax error.E:\IBMCPP\som\include\somobj.h(456:17) : error EDC0046: Syntax error.E:\IBMCPP\som\include\somobj.h(481:17) : error EDC0046: Syntax error.NMAKE : fatal error U1077: 'C:\OS2\CMD.EXE' : return code '12'Stop.`
I've read an old article about %INCLUDE%, but I've only got one copy of SOMOBJ.H:

Code: [Select]
`30-06-99 19:15         43.815      0 a---  somobj.h`
Lines 245-250 of SPMOBJ.H (syntax error @ line #249):

Code: [Select]
`/* * New Method: somDefaultInit */typedef void   SOMLINK somTP_SOMObject_somDefaultInit(SOMObject *somSelf, som3InitCtrl* ctrl);#pragma linkage(somTP_SOMObject_somDefaultInit, system)`
What's required to get rid of those syntax errors?

Dave Yeo

• Hero Member
• Thank You
• -Given: 11
• Posts: 2467
Re: SOMOBJ.H syntax errors
« Reply #1 on: July 25, 2019, 01:54:54 am »
Seems your using the SOMOBJ.H included with VAC 3.08,
Code: [Select]
`Directory of G:\IBMCPP\INCLUDE\SOM 5-19-95  1:50p        37,721      0 a---  SOMOBJ.H        1 file(s)      37,721 bytes used                  136,678,621 K bytes free`
Make sure that your INCLUDE path has the toolkit first, something like,
Code: [Select]
`set INCLUDE=G:\OS2TK45\SOM\INCLUDE;G:\OS2TK45\INC;G:\OS2TK45\H;G:\OS2TK45\H\GL;G:\OS2TK45\H\LIBC;.;G:\OS2TK45\SPEECH\H;G:\IBMCPP\INCLUDE;G:\IBMCPP\INCLUDE\OS2;G:\IBMCPP\INC;G:\IBMCPP\INCLUDE\SOM;`
Don't forget the set LIB setting, I have
Code: [Select]
`set LIB=G:\OS2TK45\SOM\LIB;G:\OS2TK45\LIB;G:\OS2TK45\SAMPLES\MM\LIB;G:\OS2TK45\SPEECH\LIB;G:\IBMCPP\LIB;G:\IBMCPP\DLL;`

Lars

• Hero Member
• Thank You
• -Given: 0
• Posts: 569
Re: SOMOBJ.H syntax errors
« Reply #2 on: July 25, 2019, 08:56:01 am »
Looks like structure "som3InitCtrl" is not recognized which in turn means that some other header file is not included or does not contain this structure definition but it should.
You should do a tree search of all header files and find the file that contains "som3InitCtrl" structure definition. you should then check why it is not included. You should check if the structure definition is bracketed by some define and if yes, why that define is not set or set it manually from the compiler command line.
Beware, there are header files that DO NOT end with the .h extension. For example I seem to remember a header file with an .api file extension.

"som3InitCtrl" is defined in somapi.h which should be included by top-level som.h (which also includes somobj.h) . You should check why this does not happen for you. You might only have one file somobj.h but you might have multiple files som.h. You might also need to run a different version of sc.exe (preferably the one from the OS/2 toollkit).
« Last Edit: July 25, 2019, 09:05:12 am by Lars »

André Heldoorn

• Hero Member
• Thank You
• -Given: 119
• Posts: 787
Re: SOMOBJ.H syntax errors
« Reply #3 on: July 25, 2019, 03:25:43 pm »
You might only have one file somobj.h but you might have multiple files som.h. You might also need to run a different version of sc.exe (preferably the one from the OS/2 toollkit).

I'll have to check paths. Probably due to a bug (*) I've got a IBMCPP\INCLUDE\SOM and a newer (1999 versus 1995) IBMCPP\SOM\INCLUDE directory. The chain of involved *.H files seems to be SOMOBJ.H (app), SOM.H and SOMAPI.H. I've got one SOMOBJ.H, but two of the other *.H files. I already checked SC.EXE. I've got 2, but the VABASIC one is the last in all PATHS. I haven't checked yet if using IBMCPP\SOM\INCLUDE helps.

(*) = install order: VAC 3 excluding toolkit, VAC 3.08x FixPaks, TK 4.52 (eCS 1.2R install CD), tools and own patches (C++ comment in C header file).

André Heldoorn

• Hero Member
• Thank You
• -Given: 119
• Posts: 787
Re: SOMOBJ.H syntax errors
« Reply #4 on: July 25, 2019, 08:27:30 pm »
Solved: to not mix old and new, %INCLUDE%'s INCLUDE\SOM and SOM\INCLUDE had to be swapped. Maybe old can be deleted, but this works too. Thanks.

• Hero Member
• Thank You
• -Given: 119