J
junw2000
My program is about several thousands lines. It takes arguements from
the command line.
If no arguement is given, it should simply exist. Below is the
architectureof main() :
int main(int argc, char *argv[])
{
if( argc == 1 )
{
cout << "NO ARGUEMENT"<<endl;
exit(0);
}
//Other parts of the code
return 0; //LastLine
}
It also links with other libraries.
If no arguement is given on command line, it only outputs "NO
ARGUEMENT", then hangs there.
The exit(0) can not exit. Why exit(0) fails to exit from main()?
If I give correct arguements at command line, the program also hangs.
The return 0 at the LastLine can not exit, either.
The code links some C++ libraries. It only hangs on AIX systems. But
for Linux, it works fine. Why?
I find that maybe a C++ library causes the problem. What should I do?
I have to link that library. Otherwise, the linker complains
"Undefined symbols", although some symbols are not needed in my code,
but they are used in other libraries.
Thanks.
the command line.
If no arguement is given, it should simply exist. Below is the
architectureof main() :
int main(int argc, char *argv[])
{
if( argc == 1 )
{
cout << "NO ARGUEMENT"<<endl;
exit(0);
}
//Other parts of the code
return 0; //LastLine
}
It also links with other libraries.
If no arguement is given on command line, it only outputs "NO
ARGUEMENT", then hangs there.
The exit(0) can not exit. Why exit(0) fails to exit from main()?
If I give correct arguements at command line, the program also hangs.
The return 0 at the LastLine can not exit, either.
The code links some C++ libraries. It only hangs on AIX systems. But
for Linux, it works fine. Why?
I find that maybe a C++ library causes the problem. What should I do?
I have to link that library. Otherwise, the linker complains
"Undefined symbols", although some symbols are not needed in my code,
but they are used in other libraries.
Thanks.