udacity / CarND-MPC-Project

CarND Term 2 Model Predictive Control (MPC) Project
MIT License
280 stars 1.2k forks source link

uWebSockets e94b6e1 causes compiler error #15

Closed bertciccone closed 6 years ago

bertciccone commented 6 years ago

(Duplicate of https://github.com/udacity/sdc-issue-reports/issues/1251)

NodehError.txt gcc 7.2.0 already installed GNU Make 4.2.1 cmake version 3.10.0

Hello, I have not been able to resolve a compiler error that occurs while building main.cpp for SDC Project 5 MPC. I run install-mac.sh and uWebSockets compiles, but appears to have an incompatibility that I cannot figure out how to resolve. Please find NodehError.txt attached showing the install-mac.sh log and the compiler error log. I am thinking that one of the uWebSockets dependencies are not pulled over correctly? My repository is at https://github.com/bertciccone/CarND-MPC-Project NodehError.txt I would appreciate any suggestions for what to try next. Thank you!

mvirgo commented 6 years ago

Hi Bert,

Please change around the order of your #include statements to the below (these are all the ones you currently have, just re-ordered):

#include <math.h>
#include <uWS/uWS.h>
#include <chrono>
#include <iostream>
#include <thread>
#include <vector>
#include "Eigen-3.3/Eigen/Core"
#include "Eigen-3.3/Eigen/QR"
#include "MPC.h"
#include "json.hpp"
bertciccone commented 6 years ago

Thanks! I will try it today. Thanks so much for your assistance!

Sent from my mobile device.

On Dec 8, 2017, at 10:42 AM, Michael Virgo notifications@github.com wrote:

Hi Bert,

Please change around the order of your #include statements to the below (these are all the ones you currently have, just re-ordered):

include

include <uWS/uWS.h>

include

include

include

include

include "Eigen-3.3/Eigen/Core"

include "Eigen-3.3/Eigen/QR"

include "MPC.h"

include "json.hpp"

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

bertciccone commented 6 years ago

Hi Michael,

This solution works! I use Atom and atom-beautify to pretty print my sources, and that package reorders import statements for some reason, but after turning that of and using the order shown below, the compile is successful.

Thanks so much!

Bert

On Dec 8, 2017, at 10:42 AM, Michael Virgo notifications@github.com wrote:

Hi Bert,

Please change around the order of your #include statements to the below (these are all the ones you currently have, just re-ordered):

include

include <uWS/uWS.h>

include

include

include

include

include "Eigen-3.3/Eigen/Core"

include "Eigen-3.3/Eigen/QR"

include "MPC.h"

include "json.hpp"

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/udacity/CarND-MPC-Project/issues/15#issuecomment-350339876, or mute the thread https://github.com/notifications/unsubscribe-auth/AUryFWE6Od5zwDh0k_x2mNwvzph7gy4Jks5s-YMLgaJpZM4Q46Mb.