I am using the last version (2019) for both webots and visual studio, what i'm trying to do is to connect these two according to https://cyberbotics.com/doc/guide/using-visual-studio-with-webots. but once i put $(ProjectName).exe
in Linker > General > Output File
I'll get the error below:
"TargetPath(C:\Users\lighting\Documents\e-puck\controllers\e-puckParticle\Debug\MyController.exe) does not match the Linker's OutputFile property value (C:\Users\lighting\Documents\e-puck\controllers\e-puckParticle\MyController\MyController.exe).
This may cause your project to build incorrectly. To correct this, please make sure that $(OutDir), $(TargetName) and $(TargetExt) property values match the value specified in %(Link.OutputFile). MyController C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Microsoft\VC\v160\Microsoft.CppBuild."
Also when i put some code with following headers in a .cpp file according to section 3 of the tutorial, i get another error:
headers:
#include <webots/robot.h>
#include <webots/differential_wheels.h>
#include <webots/distance_sensor.h>
#include <webots/motor.h>
#include <webots/position_sensor.h>
#include <stdio.h>
#include <string.h>
The error:
_main already defined in e-puck.obj
Thanks in advance!