Patrick, I'm looking into single-segment C++ development and was wondering if things have gone well for you since posting your last message or if you've ran into additional problems. I tried a simple single-segment C++ app and immediately ran into the problem you discussed -- thanks for the information on how you solved it. But I'm curious that if I went down this road would I run into other "gotchas".
Greg "Patrick" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > Hi, > Well, I can get around this problem by not including the MSL Runtime Palm OS > (2i).lib in my project. However, to do this I have implemented my own > "operator new" and "operator delete" functions where the operator new > function(s) do not throw bad_alloc. My code does not catch new exceptions > but instead tests for NULL being returned so I figured that this was OK. > > Anyway, I could not find the "... has illegal single segment 32-bit > reference to ..." linker error message documented in the CodeWarrior help. > Does anyone know what this message means (i.e. why is it illegal)? > > Thanks for any help! > > Patrick wrote in message <[EMAIL PROTECTED]>... > > > >Hi, > >I am having a problem building a C++ shared library. The shared library > >is a single segment, using the small code model and has 38K of code and 5K > >of data. I link with the MSL Runtime Palm OS (2i).lib and am using Code > >Warrior R5. I am using the techniques of Ken Krugler to share library > >globals. Upon linking, I get the following link error messages: > > > >Link Error : NewMore.cp: 'std::bad_alloc::__vt' has illegal single > segment > >32-bit reference to 'std::bad_alloc::~bad_alloc()'. > >Link Error : NewMore.cp: 'std::bad_alloc::__vt' has illegal single > segment > >32-bit reference to 'std::bad_alloc::what() const'. > >... > >Link Error : NMWException.cp: 'std::uhandler' has illegal single segment > >32-bit reference to 'std::duhandler()'. > >Link Error : NMWException.cp: 'std::thandler' has illegal single segment > >32-bit reference to 'std::dthandler()'. > >... > >Link Error : Exception68K.cp: 'std::exception::__vt' has illegal single > >segment 32-bit reference to 'std::exception::~exception()'. > >... > >Link Error : __RuntimeModule__: '__segtable__' has illegal single segment > >32-bit reference to '__DummyStartup__'. > >... > > > >The problem does not go away if I move the "MSL Runtime Palm OS (2i).lib > >to different parts of my segment. If I remove a bunch of code from the > >shared > >library, the problem goes away but I really would prefer to have close to > >64K of code/data in the shared library, Does anyone know of a solution to > >this > >problem? > > > >Thanks for any help! > > > > > > > > > > > > > > > > -- For information on using the ACCESS Developer Forums, or to unsubscribe, please see http://www.access-company.com/developers/forums/
