Problem enabling the Remote API - client side

Typically: "How do I... ", "How can I... " questions
Post Reply
medp
Posts: 12
Joined: 27 Jun 2013, 14:53

Problem enabling the Remote API - client side

Post by medp » 05 Aug 2013, 11:00

Hello,
I'm having problems enabling the remote API for c\c++ over Windows8 x64, I'm using Visual Studio 2012.
I checked the tutorial on buble robots and also followed the instructions on this page: http://coppeliarobotics.com/helpFiles/e ... ntSide.htm but I'm still stucked.
After some failure on the real project I just tried to copy the bubleRobClient into a new project without any modification, I tried to include /include and /remoteAPI directories and also tried to paste the .h and .c files listed in the link above but I get the following errors:

Code: Select all

1>------ Build started: Project: MRP, Configuration: Debug Win32 ------
1>  extApiPlatform.c
1>  Adding library: Winmm.lib
1>  Adding library: Ws2_32.lib
1>c:\program files (x86)\v-rep3\v-rep_pro_edu\programming\remoteapi\extapiplatform.c(58): error C2065: 'MAX_EXT_API_CONNECTIONS' : undeclared identifier
1>c:\program files (x86)\v-rep3\v-rep_pro_edu\programming\remoteapi\extapiplatform.c(58): error C2057: expected constant expression
1>c:\program files (x86)\v-rep3\v-rep_pro_edu\programming\remoteapi\extapiplatform.c(58): error C2466: cannot allocate an array of constant size 0
1>c:\program files (x86)\v-rep3\v-rep_pro_edu\programming\remoteapi\extapiplatform.c(59): error C2065: 'MAX_EXT_API_CONNECTIONS' : undeclared identifier
1>c:\program files (x86)\v-rep3\v-rep_pro_edu\programming\remoteapi\extapiplatform.c(59): error C2057: expected constant expression
.......
1>c:\program files (x86)\v-rep3\v-rep_pro_edu\programming\remoteapi\extapi.c(271): error C2065: 'simx_opmode_oneshot_wait' : undeclared identifier
1>c:\program files (x86)\v-rep3\v-rep_pro_edu\programming\remoteapi\extapi.c(272): warning C4013: '_removeCommandReply_null' undefined; assuming extern returning int
1>c:\program files (x86)\v-rep3\v-rep_pro_edu\programming\remoteapi\extapi.c(282): error C2065: 'simx_error_noerror' : undeclared identifier
1>c:\program files (x86)\v-rep3\v-rep_pro_edu\programming\remoteapi\extapi.c(284): error C2065: 'simx_cmdmask' : undeclared identifier
1>c:\program files (x86)\v-rep3\v-rep_pro_edu\programming\remoteapi\extapi.c(284): fatal error C1003: error count exceeds 100; stopping compilation
1>  Generating Code...
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Im new to V-REP and not a good C/C++ programmer and I'll really appreciate some help.
Thanks in advance.

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

Re: Problem enabling the Remote API - client side

Post by coppelia » 05 Aug 2013, 16:04

Hello,

From the first error message it seems that you have not defined the preprocessor directives as indicated on the page you mentionned. Make sure those two are defined:
  • NON_MATLAB_PARSING=1
  • MAX_EXT_API_CONNECTIONS=255
Cheers

medp
Posts: 12
Joined: 27 Jun 2013, 14:53

Re: Problem enabling the Remote API - client side

Post by medp » 06 Aug 2013, 10:53

OK, it works, I missed the =1 after the non matlab parsing.
Thank you.

Post Reply