Skip to content

Conversation

@ahcorde
Copy link
Contributor

@ahcorde ahcorde commented Nov 18, 2019

I was getting this error when I was trying to execute turtlesim_node

qt.qpa.plugin: Could not find the Qt platform plugin "windows" in ""
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Fixed when QT_QPA_PLATFORM_PLUGIN_PATH is set

Copy link
Contributor

@clalancette clalancette left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've a question about MSVC 2017 vs. 2019.


.. code-block:: bash
set QT_QPA_PLATFORM_PLUGIN_PATH=C:\Qt\5.12.2\msvc2017_64\plugins\platforms
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this really correct? On Eloquent we are using MSVC2019, I would expect that to be reflected in this environment variable.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this question is still open.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe that 2017 forward is ABI compatible, so it may be that QT is only releasing for the lower supported version.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, interesting. I really thought that wasn't the case. OK, in that case, this is fine.

set QT_QPA_PLATFORM_PLUGIN_PATH=C:\Qt\5.12.2\msvc2017_64\plugins\platforms
You can also do this by clicking the Windows icon, typing "Environment Variables", then clicking on "Edit the system environment variables". In the resulting dialog, click "Environment Variables", the click "Path" on the bottom pane, then click "Edit" and add the path).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that there is a simpler instruction to make this permanent, which is to run setx -m QT_QPA_PLATFORM_PLUGIN_PATH C:\Qt\5.12.2\msvc2017_64\plugins\platforms.

@ahcorde ahcorde merged commit 6dc98fd into ros2:master Dec 13, 2019
@ahcorde ahcorde deleted the ahcorde/qt_envs branch December 13, 2019 19:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants