解决:Qt中启动错误,msg如下:The process could not be started!

本文解决了 Qt Creator 中无法启动程序的问题,提供了两种方法:一是清理项目并重新生成配置文件;二是修改 .pro 文件来指定正确的编译目录。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

问题描述:

程序无法通过 creator 运行,一直提示 The process could not be started! 错误,但直接双击可执行文件可以运行。


方法1:

I managed to fix it by:

erase all make files and debug files and also the .pro file (I had to save the configuration of this .pro) also the ".project"
well i erase almost everything except my ".cpp" and .h" files

then

Use command line : "qmake -project" to recreate the .pro file

and rebuild everthing inside qt creator
which remade all make file and other stuff.

and it is working now. and it is now calling the right directory /debug for the .exe

 

 

方法2:(不一定可行)

解决办法:在程序 pro 文件中贴入下列代码

debug {
     DESTDIR=./debug
     LIBS += -L./debug
} else:release {
     DESTDIR=./release
     LIBS += -L./release
}

[gzserver-2] This version of Gazebo, now called Gazebo classic, reaches end-of-life [gzserver-2] in January 2025. Users are highly encouraged to migrate to the new Gazebo [gzserver-2] using our migration guides (https://gazebosim.org/docs/latest/gazebo_classic_migration?utm_source=gazebo_ros_pkgs&utm_medium=cli) [gzserver-2] [gzserver-2] [DEBUG] [launch.launch_context]: emitting event synchronously: 'launch.events.process.ProcessStderr' [DEBUG] [launch]: processing event: '<launch.events.process.process_stderr.ProcessStderr object at 0x70f46d170ca0>' [DEBUG] [launch]: processing event: '<launch.events.process.process_stderr.ProcessStderr object at 0x70f46d170ca0>' ✓ '<launch.event_handlers.on_process_io.OnProcessIO object at 0x70f46d517d30>' [spawn_entity.py-4] [INFO] [1753674989.058932200] [spawn_entity]: Spawn Entity started [DEBUG] [launch.launch_context]: emitting event synchronously: 'launch.events.process.ProcessStderr' [DEBUG] [launch]: processing event: '<launch.events.process.process_stderr.ProcessStderr object at 0x70f46d16bbe0>' [DEBUG] [launch]: processing event: '<launch.events.process.process_stderr.ProcessStderr object at 0x70f46d16bbe0>' ✓ '<launch.event_handlers.on_process_io.OnProcessIO object at 0x70f46d517d30>' [spawn_entity.py-4] [INFO] [1753674989.059525917] [spawn_entity]: Loading entity published on topic /robot_description [DEBUG] [launch]: processing event: '<launch.events.process.process_stderr.ProcessStderr object at 0x70f46d170c10>' [DEBUG] [launch]: processing event: '<launch.events.process.process_stderr.ProcessStderr object at 0x70f46d170c10>' ✓ '<launch.event_handlers.on_process_io.OnProcessIO object at 0x70f46d517d30>' [spawn_entity.py-4] [INFO] [1753674989.061265958] [spawn_entity]: Waiting for entity xml on /robot_description [DEBUG] [launch.launch_context]: emitting event synchronously: 'launch.events.process.ProcessStderr' [DEBUG] [launch]: processing event: '<launch.events.process.process_stderr.ProcessStderr object at 0x70f46d16bbe0>' [DEBUG] [launch]: processing event: '<launch.events.process.process_stderr.ProcessStderr object at 0x70f46d16bbe0>' ✓ '<launch.event_handlers.on_process_io.OnProcessIO object at 0x70f46d517d30>' [spawn_entity.py-4] [INFO] [1753674989.074732860] [spawn_entity]: Waiting for service /spawn_entity, timeout = 30 [DEBUG] [launch.launch_context]: emitting event synchronously: 'launch.events.process.ProcessStderr' [DEBUG] [launch]: processing event: '<launch.events.process.process_stderr.ProcessStderr object at 0x70f46d16bbe0>' [DEBUG] [launch]: processing event: '<launch.events.process.process_stderr.ProcessStderr object at 0x70f46d16bbe0>' ✓ '<launch.event_handlers.on_process_io.OnProcessIO object at 0x70f46d517d30>' [spawn_entity.py-4] [INFO] [1753674989.075182701] [spawn_entity]: Waiting for service /spawn_entity [DEBUG] [launch.launch_context]: emitting event synchronously: 'launch.events.process.ProcessStderr' [DEBUG] [launch]: processing event: '<launch.events.process.process_stderr.ProcessStderr object at 0x70f46d4eb370>' [DEBUG] [launch]: processing event: '<launch.events.process.process_stderr.ProcessStderr object at 0x70f46d4eb370>' ✓ '<launch.event_handlers.on_process_io.OnProcessIO object at 0x70f46d517d30>' [spawn_entity.py-4] [INFO] [1753674989.578820856] [spawn_entity]: Calling service /spawn_entity [DEBUG] [launch.launch_context]: emitting event synchronously: 'launch.events.process.ProcessStderr' [DEBUG] [launch]: processing event: '<launch.events.process.process_stderr.ProcessStderr object at 0x70f46d4eb370>' [DEBUG] [launch]: processing event: '<launch.events.process.process_stderr.ProcessStderr object at 0x70f46d4eb370>' ✓ '<launch.event_handlers.on_process_io.OnProcessIO object at 0x70f46d0faa10>' [gzserver-2] [INFO] [1753674989.830262048] [IMU_plugin]: <initial_orientation_as_reference> is unset, using default value of false to comply with REP 145 (world as orientation reference) [DEBUG] [launch.launch_context]: emitting event synchronously: 'launch.events.process.ProcessStdout' [DEBUG] [launch.launch_context]: emitting event synchronously: 'launch.events.process.ProcessStderr' [DEBUG] [launch]: processing event: '<launch.events.process.process_stdout.ProcessStdout object at 0x70f46d4eb370>' [DEBUG] [launch]: processing event: '<launch.events.process.process_stdout.ProcessStdout object at 0x70f46d4eb370>' ✓ '<launch.event_handlers.on_process_io.OnProcessIO object at 0x70f46d172230>' [gzclient-3] [Msg] Waiting for master. [gzclient-3] [Msg] Connected to gazebo master @ http://127.0.0.1:11345 [gzclient-3] [Msg] Publicized address: 192.168.10.5 [DEBUG] [launch]: processing event: '<launch.events.process.process_stderr.ProcessStderr object at 0x70f46d170c10>' [DEBUG] [launch]: processing event: '<launch.events.process.process_stderr.ProcessStderr object at 0x70f46d170c10>' ✓ '<launch.event_handlers.on_process_io.OnProcessIO object at 0x70f46d172230>' [gzclient-3] [Wrn] [GuiIface.cc:120] Could not find the Qt platform plugin "wayland" in "" [DEBUG] [launch.launch_context]: emitting event synchronously: 'launch.events.process.ProcessStdout' [DEBUG] [launch.launch_context]: emitting event synchronously: 'launch.events.process.ProcessStderr' [DEBUG] [launch]: processing event: '<launch.events.process.process_stdout.ProcessStdout object at 0x70f46d16bbe0>' [DEBUG] [launch]: processing event: '<launch.events.process.process_stdout.ProcessStdout object at 0x70f46d16bbe0>' ✓ '<launch.event_handlers.on_process_io.OnProcessIO object at 0x70f46d0faa10>' [gzserver-2] [Msg] Waiting for master. [gzserver-2] [Msg] Connected to gazebo master @ http://127.0.0.1:11345 [gzserver-2] [Msg] Publicized address: 192.168.10.5 [gzserver-2] [Msg] Loading world file [/home/yxc/chapt6/chapt6_ws/install/fishbot_description/share/fishbot_description/world/custom_room.world] [DEBUG] [launch]: processing event: '<launch.events.process.process_stderr.ProcessStderr object at 0x70f46d170c10>' [DEBUG] [launch]: processing event: '<launch.events.process.process_stderr.ProcessStderr object at 0x70f46d170c10>' ✓ '<launch.event_handlers.on_process_io.OnProcessIO object at 0x70f46d0faa10>' [gzserver-2] [Wrn] [Event.cc:61] Warning: Deleting a connection right after creation. Make sure to save the ConnectionPtr from a Connect call [DEBUG] [launch.launch_context]: emitting event synchronously: 'launch.events.process.ProcessStderr' [DEBUG] [launch]: processing event: '<launch.events.process.process_stderr.ProcessStderr object at 0x70f46d4eb370>' [DEBUG] [launch]: processing event: '<launch.events.process.process_stderr.ProcessStderr object at 0x70f46d4eb370>' ✓ '<launch.event_handlers.on_process_io.OnProcessIO object at 0x70f46d0faa10>' [gzserver-2] [INFO] [1753674990.378487123] [depth_camera]: Publishing camera info to [/camera_sensor/camera_info] [DEBUG] [launch.launch_context]: emitting event synchronously: 'launch.events.process.ProcessStderr' [DEBUG] [launch]: processing event: '<launch.events.process.process_stderr.ProcessStderr object at 0x70f46d4eb370>' [DEBUG] [launch]: processing event: '<launch.events.process.process_stderr.ProcessStderr object at 0x70f46d4eb370>' ✓ '<launch.event_handlers.on_process_io.OnProcessIO object at 0x70f46d0faa10>' [gzserver-2] [INFO] [1753674990.378940166] [depth_camera]: Publishing depth camera info to [/camera_sensor/depth/camera_info] [gzserver-2] [INFO] [1753674990.379235333] [depth_camera]: Publishing pointcloud to [/camera_sensor/points] [DEBUG] [launch.launch_context]: emitting event synchronously: 'launch.events.process.ProcessStderr' [DEBUG] [launch]: processing event: '<launch.events.process.process_stderr.ProcessStderr object at 0x70f46d16bbe0>' [DEBUG] [launch]: processing event: '<launch.events.process.process_stderr.ProcessStderr object at 0x70f46d16bbe0>' ✓ '<launch.event_handlers.on_process_io.OnProcessIO object at 0x70f46d517d30>' [spawn_entity.py-4] [INFO] [1753674990.466041980] [spawn_entity]: Spawn status: SpawnEntity: Successfully spawned entity [fishbot] [DEBUG] [launch.launch_context]: emitting event synchronously: 'launch.events.process.ProcessStderr' [DEBUG] [launch]: processing event: '<launch.events.process.process_stderr.ProcessStderr object at 0x70f46d16bbe0>' [DEBUG] [launch]: processing event: '<launch.events.process.process_stderr.ProcessStderr object at 0x70f46d16bbe0>' ✓ '<launch.event_handlers.on_process_io.OnProcessIO object at 0x70f46d0faa10>' [gzserver-2] [INFO] [1753674990.477751490] [gazebo_ros2_control]: Loading gazebo_ros2_control plugin [DEBUG] [launch.launch_context]: emitting event synchronously: 'launch.events.process.ProcessStderr' [DEBUG] [launch]: processing event: '<launch.events.process.process_stderr.ProcessStderr object at 0x70f46d16bbe0>' [DEBUG] [launch]: processing event: '<launch.events.process.process_stderr.ProcessStderr object at 0x70f46d16bbe0>' ✓ '<launch.event_handlers.on_process_io.OnProcessIO object at 0x70f46d0faa10>' [gzserver-2] [Err] [Model.cc:1160] Exception occured in the Load function of plugin with name[gazebo_ros2_control] and filename[libgazebo_ros2_control.so]. This plugin will not run. [INFO] [spawn_entity.py-4]: process has finished cleanly [pid 6428] [DEBUG] [launch.launch_context]: emitting event: 'launch.events.process.ProcessExited' [DEBUG] [launch]: processing event: '<launch.events.process.process_exited.ProcessExited object at 0x70f46d16bbe0>' [DEBUG] [launch]: processing event: '<launch.events.process.process_exited.ProcessExited object at 0x70f46d16bbe0>' ✓ '<launch.event_handlers.on_process_exit.OnProcessExit object at 0x70f46d171e70>' [DEBUG] [launch]: processing event: '<launch.events.process.process_exited.ProcessExited object at 0x70f46d16bbe0>' ✓ '<launch.event_handlers.on_process_exit.OnProcessExit object at 0x70f46d171f90>' [DEBUG] [launch.launch_context]: emitting event synchronously: 'launch.events.process.ProcessStderr' [DEBUG] [launch]: processing event: '<launch.events.process.process_stderr.ProcessStderr object at 0x70f46d16bbe0>' [DEBUG] [launch]: processing event: '<launch.events.process.process_stderr.ProcessStderr object at 0x70f46d16bbe0>' ✓ '<launch.event_handlers.on_process_io.OnProcessIO object at 0x70f46d172230>' [gzclient-3] [Wrn] [Event.cc:61] Warning: Deleting a connection right after creation. Make sure to save the ConnectionPtr from a Connect call [DEBUG] [launch.launch_context]: emitting event synchronously: 'launch.events.process.ProcessStderr' [DEBUG] [launch]: processing event: '<launch.events.process.process_stderr.ProcessStderr object at 0x70f46d517100>' [DEBUG] [launch]: processing event: '<launch.events.process.process_stderr.ProcessStderr object at 0x70f46d517100>' ✓ '<launch.event_handlers.on_process_io.OnProcessIO object at 0x70f46d172230>' [gzclient-3] [Err] [Connection.cc:547] Connection[17] Closed during Read [gzclient-3] [Err] [TransportIface.cc:385] Unable to read from master [DEBUG] [launch.launch_context]: emitting event synchronously: 'launch.events.process.ProcessStderr' [ERROR] [gzserver-2]: process has died [pid 6424, exit code -11, cmd 'gzserver /home/yxc/chapt6/chapt6_ws/install/fishbot_description/share/fishbot_description/world/custom_room.world --verbose -slibgazebo_ros_init.so -slibgazebo_ros_factory.so -slibgazebo_ros_force_system.so']. [DEBUG] [launch.launch_context]: emitting event: 'launch.events.process.ProcessExited' [DEBUG] [launch]: processing event: '<launch.events.process.process_stderr.ProcessStderr object at 0x70f46d517100>' [DEBUG] [launch]: processing event: '<launch.events.process.process_stderr.ProcessStderr object at 0x70f46d517100>' ✓ '<launch.event_handlers.on_process_io.OnProcessIO object at 0x70f46d172230>' [gzclient-3] [Err] [GLWidget.cc:900] Unable to connect to a running Gazebo master. [DEBUG] [launch]: processing event: '<launch.events.process.process_exited.ProcessExited object at 0x70f46d169d50>' [DEBUG] [launch]: processing event: '<launch.events.process.process_exited.ProcessExited object at 0x70f46d169d50>' ✓ '<launch.event_handlers.on_process_exit.OnProcessExit object at 0x70f46d0faad0>' [gzserver-2] [gzserver-2] [DEBUG] [launch]: processing event: '<launch.events.process.process_exited.ProcessExited object at 0x70f46d169d50>' ✓ '<launch.event_handlers.on_process_exit.OnProcessExit object at 0x70f46d0fac80>' [DEBUG] [launch.launch_context]: emitting event synchronously: 'launch.events.process.ProcessStderr' [DEBUG] [launch]: processing event: '<launch.events.process.process_stderr.ProcessStderr object at 0x70f46d517100>' [DEBUG] [launch]: processing event: '<launch.events.process.process_stderr.ProcessStderr object at 0x70f46d517100>' ✓ '<launch.event_handlers.on_process_io.OnProcessIO object at 0x70f46d172230>' [gzclient-3] [Wrn] [Publisher.cc:135] Queue limit reached for topic /gazebo/default/user_camera/pose, deleting message. This warning is printed only once.
最新发布
07-29
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值