www.digitalmars.com         C & C++   DMDScript  

c++.dos - exit problem

reply "Sławomir Sztuka" <sztuka ae.katowice.pl> writes:
I have big program. I must compile with -NS option. When I exit from main()
by exit() program hangs (_exit() works OK). When I compile with -mx and
x32.lib program works OK.

Sławek
Jan 16 2002
parent reply "Walter" <walter digitalmars.com> writes:
-NS puts each function in its own code segment. I suspect you may be using
near code pointers somewhere. -Walter

"Sławomir Sztuka" <sztuka ae.katowice.pl> wrote in message
news:a240su$1iia$1 digitaldaemon.com...
 I have big program. I must compile with -NS option. When I exit from
main()
 by exit() program hangs (_exit() works OK). When I compile with -mx and
 x32.lib program works OK.

 Sławek
Jan 16 2002
parent reply "Sławomir Sztuka" <sztuka ae.katowice.pl> writes:
I haven't near code pointers. Program works OK in Symantec 6.1 (-ml -NS
option). I work in Dos mode in Windows 98SE.


Walter <walter digitalmars.com>

 -NS puts each function in its own code segment. I suspect you may be using
 near code pointers somewhere. -Walter

 "Sławomir Sztuka" <sztuka ae.katowice.pl> wrote in message
 news:a240su$1iia$1 digitaldaemon.com...
 I have big program. I must compile with -NS option. When I exit from
main()
 by exit() program hangs (_exit() works OK). When I compile with -mx and
 x32.lib program works OK.

 Sławek
Jan 17 2002
parent "Walter" <walter digitalmars.com> writes:
Try using the debugger from SC 6.1 to see why it's hanging. I have no
idea. -Walter

"Sławomir Sztuka" <sztuka ae.katowice.pl> wrote in message
news:a28hp3$1fsd$1 digitaldaemon.com...
 I haven't near code pointers. Program works OK in Symantec 6.1 (-ml -NS
 option). I work in Dos mode in Windows 98SE.


 Walter <walter digitalmars.com>

 -NS puts each function in its own code segment. I suspect you may be
using
 near code pointers somewhere. -Walter

 "Sławomir Sztuka" <sztuka ae.katowice.pl> wrote in message
 news:a240su$1iia$1 digitaldaemon.com...
 I have big program. I must compile with -NS option. When I exit from
main()
 by exit() program hangs (_exit() works OK). When I compile with -mx
and
 x32.lib program works OK.

 Sławek
Jan 17 2002