Hello, how are you? Several days ago I try to compile the bubbleRobClient.cpp project in Qt Creator 2.4.1 in C + +. I did all the steps (I believe) describing Enabling the Remote API - client side, ie, add to my project folder:
extApi.h
extApi.c
extApiPlatform.h
extApiPlatform.c
Which is also included in the bubbleRobClient.cpp follows:
extern "C" {
# include "extApi.h"
# include "extApi.c"
# include "extApiPlatform.h"
# include "extApiPlatform.c"
}
Also I defined MAX_EXT_API_CONNECTIONS NON_MATLAB_PARSING = 1 and = 255 as a preprocessor definition in the pro file with Qt Creator, as follows.:
DEFINES + = NON_MATLAB_PARSING = 1
DEFINES + = MAX_EXT_API_CONNECTIONS = 255
Then when I compile the project onto me many errors extApi_getTimeInMs `function '.
Do not know what else to do. Any council will be welcome.
Keep it that the V-REP is a great simulator.
Greetings from Argentina.
Problems compiling bubbleRobClient.cpp
Re: Problems compiling bubbleRobClient.cpp
Hello,
in the bubbleRobClient.cpp file, do not include all the files. Following should be enough:
Can you show us the actual output of the compiler?
Cheers
in the bubbleRobClient.cpp file, do not include all the files. Following should be enough:
Code: Select all
extern "C" {
#include "extApi.h"
}
Cheers
Re: Problems compiling bubbleRobClient.cpp
Hi, Thanks for the prompt reply, if I included extApi.h nomas, and define NON_MATLAB_PARSING = 1
. MAX_EXT_API_CONNECTIONS = 255 and in the *.pro file with Qt Creator tells me: error: [debug / bubbleRobClient.o] Error 1. If you do not define preprocessors shoot me the following errors:
In function 'int main (int, char **)':
'simx_opmode_continuous' was not Declared In this scope
'extApi_sleepMs' was not Declared In this scope
'simx_error_noerror' was not Declared In this scope
'simx_opmode_oneshot' was not Declared In this scope
'extApi_sleepMs' was not Declared In this scope
Layers I'm doing wrong definition of the preprocessors.
Greetings.
. MAX_EXT_API_CONNECTIONS = 255 and in the *.pro file with Qt Creator tells me: error: [debug / bubbleRobClient.o] Error 1. If you do not define preprocessors shoot me the following errors:
In function 'int main (int, char **)':
'simx_opmode_continuous' was not Declared In this scope
'extApi_sleepMs' was not Declared In this scope
'simx_error_noerror' was not Declared In this scope
'simx_opmode_oneshot' was not Declared In this scope
'extApi_sleepMs' was not Declared In this scope
Layers I'm doing wrong definition of the preprocessors.
Greetings.
Re: Problems compiling bubbleRobClient.cpp
Try with following PRO file content:
Cheers
Code: Select all
TARGET = bubbleRobClient
TEMPLATE = app
DEFINES -= UNICODE
CONFIG += console
DEFINES += NON_MATLAB_PARSING
DEFINES += MAX_EXT_API_CONNECTIONS=255
*-msvc* {
QMAKE_CXXFLAGS += -O2
QMAKE_CXXFLAGS += -W3
}
*-g++* {
QMAKE_CXXFLAGS += -O3
QMAKE_CXXFLAGS += -Wall
QMAKE_CXXFLAGS += -Wno-unused-parameter
QMAKE_CXXFLAGS += -Wno-strict-aliasing
QMAKE_CXXFLAGS += -Wno-empty-body
QMAKE_CXXFLAGS += -Wno-write-strings
QMAKE_CXXFLAGS += -Wno-unused-but-set-variable
QMAKE_CXXFLAGS += -Wno-unused-local-typedefs
QMAKE_CXXFLAGS += -Wno-narrowing
QMAKE_CFLAGS += -O3
QMAKE_CFLAGS += -Wall
QMAKE_CFLAGS += -Wno-strict-aliasing
QMAKE_CFLAGS += -Wno-unused-parameter
QMAKE_CFLAGS += -Wno-unused-but-set-variable
QMAKE_CFLAGS += -Wno-unused-local-typedefs
}
win32 {
LIBS += -lwinmm
LIBS += -lWs2_32
}
macx {
}
unix:!macx {
}
INCLUDEPATH += "../include"
INCLUDEPATH += "../remoteApi"
SOURCES += \
bubbleRobClient.cpp \
../remoteApi/extApi.c \
../remoteApi/extApiPlatform.c
HEADERS +=\
../remoteApi/extApi.h \
../remoteApi/extApiPlatform.h
unix:!symbian {
maemo5 {
target.path = /opt/usr/lib
} else {
target.path = /usr/lib
}
INSTALLS += target
}
Re: Problems compiling bubbleRobClient.cpp
Hello, I consider the code in the *.pro as I stated, and the program is compiled without any problems. Thank you very much for the great help.
Cheers and keep well.
Cheers and keep well.