home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / os / os2 / programm / 7023 < prev    next >
Encoding:
Text File  |  1992-12-15  |  2.1 KB  |  50 lines

  1. Newsgroups: comp.os.os2.programmer
  2. Path: sparky!uunet!spool.mu.edu!sdd.hp.com!cs.utexas.edu!usc!rpi!ghost.dsi.unimi.it!univ-lyon1.fr!chx400!josef!caliaro
  3. From: caliaro@avalon.physik.unizh.ch (Aurelio Caliaro)
  4. Subject: Re: GNU C/C++ for OS/2
  5. Message-ID: <1992Dec15.074100.20656@ifi.unizh.ch>
  6. Sender: news@ifi.unizh.ch (USENET News Admin)
  7. Nntp-Posting-Host: avalon
  8. Organization: University of Zurich, Department of Computer Science
  9. X-Newsreader: Tin 1.1 PL4
  10. References: <13100003@tisdec.tis.tandy.com>
  11. Date: Tue, 15 Dec 1992 07:41:00 GMT
  12. Lines: 36
  13.  
  14. kevinl@tisdec.tis.tandy.com writes:
  15. : When using GNU C/C++ for OS/2, I am unable to run the programs it
  16. : produces.
  17. : Everything compiles and links OK when just compiling a C program,
  18. : but when I try to run it, OS/2 stops the program and says it
  19. : created a problem and cannot continue.
  20. : When I try to link a C++ program I get unresolved externals that
  21. : look something like __?????__, where ? represents some character--
  22. : some undefined constant I think.
  23.  
  24. A C++ program? C++ is a portable language -- it says. Well, it isn't! I had
  25. several C programs that do not work on OS/2 without modifications, and mostly
  26. there are exactly those errors of unresolved externals. Maybe you didn't link
  27. all necessary libraries. Maybe GNU C does not support commands your program
  28. has. If you want to port C programs from Unix, you better take EMX/GCC, because
  29. it has been designed for this purpose (of porting from Unix). Otherwise you
  30. must try to replace the unknown commands with others that GCC knows.
  31.  
  32.  
  33. : Also, when link386 finishes, it says that the program type is not
  34. : specified "assuming WINDOWCOMPAT."  How do I specify the program type?
  35. : I tried the /PMTYPE option, but it did not help.  This is really
  36. : secondary.  I don't mind the message as long as I can get the programs
  37. : to actually _run_.
  38.  
  39.  
  40. If your programs run in an OS/2 window in character mode there is no problem.
  41. Because this is the setting LINK386 supposes. If your application is for PM,
  42. you must define a .def-file. See the documentation with EMX/GCC for the
  43. settings of the definitions file.
  44.  
  45.  
  46.            Aurelio Caliaro
  47.