Publicado em Programação, Qt

How to build the QSerialPort module using Qt5 (Windows 7)

Although the essential is explained here, i will write a short version of “how to build the QSerialPort module on Windows 7”  (this seem to be changing very fast).

This module allows easy access to comunication between devices using a serial port.

I will assume tha Qt 5 is installed according to this description: http://gracianotorrao.com/2013/04/10/como-instalar-o-qt-em-windows-7/

#1 – Get the source code

Access the following URI: http://qt-project.org/wiki/QtSerialPort and search for the download link or click  here.

Note that, in my case, the download was made to this folder C:\Users\Admin\Transferências.

#2 – Create a file structure for building

In the download folder, create a build folder named qt-qtserialport-build, in order not to change the content of the sources.

After that, we have something like this:

pastas

#3 – Build the module

After opening  the console (run cmd.exe as administrator) go to the qt-qtserialport-build directory.

Then, once again, as administrator, type:

qmake ../qt-qtserialport/qtserialport.pro

mingw32-make

mingw32-make install

Note: You must have perl installed.

erroperl

If this error happens, try downloading a 32 bits version, install it and reboot. Then, try the same steps.
Download Strawberry Perl 5.16.3.1 (32bit)

#4 – Test with a small example

You can use this one:  QSerialPort – Como identificar um dispositivo de comunicação série

Anúncios

Deixe uma Resposta

Preencha os seus detalhes abaixo ou clique num ícone para iniciar sessão:

Logótipo da WordPress.com

Está a comentar usando a sua conta WordPress.com Terminar Sessão / Alterar )

Imagem do Twitter

Está a comentar usando a sua conta Twitter Terminar Sessão / Alterar )

Facebook photo

Está a comentar usando a sua conta Facebook Terminar Sessão / Alterar )

Google+ photo

Está a comentar usando a sua conta Google+ Terminar Sessão / Alterar )

Connecting to %s