Article View: gnu.gcc.help
Article #50(none)
From: bealjrkl
Date: Sun, 02 Aug 1992 15:37
Date: Sun, 02 Aug 1992 15:37
91 lines
3175 bytes
3175 bytes
To: help-gcc@prep.ai.mit.edu
Subject: How do I get GCC working with OS/2 2.0?
I have been playing around with this for a few weeks, and cannot
seem to get a program running. I *have* actually compiled a program,
and gotten a .EXE file from it, but it does not produce any output.
I am using the C++ Tutorial by Coronado Enterprises, but am only
near the beginning. What I wanted to do tonight was compile the
CONCOM.CC program included with it, to get the output they said was
generated (and to flex my GNU compiler).
The program is attached, in case you need to see it (at the end).
The commands I used were:
-------------
[D:\cptutor\source] gcc -c concom.cc
[D:\cptutor\source] collect -o concom2.s concom.obj
[D:\cptutor\source] gcc -c concom2.s
[D:\cptutor\source] link386 concom.obj concom2.obj
Operating System/2 LX (Linear Executable) Linker
Version 2.00.000 Feb 25 1992
Copyright (C) IBM Corporation 1988-1992.
Copyright (C) Microsoft Corp. 1988-1992.
All rights reserved.
Run File [concom.exe]:
List File [nul.map]:
Libraries [.lib]: libgpp
Definitions File [nul.def]:
LINK386 : warning L4071: application type not specified; assuming WINDOWCOMPAT
[D:\cptutor\source] concom
[D:\cptutor\source]
-------------
I found these on comp.os.os2.programmer, and they *do* create an
executable. It doesn't produce any output, however.
What is it that I'm doing wrong? Perhaps a flag? The linker's
warning seems to indicate that *something* may be wrong, but I can't
find documentation anywhere. Is my problem even *with* GCC?
advTHANKSance for any assistance!
Kenneth L. Beal, Jr. bealjrkl@craft.camp.clarkson.edu
program listing follows:
---CUT HERE---
// Chapter 1 - Program 1
#include <iostream.h> /* This is the stream definition file */
void print_it(const int data_value);
main()
{
const int START = 3; // The value of START cannot be changed
const int STOP = 9; // The value of STOP cannot be changed
volatile int CENTER = 6; /* The value of CENTER may be changed
by something external to this
program. */
int index; /* A normal C variable */
for (index = START ; index < STOP ; index++)
print_it(index);
} /* End of program */
void print_it(const int data_value)
{
cout << "The value of the index is " << data_value << "\n";
}
// Result of execution
//
// The value of the index is 3
// The value of the index is 4
// The value of the index is 5
// The value of the index is 6
// The value of the index is 7
// The value of the index is 8
Technical Details
Message-ID:
<9208022337.AA32078@craft.camp.clarkson.edu>Path:
arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!craft.camp.clarkson.edu!bealjrklShow Full Headers
Complete Article Headers
Newsgroups: gnu.gcc.help Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!craft.camp.clarkson.edu!bealjrkl From: bealjrkl@craft.camp.clarkson.edu Subject: (none) Message-ID: <9208022337.AA32078@craft.camp.clarkson.edu> Sender: daemon@cis.ohio-state.edu Organization: GNUs Not Usenet Distribution: gnu Date: Sun, 2 Aug 1992 15:37:20 GMT Lines: 92