Hey everyone,
I am pretty new at SUMO and Visual Studio. For a project I am working on I want to use the TraCI interface. So far I use Python to connect to TraCI and it worked really good.
Now I want to use C++ to do the same since for my project it is more convenient to have C++ code instead of Python. However I have really big problems to find out how set up TraCI/C++TraCIAPI connection.
I tried to follow the guide (http://sumo.sourceforge.net/userdoc/TraCI/C%2B%2BTraCIAPI.html) that is on the wiki and to run the example code but I have problems in compling it. I use
Visual Studio 2015.
This is what I did:
I copyed all the files that where listed on the wiki and added them in the file where my main.cpp is located:
src/utils/traci/TraCIAPI.h
src/utils/traci/TraCIAPI.cpp
src/foreign/tcpip/socket.h
src/foreign/tcpip/socket.cpp
src/foreign/tcpip/storage.h
src/foreign/tcpip/storage.cpp
src/traci-server/TraCIConstants.h
src/libsumo/TraCIDefs.h
Further more I added windows_config.h and config.h also because some of the headerfiles include them as well.
Then I looked in to the code and when one of those files was included I changed the path since those files are now located in the same file as the main.cpp file.
When I try to build the project I get a lot of errors saying: unsolved external … .
I am pretty sure I make a big mistake somewhere but I just don’t know how to do it in the right way.
Does anyone has experience with setting up TraCI/C++TraCIAPI connection using Visual Studio and can tell me what I have to do instead or what the problem might be?
Thank you
BR
Gunnar