TIP: Click on subject to list as thread! ANSI
echo: os2prog
to: All
from: Ruud Senden
date: 1994-11-25 05:06:20
subject: IBM C/C++ Tools and EMX

We use UNIX at the university, but I'm using OS/2 at home. 
Now I want to run some of the programs we use at the university at home and
I want to develop UNIX-programs at home. 

Since the C source is often available, it is possible to recompile this
code with EMX.

But since I have the IBM C/C++ Tools v2.01, I want to use this compiler to
recompile the UNIX-programs.
I have installed the EMX include- and libraryfiles (created by OMFLIB.CMD). 
I then added a headerfile with the following lines:
   #define __const__  const
   #define __inline__ 
to reflect the IBM C/C++ notation of const. (I tried to do this for
__inline__ too, but this didn't work, so it's empty).

With this I can compile at least some of the sample programs from
EMXAMPLE.ZIP (GRAPH.C, SIEVE.C and SORT.C compile allright) (I only looked
at GRPAH.C yet). I think I can make the other programs to compile by adding
a few more defines (does anybody who has tried this before know which
defines?)

One of the problems I've come across is that sometimes there appears an
__attribute__ keyword, like in 
void abort (void) __attribute__ ((noreturn));  (in STDLIB.H)
I don't know how to handle this. But when I remove the __attribute__-part,
the program compiles allright.

The major problem so far is when linking the program. I don't know which
libraries to use, and since there are so many libraries, I have to specify
them all on the command line.
With all combinations I have tried I get multiply-defined symbols (when not
specifying the /Gn+ option) and unresolved externals.

Does anybody know which libraries to use and is it possible to create one
library containing the neccesary libraries, so I only have to specify one
library.

I hope somebody can help me with this.

Regards,
Ruud.

E-Mail: rsenden{at}cs.ruu.nl

--- Msgedsq/2 2.2e


* Origin: The OS/2 Based RS Point System. (2:512/4.2054)
SEEN-BY: 12/2442 54/54 620/243 624/50 632/348 640/820 690/660 711/409 410 413
SEEN-BY: 711/430 807 808 809 934 942 949 712/353 623 713/888 800/1
@PATH: 1004/2054 512/4 141/209 270/101 396/1 3615/50 229/2
@PATH: 12/2442 711/409 54/54 711/808 809 934

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.