Compilation Issues and Solution under Windows

Report crashes, strange behaviour, or apparent bugs
Post Reply
zxywest
Posts: 2
Joined: 10 Jun 2013, 20:14

Compilation Issues and Solution under Windows

Post by zxywest » 10 Jun 2013, 23:50

Here is my experience on compiling the code.
I am using Qt 5.0.2 and Boost 1.53.0 and Lua 5.1.4

I used Qt Creator for compilation.

1. don't forget set win32 for the project.

project -->>build steps -->>additional arguments: -win32

2. fix some bugs by adding (also check out the earlier post)
#include "sensingThreadPool.h"

to:
sourceCode/collisions/RegColl.cpp
sourceCode/distances/RegDist.cpp
sourceCode/3dObjects/proximitySensor.cpp

3. adding (also check out the earlier post)

#define IDSN_INERTIA_FRAME "Inertia frame"
#define IDSN_INERTIA_FRAME_RELATIVE_TO_WORLD "The inertia frame is now expressed relative to the absolute reference frame. Clicking 'Apply to selection' will from now on apply the same absolute position/orientation of the inertia frames."

to
v_repStringTable.h

4. adding

#include <QmimeData>

to
MainWindow.cpp


5. change the file sourcecode\interfaces\v_rep.cpp

VREP_END(CIloIlo::mainWindow->winId());

to
VREP_END((simVoid*)CIloIlo::mainWindow->winId());


6. I have the following error
\sourceCode\various\GV.cpp:-1: error: C1083: Cannot open precompiled header file: 'debug\v_rep_pch.pch': Permission denied

complile the individual file. Here, compile GV.cpp then build the entire project.

7. You may have VVarious.obj problem.
You need add shelllib in VVarious.cpp as follows.

#ifdef WIN_VREP
#include <Shellapi.h>
#pragma comment(lib,"shell32.lib")
#endif


8. There is a strange issue in v_repExtUrdf.pro

It reports that ui_urdfdialog.h could not be found.

In fact, ui_urdfdialog.h file should be automatically generated by Qt Creator if there is urdfdialog.ui file. Obvious, there is something wrong with the project settings. I couldn't figure out the reason. But an easy solution is

Copy the urdfdialog.ui file to v_rep.pro and compile the v_rep project, then you can have ui_urdfdialog.h. Then, copy this file to v_repExtUrdf folder.

There seems no problem with compilation. But the client project vrep still does not run. It reports "Error: could not find or correctly load the V-REP library". I still try to figure out why.

coppelia
Site Admin
Posts: 6766
Joined: 14 Dec 2012, 00:25

Re: Compilation Issues and Solution under Windows

Post by coppelia » 11 Jun 2013, 00:41

Thanks a lot for the feedback!

We'll include the changes in next release and also try to add your instructions to the user manual.

Cheers

zxywest
Posts: 2
Joined: 10 Jun 2013, 20:14

Re: Compilation Issues and Solution under Windows

Post by zxywest » 11 Jun 2013, 22:37

These three files do not exist, but they are included in the project.

WARNING: Failure to find: sourceCode\communication\serial_mac_linux.h
WARNING: Failure to find: sourceCode\geometricAlgorithms\algos\MeshRoutines.h
WARNING: Failure to find: sourceCode\various\vrepConfig

coppelia
Site Admin
Posts: 6766
Joined: 14 Dec 2012, 00:25

Re: Compilation Issues and Solution under Windows

Post by coppelia » 11 Jun 2013, 23:24

Yes, you are right. It should be:

Code: Select all

sourceCode/communication/serialPort/serial_mac_linux.h \
sourceCode/geometricAlgorithms/MeshRoutines.h \
HEADERS += sourceCode/various/vrepConfig.h  \
Cheers

achuwilson
Posts: 1
Joined: 03 Sep 2013, 12:32

Re: Compilation Issues and Solution under Windows

Post by achuwilson » 04 Sep 2013, 07:13

Hi,
I was trying to compile V-REP version 3.0.4 under Windows-7 64 bit and ran into some issues. The Qt version was 4.7.3, Boost version 1.51,Lua 5.1.4, QScintilla 2.7.1, Microsoft Visual studio 2008 Pro compiler. The code was compiled using Qt creator 2.7.0.
The following errors occurred and here are the fixes I made.

1) C:\Program Files (x86)\V-REP3\V-REP_PRO_EDU\v_rep\sourceCode\various\GV.cpp:-1: error: C1083: Cannot open precompiled header file: 'release\v_rep_pch.pch': Permission denied
-----------------------FIX-------------------------------------
compiled the file sourceCode>various>GV.cpp individually and then built the entire project
******************************************************************************************************************************************************

2) C:\Program Files (x86)\V-REP3\V-REP_PRO_EDU\v_rep\sourceCode\geometricAlgorithms\convexDecomposition\hacdMeshDecimator.h:80: error: C2589: '(' : illegal token on right side of '::'

C:\Program Files (x86)\V-REP3\V-REP_PRO_EDU\v_rep\sourceCode\geometricAlgorithms\convexDecomposition\hacdMeshDecimator.h:80: error: C2589: '(' : illegal token on right side of '::'
C:\Program Files (x86)\V-REP3\V-REP_PRO_EDU\v_rep\sourceCode\geometricAlgorithms\convexDecomposition\hacdMeshDecimator.h:80: error: C2059: syntax error : '::'
------------------------FIX---------------------------------------------
added
#undef min
#undef max
to top of sourceCode\geometricAlgorithms\convexDecomposition\hacdMeshDecimator.h

*****************************************************************************************************************************************************

3) C:\Program Files (x86)\V-REP3\V-REP_PRO_EDU\v_rep\sourceCode\geometricAlgorithms\convexDecomposition\hacdICHull.cpp:20: error: C2589: '(' : illegal token on right side of '::'
C:\Program Files (x86)\V-REP3\V-REP_PRO_EDU\v_rep\sourceCode\geometricAlgorithms\convexDecomposition\hacdICHull.cpp:20: error: C2059: syntax error : '::'
C:\Program Files (x86)\V-REP3\V-REP_PRO_EDU\v_rep\sourceCode\geometricAlgorithms\convexDecomposition\hacdICHull.cpp:20: error: C2059: syntax error : ')'
------------------------FIX---------------------------------------------
added
#undef min
#undef max
to top of sourceCode\geometricAlgorithms\convexDecomposition\hacdICHull.cpp
*****************************************************************************************************************************************************

4) C:\Program Files (x86)\V-REP3\V-REP_PRO_EDU\v_rep\sourceCode\geometricAlgorithms\convexDecomposition\hacdRaycastMesh.cpp:50: error: C2589: '(' : illegal token on right side of '::'
C:\Program Files (x86)\V-REP3\V-REP_PRO_EDU\v_rep\sourceCode\geometricAlgorithms\convexDecomposition\hacdRaycastMesh.cpp:50: error: C2059: syntax error : '::'
C:\Program Files (x86)\V-REP3\V-REP_PRO_EDU\v_rep\sourceCode\geometricAlgorithms\convexDecomposition\hacdRaycastMesh.cpp:51: error: C2589: '(' : illegal token on right side of '::'
------------------------FIX---------------------------------------------
added
#undef min
#undef max
to top of sourceCode\geometricAlgorithms\convexDecomposition\hacdRaycastMesh.cpp *****************************************************************************************************************************************************

After these fixes, the compilation was successful (only warnings), and the compiled version works fine.

coppelia
Site Admin
Posts: 6766
Joined: 14 Dec 2012, 00:25

Re: Compilation Issues and Solution under Windows

Post by coppelia » 06 Sep 2013, 11:27

Thank you!

Next release (V-REP 3.0.5) will very probably move to Qt 5.1, and should be easier to compile and set-up.

Cheers

Post Reply