OS/2, eCS & ArcaOS - Technical > Programming

Compiling a PM sample with GCC

<< < (16/16)

Dave Yeo:
SET INCLUDE=%UNIXROOT%/usr/include;%INCLUDE% works here. Remember that rc etc are Dosish programs and don't understand things like @unixroot. Ideally the directory separators should be \ but / seems OK.

Dave Yeo:
As an alternative, could add the include to the makefile in the walker.res rule,

--- Code: ---rc -r -i %%UNIXROOT%%\usr\include walker.rc
--- End code ---

Seems that the % needs doubled up, escape character?

Martin Iturbide:

--- Quote from: Dave Yeo on July 04, 2022, 06:32:43 am ---As an alternative, could add the include to the makefile in the walker.res rule,

--- Code: ---rc -r -i %%UNIXROOT%%\usr\include walker.rc
--- End code ---

Seems that the % needs doubled up, escape character?

--- End quote ---

There was no luck with me with this change. I get this error:


--- Code: ---[E:\PROJECTS\SAMPLEPACK\PMWALKER]make   2>&1  | tee make.out
gcc -Wall -Zomf -c -O2 walker.c -o walker.obj
rc -r -i %%UNIXROOT%%\usr\include 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 ---

Dave Yeo:
I did the change for nmake. Make might work using cmd.exe as the shell. SET MAKESHELL=cmd.exe or use /@unixroot/usr/include with sh.exe as the shell.

Lars:
At least nmake.exe treats all environment variables as makefile variables (unless you suppress this via a commandline switch).
Therefore, you can do this (from an nmake makefile):

rc -r -i $(UNIXROOT)\usr\include walker.rc

Maybe the same thing works for make.exe.

Navigation

[0] Message Index

[*] Previous page

Go to full version