home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / lang / cplus / 11499 < prev    next >
Encoding:
Text File  |  1992-07-25  |  1.5 KB  |  39 lines

  1. Newsgroups: comp.lang.c++
  2. Path: sparky!uunet!destroyer!sol.ctr.columbia.edu!The-Star.honeywell.com!umn.edu!news
  3. From: teb@dendron.forestry.umn.edu (Thomas E. Burk)
  4. Subject: BORLAND C++ w/ObjWin -- linker error with global variables
  5. Message-ID: <1992Jul24.223801.8065@news2.cis.umn.edu>
  6. Keywords: BORLAND LINKER
  7. Sender: news@news2.cis.umn.edu (Usenet News Administration)
  8. Nntp-Posting-Host: dendron.forestry.umn.edu
  9. Reply-To: teb@dendron.forestry.umn.edu (Thomas E. Burk)
  10. Organization: University of Minnesota
  11. Date: Fri, 24 Jul 1992 22:38:01 GMT
  12. Lines: 25
  13.  
  14. I declared several variables and functions globally with Borland C++ with
  15. ObjectWindows.  Using the small memory model option, I receieved a message
  16. from the linker saying segment_TEXT exceeded 64K.  My Windows C++ application
  17. did compile successfully but failed to link because of a segmentation fault.
  18.  
  19. To resolve that, I attempted to declare a global pointer to a class that
  20. encapsulated all the 'global' variables and functions.  The application
  21. linked successfully under the large memory model but failed upon execution with
  22. a "general protection fault" error before the global pointer was constructed.
  23.  
  24. How can I fix this problem?  Perhaps by declaring the global pointer as a far
  25. pointer?  How about increasing the stack/heap size and coercing the variables
  26. and pointers to be placed in the heap?
  27.  
  28.  
  29. Man V. Nguyen
  30. University of Minnesota
  31. Internet: mnguyen@mercury.forestry.umn.edu 
  32.  
  33. --
  34. Thomas E. Burk
  35. University of Minnesota
  36. Internet: teb@dendron.forestry.umn.edu
  37. BITNet: teburk@umnacvx.bitnet
  38. USFS DG: t.burk:x400
  39.