eclipse-sumo / sumo

Eclipse SUMO is an open source, highly portable, microscopic and continuous traffic simulation package designed to handle large networks. It allows for intermodal simulation including pedestrians and comes with a large set of tools for scenario creation.
https://eclipse.dev/sumo
Eclipse Public License 2.0
2.57k stars 1.43k forks source link

Building error in VS 2017 #5546

Closed warm2018 closed 5 years ago

warm2018 commented 5 years ago

System can't launch " SUMO_HOME/Cmake-build/ Debug/ALL-Build The specified file could not be found.

Win10 is used

palvarezlopez commented 5 years ago

@warm2018 You need to specify a project (for example, SUMO-GUI) as startup project

startup

warm2018 commented 5 years ago

image

OK, I follow it, but sumo-gui.exe can't be excutable.

warm2018 commented 5 years ago

I choose Win32 , not Win64 which wiki advise when I configure sumo by Cmake. And Python3.7, VS2017, win10 64 are used.

palvarezlopez commented 5 years ago

@warm2018 Can you compile for 64 bits instead of 32 bits? In the list of compilers of CMake you can choose the 64 bits of Visual Studio 2017 compiler

warm2018 commented 5 years ago

When I choose 64bits, erros happened. "Failed to run MSBuild command:" image image

palvarezlopez commented 5 years ago

Can you translate the chinese characters of the output messages?

warm2018 commented 5 years ago

OK, thank for your patience. TRANSLATION: CMake Error at CMakeLists.txt:7 (project): Failed to run MSBuild command:

D:/Program Files (x86)/VisualStudio/Packages/MSBuild/15.0/Bin/MSBuild.exe to get the value of VCTargetsPath:

Microsoft (R) build engine version 15.9.21+g9802d43bc3 for the.net Framework Copyright (C) Microsoft Corporation.All rights reserved.

The build startup time is 2019/5/2 18:35:53. Item "D:\Project\SUMO\cmake-build\CMakeFiles\3.14.3\VCTargetsPath. Vcxproj" on node 1 (default target). D: \ \ Program Files \ VisualStudio \ Packages (x86) \ Common7 \ VC IDE \ \ VCTargets \ Microsoft Cpp. InvalidPlatform. The Targets (22, 7) : error MSB8007: project "VCTargetsPath. Vcxproj" platform is invalid.The platform is "Win64".The likely reason you will see this message is that you are trying to build a project without a solution file and specify a non-default platform for the project that does not exist.[D: \ Project \ SUMO \ cmake - build \ CMakeFiles \ 3.14.3 \ VCTargetsPath vcxproj]

"D:\Project\SUMO\cmake-build\CMakeFiles\3.14.3\VCTargetsPath. Vcxproj" (default target) operation - failed. Build failed. "D:\Project\SUMO\cmake-build\CMakeFiles\3.14.3\VCTargetsPath. Vcxproj" (default target) (1) -> InvalidPlatformError target -> D: \ \ Program Files \ VisualStudio \ Packages (x86) \ Common7 \ VC IDE \ \ VCTargets \ Microsoft Cpp. InvalidPlatform. The Targets (22, 7) : error MSB8007: project "VCTargetsPath. Vcxproj" platform is invalid.The platform is "Win64".The likely reason you will see this message is that you are trying to build a project without a solution file and specify a non-default platform for the project that does not exist.[D: \ Project \ SUMO \ cmake - build \ CMakeFiles \ 3.14.3 \ VCTargetsPath vcxproj] 0 a warning 1 mistake

palvarezlopez commented 5 years ago

Try the following solution:

1) Close Visual Studio and CMake 2) Remove folder "D:\Project\SUMO\Cmake-build" 3) Open CMake-gui and repeat the entire process, but for Visual Studio 15, 64 bits

Cmake1564

4) Check if now works

If not, check the following thread in which there is differents solutions for your porblem:

https://github.com/vector-of-bool/vscode-cmake-tools/issues/222

warm2018 commented 5 years ago

Thank you for your guide, and I sloved the CMAKE problem. But when I build it in VS, error happened again. image

warm2018 commented 5 years ago

"LINK : fatal error LNK1104: cannot open file 'gui\dialogs\Debug\gui_dialogs.lib'

I check the path and find it has no gui_dialogs.lib but nothing.

palvarezlopez commented 5 years ago

Try to compile using this button:

buildSolution

Sometimes CMake doesn't compile all dependences in debug mode.

warm2018 commented 5 years ago

image image

I am a beginner in VS and C++. Thank for your patience again. When I rebuild it and VS shows above errors. When I Check path: "D:\Project\SUMO\bin" , find some excutable files(Every one have the suffix "D") are generated , image

but when I click them, errors happened : image image

TRANSLATION:
Unable to continue executing the code because them cannot be found. Reinstallation may solve this problem.

palvarezlopez commented 5 years ago

The suffix D is normal, because its the debug version. If you compile in Release mode, the suffix D disappeared.

About the other error, you only need to build the project "Solution 'SUMO'/CMake/install_dll"

warm2018 commented 5 years ago

Ok, thank you very much. where is "install_all"? Is it "ALL_BUILD"?(maybe my sumo is older version. Correctly, I clone it from "plexe-sumo" )

image

palvarezlopez commented 5 years ago

Yes, definitely your SUMO version is old. Try it cloning the current GIT version.

warm2018 commented 5 years ago

Thank for your advice. But I want “plexe-sumo” for a special use. The functions which plexe-sumo has is important to my project. Did the platooning function has been intergrated in latest SUMO?

palvarezlopez commented 5 years ago

@namdre is Platooning already in SUMO?

namdre commented 5 years ago

We integrated several compatibility fixes for plexe into SUMO and I think that the author of plexe (@michele-segata) has an updated version of plexe that works with the latest sumo version. I suggest that @warm2018 approaches him directly.

warm2018 commented 5 years ago

OK,thank you guys!

michele-segata commented 5 years ago

@warm2018 if you fetch updates from plexe-sumo (master branch, 1d0977320a4e71a1ce92f908ef5a87c884bf23cd) you will get the latest SUMO version. This is exactly the same as SUMO 1.2.0, as Plexe models have been integrated into the official SUMO release.

warm2018 commented 5 years ago

Oh! Thank you ! I clone branch "plexe2.1", not master branch.

You mean that latest SUMO is same as plexe-sumo?

warm2018 commented 5 years ago

OK, I downloaded latest SUMO 1.2.0 binary files just now, and find that it can realize the platooning behavior which python scripts support . I understand what we want know at first, thank you guys so much.

michele-segata commented 5 years ago

If you just need the python support and not the Plexe-Veins network simulator, then you are fine with SUMO 1.2.0.

behrisch commented 5 years ago

Looks like being solved to me, please reopen if questions persist.