I run V-REP and ROS on different machines, where V-REP runs under windows and ROS runs under Ubuntu. I want to add extApi.o and extApiPlatform.o to my ROS package as external libraries, so that I can connect V-REP on another machine.
I am not sure whether it can be done this way, but in CMakeLists.txt of my ROS package, I tried to add the following code
try to add the source files (i.e. extApi.c and extApiPlatform.c) to the package in the add_library section, then also add pthread to the target_link_libraries section. You might have to add a few other things in this section.
...
/home/viki/V-REP_PRO_EDU_V3_1_2_Linux/programming/remoteApi/extApi.c:1364:12: error: conflicting types for ‘_appendCommand_s_buff’
/home/viki/V-REP_PRO_EDU_V3_1_2_Linux/programming/remoteApi/extApi.c:1002:36: note: previous implicit declaration of ‘_appendCommand_s_buff’ was here
/home/viki/V-REP_PRO_EDU_V3_1_2_Linux/programming/remoteApi/extApi.c: In function ‘_appendCommand_s_buff’:
/home/viki/V-REP_PRO_EDU_V3_1_2_Linux/programming/remoteApi/extApi.c:1368:40: error: ‘SIMX_SUBHEADER_SIZE’ undeclared (first use in this function)
/home/viki/V-REP_PRO_EDU_V3_1_2_Linux/programming/remoteApi/extApi.c:1369:19: error: ‘simx_cmdheaderoffset_mem_size’ undeclared (first use in this function)
/home/viki/V-REP_PRO_EDU_V3_1_2_Linux/programming/remoteApi/extApi.c:1371:19: error: ‘simx_cmdheaderoffset_full_mem_size’ undeclared (first use in this function)
/home/viki/V-REP_PRO_EDU_V3_1_2_Linux/programming/remoteApi/extApi.c:1372:22: error: ‘simx_cmdheaderoffset_pdata_offset0’ undeclared (first use in this function)
/home/viki/V-REP_PRO_EDU_V3_1_2_Linux/programming/remoteApi/extApi.c:1373:19: error: ‘simx_cmdheaderoffset_pdata_offset1’ undeclared (first use in this function)
/home/viki/V-REP_PRO_EDU_V3_1_2_Linux/programming/remoteApi/extApi.c:1375:19: error: ‘simx_cmdheaderoffset_cmd’ undeclared (first use in this function)
/home/viki/V-REP_PRO_EDU_V3_1_2_Linux/programming/remoteApi/extApi.c:1376:22: error: ‘simx_cmdheaderoffset_delay_or_split’ undeclared (first use in this function)
/home/viki/V-REP_PRO_EDU_V3_1_2_Linux/programming/remoteApi/extApi.c:1377:7: error: ‘simx_cmdheaderoffset_status’ undeclared (first use in this function)
/home/viki/V-REP_PRO_EDU_V3_1_2_Linux/programming/remoteApi/extApi.c: At top level:
/home/viki/V-REP_PRO_EDU_V3_1_2_Linux/programming/remoteApi/extApi.c:1387:12: error: conflicting types for ‘_appendChunkToBuffer’
/home/viki/V-REP_PRO_EDU_V3_1_2_Linux/programming/remoteApi/extApi.c:1184:9: note: previous implicit declaration of ‘_appendChunkToBuffer’ was here
/home/viki/V-REP_PRO_EDU_V3_1_2_Linux/programming/remoteApi/extApi.c: In function ‘_appendCommandToBufferAndTakeIntoAccountPreviouslyReceivedData’:
/home/viki/V-REP_PRO_EDU_V3_1_2_Linux/programming/remoteApi/extApi.c:1419:55: error: ‘simx_cmdheaderoffset_cmd’ undeclared (first use in this function)
/home/viki/V-REP_PRO_EDU_V3_1_2_Linux/programming/remoteApi/extApi.c:1419:86: error: ‘simx_cmdmask’ undeclared (first use in this function)
/home/viki/V-REP_PRO_EDU_V3_1_2_Linux/programming/remoteApi/extApi.c:1420:14: error: ‘simx_cmd_read_string_stream’ undeclared (first use in this function)
/home/viki/V-REP_PRO_EDU_V3_1_2_Linux/programming/remoteApi/extApi.c:1422:13: warning: assignment makes pointer from integer without a cast [enabled by default]
/home/viki/V-REP_PRO_EDU_V3_1_2_Linux/programming/remoteApi/extApi.c:1427:27: error: ‘SIMX_SUBHEADER_SIZE’ undeclared (first use in this function)
/home/viki/V-REP_PRO_EDU_V3_1_2_Linux/programming/remoteApi/extApi.c:1427:108: error: ‘simx_cmdheaderoffset_pdata_offset0’ undeclared (first use in this function)
/home/viki/V-REP_PRO_EDU_V3_1_2_Linux/programming/remoteApi/extApi.c:1428:75: error: ‘simx_cmdheaderoffset_mem_size’ undeclared (first use in this function)
/home/viki/V-REP_PRO_EDU_V3_1_2_Linux/programming/remoteApi/extApi.c:1446:53: error: ‘simx_cmdheaderoffset_full_mem_size’ undeclared (first use in this function)
/home/viki/V-REP_PRO_EDU_V3_1_2_Linux/programming/remoteApi/extApi.c: At top level:
/home/viki/V-REP_PRO_EDU_V3_1_2_Linux/programming/remoteApi/extApi.c:1458:12: error: conflicting types for ‘_getSameCommandPointer’
/home/viki/V-REP_PRO_EDU_V3_1_2_Linux/programming/remoteApi/extApi.c:1422:14: note: previous implicit declaration of ‘_getSameCommandPointer’ was here
/home/viki/V-REP_PRO_EDU_V3_1_2_Linux/programming/remoteApi/extApi.c: In function ‘_getSameCommandPointer’:
/home/viki/V-REP_PRO_EDU_V3_1_2_Linux/programming/remoteApi/extApi.c:1462:56: error: ‘simx_cmdheaderoffset_cmd’ undeclared (first use in this function)
/home/viki/V-REP_PRO_EDU_V3_1_2_Linux/programming/remoteApi/extApi.c:1462:87: error: ‘simx_cmdmask’ undeclared (first use in this function)
/home/viki/V-REP_PRO_EDU_V3_1_2_Linux/programming/remoteApi/extApi.c:1469:17: error: ‘simx_cmd4bytes_start’ undeclared (first use in this function)
/home/viki/V-REP_PRO_EDU_V3_1_2_Linux/programming/remoteApi/extApi.c:1469:49: error: ‘simx_cmd8bytes_start’ undeclared (first use in this function)
/home/viki/V-REP_PRO_EDU_V3_1_2_Linux/programming/remoteApi/extApi.c:1471:29: error: ‘SIMX_SUBHEADER_SIZE’ undeclared (first use in this function)
/home/viki/V-REP_PRO_EDU_V3_1_2_Linux/programming/remoteApi/extApi.c:1474:49: error: ‘simx_cmd1string_start’ undeclared (first use in this function)
/home/viki/V-REP_PRO_EDU_V3_1_2_Linux/programming/remoteApi/extApi.c:1482:50: error: ‘simx_cmdreserved_start’ undeclared (first use in this function)
/home/viki/V-REP_PRO_EDU_V3_1_2_Linux/programming/remoteApi/extApi.c:1488:61: error: ‘simx_cmdheaderoffset_mem_size’ undeclared (first use in this function)
...