0

我正在为 webbots 和 Visual Studio 使用最新版本(2019),我想做的是根据https://cyberbotics.com/doc/guide/using-visual-studio-with-连接这两者网络机器人。但是一旦我$(ProjectName).exe输入,Linker > General > Output File我会收到以下错误:

"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."

此外,当我根据本教程的第 3 节将一些带有以下标头的代码放入 .cpp 文件时,我得到另一个错误:

标题:

#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>

错误:

_main already defined in e-puck.obj 

提前致谢!

4

0 回答 0