简体   繁体   English

从Eclipse IDE运行可以正常运行,但是从终端运行时终止

[英]Run from eclipse IDE works fine but terminates when run from terminal

I'm using eclipse CDT in linux. 我在Linux中使用Eclipse CDT。 I have a code that uses threads, TCP, files etc. This program runs fine in the Eclipse IDE but when I try to run this from the linux terminal, the program gets terminated in between. 我有一个使用线程,TCP,文件等的代码。该程序在Eclipse IDE中运行良好,但是当我尝试从linux终端运行该程序时,该程序将在两者之间终止。 There is no error message shown. 没有显示错误消息。 Can someone help me? 有人能帮我吗?

I found the problem I was facing. 我发现了我面临的问题。 One of my thread was trying to send through TCP before connection. 我的线程之一是尝试在连接之前通过TCP发送。 I still don't know why it had no issues while running in IDE. 我仍然不知道为什么在IDE中运行时它没有问题。 Now it works fine after i modified my code to use TCP only after connection has been established. 现在,在我修改代码以仅在建立连接后才使用TCP之后,它可以正常工作。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 使用sublime-build时无法运行C ++程序,从终端运行时可以正常工作 - Cannot run C++ program when using sublime-build, works fine when running from terminal 从WebAPI项目运行静态类时出现StackOverflow异常-从控制台应用程序运行时运行正常 - StackOverflow exception when running static class from a WebAPI project - works fine when run from a console application 没有来自wxWidget应用程序的cout,但是使用Eclipse它可以正常工作 - No cout from wxWidget application, but with Eclipse it works fine 从IDE运行时,程序找不到图像目录,但是从文件夹运行时,程序可以找到图像目录吗? - Program cannot find image directory when run from IDE, but CAN when run from folder? 从Eclipse启动时,OpenCV C ++应用程序立即终止 - OpenCV C++ app terminates immediately when launched from Eclipse C ++代码仅在从终端运行程序时执行 - C++ Code Executes Only When the Program Is Run From The Terminal 使用execlp运行时,g ++会出现错误,但不能从终端运行吗? - g++ comes up with errors when run with execlp, but not from the terminal? 如何从命令行运行Eclipse IDE for C / C ++(我已经安装了它) - How do you run Eclipse IDE for C/C++ from the command line (I already installed it) 从Xcode生成的应用程序运行良好,不会直接从.app运行 - Application runs fine when built from Xcode, won't run directly from the .app Tensorflow Session.Run在Android设备上运行时给出空的输出张量,但在Ubuntu上运行时工作正常 - Tensorflow Session.Run gives empty Output tensor when run on Android device but works fine when run on Ubuntu
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM