OS/2, eCS & ArcaOS - Technical > Programming
Compiling a PM sample with GCC
Dave Yeo:
Simplest is to just use the recommended linker for GCC, namely wlink. Ilink 5 was only licensed to compile Mozilla, not sure if that changed for eCS and/or ArcaOS and we have the source and a maintainer for wlink.
Could also use ld, remove all the -Zomf and change the .obj to .o and it will compile without the warning.
In theory you could also pass an argument to ilink using something like -Zlinker /PMtype but I'm too lazy to figure out the exact argument.
Martin Iturbide:
Ok. I think I need to try using wlink, since I want to stick with open source as much as possible.
which RPM package has wlink? Is it wlink.exe or wl.exe ?
- "wacom-wlink-hll" ??
- "gcc-wlink" just have a dummy .txt file.
Regards
Dave Yeo:
--- Quote from: Martin Iturbide on July 01, 2022, 04:04:23 am ---Ok. I think I need to try using wlink, since I want to stick with open source as much as possible.
which RPM package has wlink? Is it wlink.exe or wl.exe ?
- "wacom-wlink-hll" ??
- "gcc-wlink" just have a dummy .txt file.
Regards
--- End quote ---
Ideally you need both, watcom-wlink-hll gives you wl.exe and gcc-wlink edits config.sys. Current OpenWatcom's wlink.exe is now the same as wl.exe, though that is fairly recent IIRC and not in 1.9. Also beware of the OpenWatcom fork on Github, it was forked a while back and its aim is 64bit support and doesn't have any recent OS/2 fixes.
If you want to edit config.sys yourself or use a cmd file, run emxomfld with no arguments to get the Environment variables you need.
Martin Iturbide:
Hi Dave
--- Quote from: Dave Yeo on July 01, 2022, 06:09:56 am ---Ideally you need both, watcom-wlink-hll gives you wl.exe and gcc-wlink edits config.sys. Current OpenWatcom's wlink.exe is now the same as wl.exe, though that is fairly recent IIRC and not in 1.9. Also beware of the OpenWatcom fork on Github, it was forked a while back and its aim is 64bit support and doesn't have any recent OS/2 fixes.
If you want to edit config.sys yourself or use a cmd file, run emxomfld with no arguments to get the Environment variables you need.
--- End quote ---
I installed both packages (wacom-wlink-hll and gcc-wlink), just in case I don't have wlink.exe, just wl.exe. I guess this is fine.
The config.sys now has:
--- Quote ---SET EMXOMFLD_LINKER=wl.exe
SET EMXOMFLD_TYPE=WLINK
--- End quote ---
Ilink is now gone of my system, I had rebooted and the bitcat and PMHELLO samples are compiling fine. I guess wl.exe is working fine for the moment here. I got no warning on PMHELLO. I think I'm done with that sample and I will upload it at hobbes too, but if there is any suggestion for the sample please let me know.
Regards
Martin Iturbide:
Hi
Now I want to try to find the source of the issue on why rc.exe and wrc.exe tells me it can not find OS2.H.
I'm returning to the PMWalker sample, since it uses RC.exe.
1) First I search on the different drives to see if there is a duplicated rc.exe somewhere. I was not able to find it.
2) I added:
--- Code: --- SET C_INCLUDE_PATH=/@unixroot/usr/include;%C_INCLUDE_PATH%
SET INCLUDE=@unixroot/usr/include;%INCLUDE%
make 2>&1 |tee make.out
--- End code ---
I get the same error as always:
--- Code: ---gcc -Wall -Zomf -c -O2 walker.c -o walker.obj
rc -r walker.rc
fatal error C1015: cannot open include file 'os2.h'
Operating System/2 Resource Compiler
Version 4.00.011 Oct 10 2000
(C) Copyright IBM Corporation 1988-2000
(C) Copyright Microsoft Corp. 1985-2000
All rights reserved.
Creating binary resource file walker.RES
RC: RCPP -E -D RC_INVOKED -W4 -f walker.rc -ef C:\OS2\RCPP.ERR -I @unixroot/usr/include
make: *** [walker.res] Error 3
--- End code ---
3) If I change the makefile to wrc.exe I also get:
--- Code: ---wrc -r walker.rc
Open Watcom Windows and OS/2 Resource Compiler Version 2.0beta1 LA
Portions Copyright (c) 1993-2002 Sybase, Inc. All Rights Reserved.
Source code is available under the Sybase Open Watcom Public License.
See http://www.openwatcom.org/ for details.
walker.rc(2): Error! E062: Unable to open 'os2.h'
make: *** [walker.res] Error 9
--- End code ---
4) OS2.H is located in my C drive:
--- Quote ---[C:\]dir os2.h /s
The volume label in drive C is ARCAOS.
The Volume Serial Number is 6CE8:A5BF.
Directory of C:\usr\include
8-26-21 9:13a 723 124 a--- os2.h
1 file(s) 723 bytes used
Total files listed:
1 file(s) 723 bytes used
41,062,080 K bytes free
--- End quote ---
Any other suggestions?
Regards
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version