compile vrep_c++ project in qt_msvc2017 kit

Typically: "How do I... ", "How can I... " questions
Post Reply
XZhang
Posts: 5
Joined: 16 Apr 2019, 05:43

compile vrep_c++ project in qt_msvc2017 kit

Post by XZhang »

Hi, coppelia
I am working on controlling the robots in vrep by a c++ client. However, different form the IDE used by BubbleRobClient example, I develop the project in QT creator instead of Visual Studio. I add the files in the directoris of include and remoteApi to the project ,set the pre-compiling definitions and add the absolute path of remoteApi.dll in the pro file like the follwing:

Code: Select all

TEMPLATE = app
CONFIG += console c++11
CONFIG -= app_bundle
CONFIG -= qt

DEFINES += WIN32
DEFINES += NDEBUG _CONSOLE
DEFINES += NON_MATLAB_PARSING
DEFINES += MAX_EXT_API_CONNECTIONS=255
SOURCES += \
    remoteApi/extApi.c \
    remoteApi/extApiPlatform.c \
    main.cpp
INCLUDEPATH += ./include \
./remoteApi \
./include/stack
LIBS += -LC:\Users\10640\Desktop\vrep_c++_qt\untitled -lremoteApi
When I build the project, an error says remoteApi.lib cannot be opened. However, I cannot find any file with the suffix lib with the vrep directory. I have been stuck for one day and I really appreciate it if any one could help me!

XZhang
Posts: 5
Joined: 16 Apr 2019, 05:43

Re: compile vrep_c++ project in qt_msvc2017 kit

Post by XZhang »

The problem is solved by the following two modifications in the pro file:
1. add "DEFINES += DO_NOT_USE_SHARED_MEMORY"
2. cancel "LIBS += ..."
However, I am not clear the effect of DO_NOT_USE_SHARED_MEMORY

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

Re: compile vrep_c++ project in qt_msvc2017 kit

Post by coppelia »

Hello,

when DO_NOT_USE_SHARED_MEMORY is defined, the legacy remote API will use socket communication instead of shared memory.

Cheers

Post Reply