You are here

How do I compile the VESC Tool?

5 posts / 0 new
Last post
ipbyrne
Offline
Last seen: 4 years 8 months ago
Joined: 2019-07-24 16:34
Posts: 5
How do I compile the VESC Tool?

Hello,

 

I have just cloned the git repo for the VESC tool but I can't for the life of me find any documentation anywhere on how to actually compile it so I can run it.

 

Working on a windows 10 machine.

 

Please help!

kinzma
Offline
Last seen: 7 hours 48 min ago
VESC Free
Joined: 2017-10-06 10:19
Posts: 9

its actually kind of a hassle to do using windows as there are some c99 style arrays that need replacing as well as M_PI being undefined in a few places using the default compiler set up by qt creator when installing the qtsdk bundle for windows. Its a bit easier using linux (https://vesc-project.com/node/310) -for instance in a vm using virtualbox -  you can then use MXE to cross compile and get the windows executable.This sounds like a lot of effort but I found it to be the better road to go then to use qt on windows. You may also try and set up a different buildchain on qt creator for windows but I haven't actually tried that so I may just be wrong there ...  If you use Linux make sure to install all necessary modules and use qt5 for mxe (compiling qt not qt5 for mxe still defaults to qt4.8 so that cost me an hour of compilation time ....)

I hope that helps

Regards

Max

a.dahhak
Offline
Last seen: 8 hours 6 min ago
VESC Free
Joined: 2020-02-27 12:04
Posts: 17

I have compiled it on Ubuntu and I would like to have the windows exe.

Is this the right steps to cross compile with MXE ?

 

#1 Get it:
$ git clone https://github.com/mxe/mxe.git

#2 Build Qt for Windows, its dependencies, and the cross-build tools; this will take about an hour on a fast machine with decent internet access; the download is about 500MB:
$ cd mxe && make qt

#3 Get to the directory of your app and add the cross-build tools to the PATH:
$ export PATH=<mxe root>/usr/bin:$PATH

#4 Run the Qt Makefile generator tool then build:
$ <mxe root>/usr/i686-pc-mingw32/qt/bin/qmake && make

#5 You should find the binary in the ./release directory:
$ wine release/foo.exe

 

Source:https://forum.qt.io/topic/32090/how-to-make-exe-file-on-ubuntu/4

Following this got me an error while making "Missing requirement: libtool". I have installed the libtool many times (sudo apt-get install -y libtool), and still have this error.

Thanks for help

Abdelilah

district9prawn
Offline
Last seen: 1 year 3 months ago
Joined: 2018-04-26 12:18
Posts: 123

It looks like you have done the slow part of building qt.

I followed the link in Benjamin's build_win script. https://stackoverflow.com/questions/14170590/building-qt-5-on-linux-for-...

After building I simply edited the build_win to my mxe directory and ran the script.

 

a.dahhak
Offline
Last seen: 8 hours 6 min ago
VESC Free
Joined: 2020-02-27 12:04
Posts: 17

Hi district9prawn and thanks for answering,

 I still could not make qt "make qt", still cannot pass that error of missing libtool. Did I install libtool in the wrong rep or something like that ?

Thanks

Abdelilah