Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [sumo-user] Need help building Traci C++ library

I've figured it out. The problem was that I wasn't including ws2_32.lib properly. I guess I just needed someone to talk to to figure this out. I outta use the rubber duck technique more often. Thanks for the help.

On Thu, Feb 21, 2019 at 3:08 PM PETER MARCHIONE <pmarc002@xxxxxxx> wrote:
Ok, I've figured out a couple of issues. I was including storage.h instead of socket.h. The other problems was that socket.h wasn't defining WIN32 as well. So that's two problems fixed. The only issue left is this linker issue.
image.png

On Thu, Feb 21, 2019 at 3:00 PM PETER MARCHIONE <pmarc002@xxxxxxx> wrote:
Sorry, I wasn't very clear. I already included TraCIAPI.h succesfully. The picture shows that I'm missing several files under socket.cpp. Apparently if you're using Windows, it's supposed to use the Winsock2 library. Unfortunately if I define WIN32 manually, then I get several new errors.
image.png
Any tips?

On Thu, Feb 21, 2019 at 2:52 PM Mirko Barthauer <m.barthauer@xxxxxxxxxxx> wrote:

Hi Peter,

the include statements are relative to the SUMO source code directory when you just copy the files from there. I think the easiest workaround is to collect the files and copy them to your development directory.  In your example, have a look at %SUMO_HOME%/src/utils/traci. Then you still need to adapt the include statements to the new path:

Old: #include <utils/traci/TraCIAPI.h>
New: #include "TraCIAPI.h"

Best regards
Mirko

Am 21.02.2019 um 20:23 schrieb PETER MARCHIONE:
To All,

I am trying to run the example code shown in this page of the SUMO wiki. When I try to #include <utils/traci/TraCIAPI.h>, Visual Studio says that it cannot find several files.

image.png

I'm not sure where to find these files. I am trying to build this on a Windows 7 laptop. Sorry if this is something basic, but I'm not too familiar with building/using the Traci library.

Thanks,

Peter

_______________________________________________
sumo-user mailing list
sumo-user@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/sumo-user
_______________________________________________
sumo-user mailing list
sumo-user@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/sumo-user

Back to the top