Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[sumo-user] Problem with using TraCI/C++TraCIAPI - Visual Studio Community 2017

Subject: Problem with using TraCI/C++TraCIAPI - Visual Studio Community 2017
Date: 2018-07-20 15:41
From: cchadj01 <cchadj01@xxxxxxxxxxxx>
To: sumo-user@xxxxxxxxxxx

Hello,

For the past couple of days I was trying to use the c++ library in order to have a sumo client from c++ code for a project of mine. I only need the c++ lib from the Sumo source code. I followed the guide at http://sumo.dlr.de/wiki/TraCI/C%2B%2BTraCIAPI .

I made the exact same directory tree as described to avoide chaning the includes from TraciAPI.h and TraciAPI.h
 and so I have something like:
 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
 src/config.h

I am trying to build the lib from windows 10 with the help of Visual Studio Community 2017.
 I created a new Visual Studio Project from the src directory.

In the beginning I had errors including winsock2.h and ws2tcpip.h . I linked the library from Project -> Properties -> Configuration Properties -> Linker -> Input and writing ws2_32.lib in the additional dependencies. The compiler stopped complaining but I think the problem isn't solved. I don't think ws2_32.lib exists in my computer/(my Windows SDK). I tried to build it and I get these errors that you can see attached at LINKER-ERROR.png image that is attached. Also in socket.cpp I get theese errors that you can see at socketcpp-errors.png image that is attached.

I would be really happy to know if I am doing something wrong and how I should fix it.
Thank you.

Attachment: LINKER-ERROR.png
Description: PNG image

Attachment: socketcpp-errors.png
Description: PNG image

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
sumo-user mailing list
sumo-user@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/sumo-user

Back to the top