Author Topic: Compiling my first WPS application  (Read 1599 times)

Martin Iturbide

  • OS2World NewsMaster
  • Global Moderator
  • Hero Member
  • *****
  • Thank You
  • -Given: 319
  • -Receive: 60
  • Posts: 2072
  • Your Friend Wil Declares...
    • View Profile
    • Martin's Personal Blog
Compiling my first WPS application
« on: December 03, 2018, 05:54:40 pm »
Hi

I always want to learn something when time allows it, and I want to follow the procedure to compile a WPS application and maybe write something quick about it for the EDM/2 wiki.

I only want to learn the "compiling/linking" procedure. So I want to grab some working source code and as a goal I want to produce the DLL with the WPS program (class).

I was thinking to give it a try to compile Hwman, but I was wondering if someone suggest some other project or sample.

And I would like to know if I need to install the full VAC++ 3.0 environment, or it is not necessary just to compile the source code.

Regards
« Last Edit: December 03, 2018, 05:56:28 pm by Martin Iturbide »
Martin Iturbide
OS2World NewsMaster
... just share the dream.

Bogdan Szmalcownik

  • Jr. Member
  • **
  • Thank You
  • -Given: 0
  • -Receive: 2
  • Posts: 65
    • View Profile
Re: Compiling my first WPS application
« Reply #1 on: December 03, 2018, 06:22:01 pm »
And I would like to know if I need to install the full VAC++ 3.0 environment, or it is not necessary just to compile the source code.
It's not required but seems to be the easiest way. Simply install the Toolkit and VisualAge C++ (without toolkit parts) + fixes.
Watcom or other compilers should also work, but you need to change the makefile.

Lars

  • Sr. Member
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 33
  • Posts: 286
    • View Profile
Re: Compiling my first WPS application
« Reply #2 on: December 04, 2018, 12:38:23 pm »
Hi Martin,

1) while we are at it: you should update your github to the latest HWMan Version 13 source code (which is contained in the WPI). I had to make relevant changes to the source code:
http://hobbes.nmsu.edu/download/pub/os2/util/wps/hwman13.wpi

2) addition to the preceding answer: if you install VAC3, then I suggest that you DO NOT install the IWF (integrated workframe part, the IDE so to say). That thing is so buggy and lousy that you better not use it at all. It's especially buggy and lousy on an SMP system.
HWMAN comes with a makefile (as most other OS/2 source code does) and that's it. It is going to build from a commandline.


André Heldoorn

  • Sr. Member
  • ****
  • Thank You
  • -Given: 38
  • -Receive: 9
  • Posts: 388
    • View Profile
Re: Compiling my first WPS application
« Reply #3 on: December 04, 2018, 01:31:17 pm »
It's not required but seems to be the easiest way. Simply install the Toolkit and VisualAge C++ (without toolkit parts) + fixes.

Here: WPS backup, VAC++ 3 CD excluding the toolkit, edit LIBPATH before the reboot (IIRC x:\OS2\DLL before x:\IBMCPP\DLL), reboot and WPS backup, install the first 3.08.x updates with documented reboot, an extra reboot before installing the IIRC 5th package, reboot, install the toolkit v4.52 by using eCS CD #2. And install optional packages like the lvm_toolkit_15.zip, drgdrp.zip and nb-fix.zip.

I do tend to install *.*, including the IDE. If it's buggy, then just don't use it. Probably easier than having to install VAC++ if some project or programming book requires it. Typically you won't use it, for one because of the famous steep learning curve.

Last known location of the english-us FixPaks: ftp://service.software.ibm.com/ps/products/visualagecpp/fixes/v30os2/english-us/fixpak8, IIRC you'll need 8 (6, and 3081, and 3082).

Bogdan Szmalcownik

  • Jr. Member
  • **
  • Thank You
  • -Given: 0
  • -Receive: 2
  • Posts: 65
    • View Profile
Re: Compiling my first WPS application
« Reply #4 on: December 04, 2018, 03:02:41 pm »
I do tend to install *.*, including the IDE. If it's buggy, then just don't use it. Probably easier than having to install VAC++ if some project or programming book requires it. Typically you won't use it, for one because of the famous steep learning curve.

Last known location of the english-us FixPaks: ftp://service.software.ibm.com/ps/products/visualagecpp/fixes/v30os2/english-us/fixpak8, IIRC you'll need 8 (6, and 3081, and 3082).
Only cto3082.zip should be required for Open Class which incorporates the changes from earlier cto3081.zip. But for this topic it's not important. The latest binaries and locale fixes from ftp://service.software.ibm.com/ps/products/visualagecpp/fixes/v30os2/english-us/tempfix/eurofix/eurofix.zip should be more useful. East Asian locale fixes that don't use the Japanese edition are also available: ftp://service.software.ibm.com/ps/products/visualagecpp/fixes/v30os2/english-us/tempfix/localefx/localefx.zip

Lars

  • Sr. Member
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 33
  • Posts: 286
    • View Profile
Re: Compiling my first WPS application
« Reply #5 on: December 04, 2018, 03:37:11 pm »
Hi Martin,

1) while we are at it: you should update your github to the latest HWMan Version 13 source code (which is contained in the WPI). I had to make relevant changes to the source code:
http://hobbes.nmsu.edu/download/pub/os2/util/wps/hwman13.wpi

Oh, you already did ...

Martin Iturbide

  • OS2World NewsMaster
  • Global Moderator
  • Hero Member
  • *****
  • Thank You
  • -Given: 319
  • -Receive: 60
  • Posts: 2072
  • Your Friend Wil Declares...
    • View Profile
    • Martin's Personal Blog
Re: Compiling my first WPS application
« Reply #6 on: December 04, 2018, 09:06:11 pm »
Thanks for the reply

Lar's which make program do you use to run the makefile? Can you give me a hint on how you call it, I don't have experience with it.

Regards
Martin Iturbide
OS2World NewsMaster
... just share the dream.

Dave Yeo

  • Hero Member
  • *****
  • Thank You
  • -Given: 9
  • -Receive: 112
  • Posts: 1644
    • View Profile
Re: Compiling my first WPS application
« Reply #7 on: December 04, 2018, 09:49:17 pm »
Try nmake

Lars

  • Sr. Member
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 33
  • Posts: 286
    • View Profile
Re: Compiling my first WPS application
« Reply #8 on: December 05, 2018, 02:31:57 pm »
Yes, nmake.exe (which is inluded in the OS/2 toolkit but I think it also comes with VAC).

"nmake" to do a normal build
"nmake "DEBUG=1"" to build with debug info
"nmake -a" to rebuild all
"nmake -a "DEBUG=1"" to rebuild all with debug info

André Heldoorn

  • Sr. Member
  • ****
  • Thank You
  • -Given: 38
  • -Receive: 9
  • Posts: 388
    • View Profile
Re: Compiling my first WPS application
« Reply #9 on: December 07, 2018, 01:08:39 am »
Only cto3082.zip should be required for Open Class which incorporates the changes from earlier cto3081.zip.

The latest binaries and locale fixes from ftp://service.software.ibm.com/ps/products/visualagecpp/fixes/v30os2/english-us/tempfix/eurofix/eurofix.zip should be more useful. East Asian locale fixes that don't use the Japanese edition are also available: ftp://service.software.ibm.com/ps/products/visualagecpp/fixes/v30os2/english-us/tempfix/localefx/localefx.zip

Thanks, installed. If anything to not bother experts with fixed issues. I was using some old mirror directory.

FTR: with eurofix.zip I had to unlock CPPOM30.DLL first, albeit I didn't use the documented -u option of UNZIP.EXE after repackaging eurofix.zip (to use a more clear and constant root directory as a base directory, instead of having to remember to CD to x:\IBMCPP directory).

Martin Iturbide

  • OS2World NewsMaster
  • Global Moderator
  • Hero Member
  • *****
  • Thank You
  • -Given: 319
  • -Receive: 60
  • Posts: 2072
  • Your Friend Wil Declares...
    • View Profile
    • Martin's Personal Blog
Re: Compiling my first WPS application
« Reply #10 on: December 08, 2018, 03:31:10 pm »
Hi

Where can I get "emxupd.exe". By any chance it is on the netlabs RPM? or where can it be downloaded?

Regards
Martin Iturbide
OS2World NewsMaster
... just share the dream.

Bogdan Szmalcownik

  • Jr. Member
  • **
  • Thank You
  • -Given: 0
  • -Receive: 2
  • Posts: 65
    • View Profile
Re: Compiling my first WPS application
« Reply #11 on: December 08, 2018, 04:31:33 pm »
Where can I get "emxupd.exe".
Simply from emxrt.zip that is available: http://hobbes.nmsu.edu/download/pub/os2/dev/emx/v0.9d/emxrt.zip

Quote
By any chance it is on the netlabs RPM? or where can it be downloaded?
No clue.

Martin Iturbide

  • OS2World NewsMaster
  • Global Moderator
  • Hero Member
  • *****
  • Thank You
  • -Given: 319
  • -Receive: 60
  • Posts: 2072
  • Your Friend Wil Declares...
    • View Profile
    • Martin's Personal Blog
Re: Compiling my first WPS application
« Reply #12 on: December 08, 2018, 05:37:18 pm »
Where can I get "emxupd.exe". By any chance it is on the netlabs RPM? or where can it be downloaded?

I found it on the emxrt-devel (netlabs RPM) but can not be installed since there is some conflict with other package, so I installed the file manually.

« Last Edit: December 08, 2018, 06:15:11 pm by Martin Iturbide »
Martin Iturbide
OS2World NewsMaster
... just share the dream.

Martin Iturbide

  • OS2World NewsMaster
  • Global Moderator
  • Hero Member
  • *****
  • Thank You
  • -Given: 319
  • -Receive: 60
  • Posts: 2072
  • Your Friend Wil Declares...
    • View Profile
    • Martin's Personal Blog
Re: Compiling my first WPS application
« Reply #13 on: December 08, 2018, 06:46:01 pm »
Hi

So, once I installed the OS2TK45, icc.exe compiler and fixpack 2 I tried to run the make file.

I run "nmake" on the directory where I downloaded the HWman files. I'm attaching the errors I got.
I'm running it from "Command line" environment from the installed "IBM C / C++  Compiler" icon.

It seems that I'm missing RMCALLS.H, Is that on the OS/2 Device Driver Kit, right?

Regards
« Last Edit: December 08, 2018, 06:49:24 pm by Martin Iturbide »
Martin Iturbide
OS2World NewsMaster
... just share the dream.

Dave Yeo

  • Hero Member
  • *****
  • Thank You
  • -Given: 9
  • -Receive: 112
  • Posts: 1644
    • View Profile
Re: Compiling my first WPS application
« Reply #14 on: December 08, 2018, 06:54:34 pm »
It seems that I'm missing RMCALLS.H, Is that on the OS/2 Device Driver Kit, right?

Yes, I have it in DDK\base\h and it includes rmbase.h and rmioctl.h and they may include more so you need enough of the DDK to have this.