Article View: comp.os.os2.programmer
Article #2852Re: GNU C/C++ for OS/2
From: Aurelio Caliaro
Date: Tue, 15 Dec 1992 07:41
Date: Tue, 15 Dec 1992 07:41
36 lines
2194 bytes
2194 bytes
kevinl@tisdec.tis.tandy.com writes:
:
: When using GNU C/C++ for OS/2, I am unable to run the programs it
: produces.
:
: Everything compiles and links OK when just compiling a C program,
: but when I try to run it, OS/2 stops the program and says it
: created a problem and cannot continue.
:
: When I try to link a C++ program I get unresolved externals that
: look something like __?????__, where ? represents some character--
: some undefined constant I think.
A C++ program? C++ is a portable language -- it says. Well, it isn't! I had
several C programs that do not work on OS/2 without modifications, and mostly
there are exactly those errors of unresolved externals. Maybe you didn't link
all necessary libraries. Maybe GNU C does not support commands your program
has. If you want to port C programs from Unix, you better take EMX/GCC, because
it has been designed for this purpose (of porting from Unix). Otherwise you
must try to replace the unknown commands with others that GCC knows.
: Also, when link386 finishes, it says that the program type is not
: specified "assuming WINDOWCOMPAT." How do I specify the program type?
: I tried the /PMTYPE option, but it did not help. This is really
: secondary. I don't mind the message as long as I can get the programs
: to actually _run_.
If your programs run in an OS/2 window in character mode there is no problem.
Because this is the setting LINK386 supposes. If your application is for PM,
you must define a .def-file. See the documentation with EMX/GCC for the
settings of the definitions file.
Aurelio Caliaro
Technical Details
Message-ID:
<1992Dec15.074100.20656@ifi.unizh.ch>Path:
arc1-ca.pugleaf.net!sparky!uunet!spool.mu.edu!sdd.hp.com!cs.utexas.edu!usc!rpi!ghost.dsi.unimi.it!univ-lyon1.fr!chx400!josef!caliaroReferences:
<13100003@tisdec.tis.tandy.com>Show Full Headers
Complete Article Headers
Newsgroups: comp.os.os2.programmer Path: arc1-ca.pugleaf.net!sparky!uunet!spool.mu.edu!sdd.hp.com!cs.utexas.edu!usc!rpi!ghost.dsi.unimi.it!univ-lyon1.fr!chx400!josef!caliaro From: caliaro@avalon.physik.unizh.ch (Aurelio Caliaro) Subject: Re: GNU C/C++ for OS/2 Message-ID: <1992Dec15.074100.20656@ifi.unizh.ch> Sender: news@ifi.unizh.ch (USENET News Admin) Nntp-Posting-Host: avalon Organization: University of Zurich, Department of Computer Science X-Newsreader: Tin 1.1 PL4 References: <13100003@tisdec.tis.tandy.com> Date: Tue, 15 Dec 1992 07:41:00 GMT Lines: 36