ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Qt5 & ROS: colcon build sometimes fails with "File (source) cannot be opened: "set""": No such file or directory [C:\dev\ros2\build\ros2gui\publisher.vcxproj]"

asked 2019-03-02 04:49:39 -0600

uPrizZ gravatar image

updated 2019-03-14 07:51:12 -0600

Hey folks,

I have the strange issue, that (only sometimes!) colcon build Fails with the above stated error. This is no strerr output though, I got it from stdout_sterr.log ! (otherwise it only Fails to build with Code 1, no error message).

What is strange is, that sometimes it will build, and then without even changing the source code or anything it will succeed the next time. Does someone know what can cause this? Btw, "ros2gui" is my own package that I created…

Do I need to delete anything before building, to get a "clean" environment and update everything properly?

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

answered 2019-03-14 07:37:23 -0600

uPrizZ gravatar image

updated 2019-03-14 07:44:41 -0600

Answer was to change some entries in the CMakeLists.txt. Here is what I changed:

I removed this part (which was unnecessary though I think):

set (CMAKE_CXX_STANDARD 14)
if(NOT WIN32)
 set(CMAKE_CXX_FLAGS “${CMAKE_CXX_FLAGS} -std=c++14 -Wall -Wextra -fPIC”)
endif()
IF (NOT DEFINED BUILD_VERSION)
 SET(BUILD_VERSION “not set”)
ENDIF()
ADD_DEFINITIONS(-DBUILD_VERSION=”${BUILD_VERSION}”)

And added the .ui files to my source list (which I think is what solved the problem). So if you have a Qt5 project with GUI make sure to also add the ui files!

set(PUBLISHER_SOURCE
    src_publisher/main.cpp
    src_publisher/publishergui.cpp
    src_publisher/publishergui.ui      # added this line
    src_publisher/Talker.cpp
)
edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2019-03-02 04:49:39 -0600

Seen: 1,285 times

Last updated: Mar 14 '19