OS/2, eCS & ArcaOS - Technical > Programming

Compiling the WPS CAR Sample from OS2TK45

(1/2) > >>

Martin Iturbide:
Hi

I'm trying to learn how to compile a WPS class sample. So I think it can be a good idea to try to compile the CAR sample of the OS2TK45.

I just installed the OS2TK45 from the eCS 2.1 CD#2 with the sames without registering the classes.

My goal is only to generate the CAR.DLL for this samples. I checked the WPS Programming Guide, but I haven't found the info con how to compile the CAR sample, it just explain what it does.

Can someone please point me which should be steps to generate CAR.DLL with the OS2TK45?

Regards

ak120:
Simply start a command prompt of your C environment. IBM C Set++ for OS/2 should be enough, for later toolkit versions VisualAge C++ 3.0 is default. If not already set by CONFIG.SYS add the environment variables from toolkit installation to your C environment startup script - especially the SOMobjects Toolkit settings. Change to the directory of the sample and run nmake.

Martin Iturbide:
Hi Andreas.

Can it be possible to do it with gcc instead of Set++ or Visualage, or there is no way to do it.

I have installed the OS/2 Toolkit so I have sc.exe and nmake. I guess the way to call the compilation with nmake is "nmake car.mak". Am I right?

Regards

ak120:

--- Quote from: Martin Iturbide on December 01, 2016, 12:51:24 pm ---Can it be possible to do it with gcc instead of Set++ or Visualage, or there is no way to do it.
--- End quote ---
Latest OS/2 Toolkit only supports ICC (from VisualAge C++ 3.0) out of the box.
It depends on version of GCC and your environment. The macros need to be changed of course.


--- Quote ---I have installed the OS/2 Toolkit so I have sc.exe and nmake. I guess the way to call the compilation with nmake is "nmake car.mak". Am I right?
--- End quote ---
nmake -f car.mak

Martin Iturbide:
Since I don't have icc.exe installed yet the error is kind of obvious.


--- Quote ---[C:\Projects\CAR]nmake -f car.mak

Operating System/2 Program Maintenance Utility
Version 4.00.001 Oct  4 2001
Copyright (C) IBM Corporation 1988-2001
Copyright (C) Microsoft Corp. 1988-1991
All rights reserved.

        sc -p -mnotc -maddstar -mnoint -S128000 -C128000 -s"def"  car.idl
        sc -p -mnotc -maddstar -mnoint -S128000 -C128000 -s"ih"   car.idl
        sc -p -mnotc -maddstar -mnoint -S128000 -C128000 -s"h"    car.idl
        icc -c -Gd- -Se -Re -Ss -Ms -Gm+  -Ge- -I. -Fo".\car.obj" car.c
SYS1041: The name icc is not recognized as an
internal or external command, operable program or batch file.
NMAKE : fatal error U1077: 'C:\OS2\CMD.EXE' : return code '1041'
Stop.

--- End quote ---

The other things that called my attention is that the make file of the sample called "ibmsamp.inc".

I would like to try to follow the procedure without the make file to learn which are to common steps on compiling a SOM application. 

And if GCC can also be used it will be great.  It can be interesting to know how to replace "icc -c -Gd- -Se -Re -Ss -Ms -Gm+  -Ge- -I. -Fo".\car.obj" car.c" with gcc..

I'm using the latest gcc included on the RPM/YUM repo.  (2-01-2015  2:08p       337,172  /   4.9.2.1-3)

Regards

Navigation

[0] Message Index

[#] Next page

Go to full version