home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / os / os2 / programm / 4774 < prev    next >
Encoding:
Internet Message Format  |  1992-09-08  |  1.3 KB

  1. Path: sparky!uunet!ogicse!news.u.washington.edu!dirac!ying
  2. From: ying@dirac.phys.washington.edu (Shuqian Ying)
  3. Newsgroups: comp.os.os2.programmer
  4. Subject: Help needed on putting a *.o file in a library *.a file
  5. Keywords: DOS, EMX, GCC, AS
  6. Message-ID: <ying.715818155@dirac>
  7. Date: 6 Sep 92 22:22:35 GMT
  8. Article-I.D.: dirac.ying.715818155
  9. Sender: news@u.washington.edu (USENET News System)
  10. Organization: University of Washington
  11. Lines: 25
  12.  
  13.  
  14.     I installed the gnu-c2.1 (emx) few weeks ago under MSDOS. It works great
  15. in doing large (relatively, I must say) numerical computation with a speed
  16. comparable to vax workstations. However I have a problem puting some of the 
  17. *.o files compiled from *.s files using 'as'. The following is what I did
  18. (for example, I shall compile pow.s and put it into libc.a)
  19.  
  20. as -o pow.o pow.s
  21. ar dv libc.a __.SYMDEF
  22. ar rv libc.a pow.o
  23. ar sv libc.a
  24.  
  25. Then, I used the following command to compile myprogram.c, which calls
  26. pow(x,y)
  27.  
  28. gcc -o -O2 myprogram.exe myprogram.c
  29.  
  30. The compiler would complain that all of the variables defined in pow.s
  31. are undefined. (For your reference they are cw1,cw2,int_exponent,x,y.)
  32.  
  33. Could any one give me some suggestions what should I do to correct that?
  34. I appreciate you help.
  35.  
  36. P.S. I am sorry that I post a question not related to OS2, but it seems
  37. that this is THE group where people really discuss gnu-c(emx).
  38.