home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / os / os2 / programm / 7480 < prev    next >
Encoding:
Text File  |  1993-01-10  |  2.6 KB  |  55 lines

  1. Newsgroups: comp.os.os2.programmer
  2. Path: sparky!uunet!zaphod.mps.ohio-state.edu!cs.utexas.edu!qt.cs.utexas.edu!yale.edu!ira.uka.de!Sirius.dfn.de!olymp!news-rhrz!pib1.physik.uni-bonn.de!ESSER
  3. From: esser@pib1.physik.uni-bonn.de (bernd esser)
  4. Subject: emx 0.8f
  5. Message-ID: <1993Jan10.171853.5807@news.rhrz.uni-bonn.de>
  6. Sender: news@news.rhrz.uni-bonn.de
  7. Reply-To: esser@pib1.physik.uni-bonn.de
  8. Organization: Physikalisches Institut Uni-Bonn
  9. Date: Sun, 10 Jan 93 17:18:53 GMT
  10. Lines: 43
  11.  
  12. Hello everybody,
  13. yesterday i spent a few hours and downloaded the 0.8f version of emx from
  14. hobbes. I installed it and recompiled my 0.8e programs. I encountered some
  15. problems while doing so:
  16.  
  17.  - first of all: by mistake i deleted my Emacs executable. So i had to
  18.    dump a new version. This is not possible with the DLLs coming with
  19.    0.8f. I got an error in loadup.el (something like end of file...).
  20.    I reinstalled the DLLs from 0.8e and everything worked fine. Could this 
  21.    be an error in one of the new DLLs?
  22.  - Just at the first c++ file i tried to recompile i got a bunch of errors 
  23.    from emx/include/strings.h and emx/include/memory.h because my file included
  24.    std.h. In strings.h and memory.h there a several prototypes defined like :
  25.       void *memccpy(void *s1, const void *s2, int c, size_t n)
  26.    I had to change all occurences of s1 and s2 in these files to sa and sb 
  27.    to get them compiled. I am somewhat confused about that!
  28.  - In another c++ file i define a class with a protected member short *arr.
  29.    The constructor allocates memory : arr = new short[size];
  30.    The destructor frees this memory : delete [] arr;
  31.    With emx 0.8e (gcc 2.2.2) this worked. With the new version the program
  32.    writes a core-dump-file when executing the destructor. I had to change
  33.    the destructor to : delete arr;
  34.    Perhaps i am wrong, but i thought when i allocate memory with 
  35.    "new type[size]" i have to deallocate it with "delete []".
  36.  - After these changes my programs compiled without further error messages 
  37.    (i compiled with -Wall). But a lot of them lead to various SYSxxxx messages 
  38.    when i try to start them.
  39.  
  40. My programs are all c++, i do not use Zomf or Zmt. My configuration is:
  41.    486/50 ISA board
  42.    16  MBytes ram
  43.    120 MBytes IDE drive
  44.    ATI ULTRA PRO
  45.    OS/2 2.0, SP installed and with 8514A video-mode
  46.    background programs running: PSPM2 and MEMSTAT
  47.  
  48. Can somebody, who uses 0.8f and c++, tell me wether these problems are related
  49. with 0.8f and gcc 2.3.3? 
  50. Thanks a lot!
  51. *-----------------------------------------------*
  52. | Bernd Esser, Phys. Inst. d. Uni Bonn, Germany |
  53. | ESSER@PIB1.PHYSIK.UNI-BONN.DE                 |
  54. *-----------------------------------------------*
  55.