home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!gumby!destroyer!cs.ubc.ca!unixg.ubc.ca!ochealth
- From: ochealth@unixg.ubc.ca (ochealth)
- Newsgroups: comp.os.os2.programmer
- Subject: Re: EMX link ERRORS
- Date: 18 Nov 1992 23:47:01 GMT
- Organization: University of British Columbia, Vancouver, B.C., Canada
- Lines: 48
- Message-ID: <1eekllINNmr3@iskut.ucs.ubc.ca>
- References: <tdukes.921118111315@ohm.ee.eng.auburn.edu>
- NNTP-Posting-Host: unixg.ubc.ca
-
- In article <tdukes.921118111315@ohm.ee.eng.auburn.edu> tdukes@eng.auburn.edu (Todd J Dukes) writes:
- :I am trying to make the switch to EMX from GCC/2. I read the documentation
- :that comes with EMX and am trying to make a simple program I wrote
- :when I started using GCC/2. It compiles fine, but when linking there
- :are several link errors (I believe it is all of the PM functions).
- :I have included my make file below. Does anybody have any suggestions?
- :
- :Thanks
- :Todd
- :tdukes@eng.auburn.edu
- :
-
- for OS/2 PM programming, it is probably better to use the native OS/2
- link format. In EMX 0.8e, use the flag -Zomf for all linking and compiling.
- (-Zmt is probably a good idea. It's smaller, and it is thread safe)
-
- You can use the .o format as well, but look at the file emxtest.zip
- which has various examples. (stuff with emxbind)
-
- With the .obj format you should do
-
- foo.exe: $(OBJS) foo.def foo.res
- gcc -Zomf -o foo.exe foo.def $(OBJS) etc..
- rc foo.res foo.exe
-
- foo.res: foo.rc foo.h foo.ico ....
- rc -r foo.rc
- :
- :CC=gcc
- :CFLAGS=-c -I/TOOLKT20/C/OS2H
- :
- :OBJS= stdmain.o winproc.o getfile.o process.o
- :
- :pmdraw.exe: $(OBJS) pmdraw.def pmdraw.res
- : gcc -o pmdraw.exe $(OBJS) pmdraw.def pmdraw.res -los2 -lgpp
-
- gcc (EMX) won't automatically link in .res files
- use rc for that
-
- Oh, and you are using C++ too, so make sure you have the C++ stuff
- (EMX comes puts C++ in a seperate archive file)
-
- :
- --
- ______________________________________________________________________________
- jpm: ochealth@unixg.ubc.ca
- Happily using OS/2 2.0 because MS Windows isNT ___
- Insert VapourFeature ^^^
-