OS/2, eCS & ArcaOS - Technical > Programming

Compiling Tolower tool

<< < (2/3) > >>

Martin Iturbide:
Hi

I produced the 1.1 release. It is not much but I least I can say now that I have compiled something for OS/2 :)
https://github.com/OS2World/UTIL-DISK-ToLower|

Regards

Martin Iturbide:
Hi

Even that it compiles with icc, I still want to try to compile it with gcc.

I still get this error:

--- Quote ---[E:\projects\tolower1]gcc -Zomf tolower.c
tolower.c:13:12: fatal error: os2.h: No such file or directory
   13 |   #include <os2.h>
      |            ^~~~~~~
compilation terminated.

--- End quote ---

I think I may have something wrong on the config.sys.  Or may it be better to have a separate SETENV.CMD file?

Regards

Dave Yeo:
Try

--- Code: ---gcc -Ic:/usr/include -Zomf tolower.c

--- End code ---

GCC should be hard coded to search @unixroot/usr/include. Also of course make sure that c:\usr\include\os2.h exists.
I'll think on a skeleton, might be something in the examples of icc or OW.

Andi B.:
I've 'SET C_INCLUDE_PATH=P:\usr\include;....' in my config.sys for gcc

Ian Manners:
This is the os2.h I use with watcom C


--- Code: ---/*static char *SCCSID = "@(#)os2.h      6.6 92/03/15";*/
/****************************** Module Header ******************************\
*                                                                          *
* Copyright (c) 1987  - 1992 IBM Corporation                               *
*                                                                          *
* Module Name: OS2.H                                                       *
*                                                                          *
* This is the top level include file that includes all the files necessary *
* for writing an OS/2 application.                                         *
*                                                                          *
\***************************************************************************/

#ifndef __OS2_H__

/* NOINC */
#if __IBMC__ || __IBMCPP__
   #pragma info( none )
      #ifndef __CHKHDR__
         #pragma info( none )
      #endif
   #pragma info( restore )
#endif
#ifdef __cplusplus
      extern "C" {
#endif

#define __OS2_H__
/* INC */

#define OS2_INCLUDED

/* Common definitions */
#include <os2def.h>

/* OS/2 Base Include File */
#ifndef INCL_NOBASEAPI
   #include <bse.h>
#endif /* INCL_NOBASEAPI */

/* OS/2 Presentation Manager Include File */
#ifndef INCL_NOPMAPI
   #include <pm.h>
#endif /* INCL_NOPMAPI */

/* NOINC */
/* Open Scripting Architecture (OSA) Include File */
#ifdef INCL_OSAAPI
   #include <osa.h>
#endif /* INCL_OSAAPI */

#ifdef __cplusplus
        }
#endif
#if __IBMC__ || __IBMCPP__
   #pragma info( none )
      #ifndef __CHKHDR__
         #pragma info( restore )
      #endif
   #pragma info( restore )
#endif

/* OpenDoc for OS/2 Include File */
#ifdef __cplusplus
#ifdef INCL_ODAPI
   #include <od.h>
#endif /* INCL_ODAPI */
#endif
/* INC */

#endif /* __OS2__ */

--- End code ---

As an example.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version