down vote
I've verified the tutorial works on various environments,
- Host: Ubuntu 14.04, gcc version 4.8.4, cmake version 2.8.12.2, build succesfully.
- Host: Ubuntu 14.04, gcc version 4.9.3, cmake version 2.8.12.2, build succesfully.
- Host: Ubuntu 14.04, gcc version 4.9.3, cmake version 3.3.2, build succesfully.
- Host: Bash On Ubuntu On Windows, gcc version 4.8.4, cmake version 2.8.12.2, build succesfully.
Interesting thing is although gcc(>=4.9) and cmake(>=3.0) is recommended per this page, I found gcc 4.8 and cmake 2.8 also works find with this tutorial.
Anyway, you need to make sure you follow the steps thoroughly,
- Clone iot-hub-c-raspberrypi-getstartedkit and WiringPi repositories, with the --recursiveparameter.
- Go to WiringPi and do ./build. This step is not mentioned in the tutorial but I found it necessary.
-
Make sure you have all the tools installed,
sudo apt-get install curl libcurl4-openssl-dev uuid-dev uuid g++ make cmake git unzip openjdk-7-jre libssl-dev libncurses-dev subversion gawk
-
Build the source code,
cd ~/iot-hub-c-raspberrypi-getstartedkit/
sudo ~/iot-hub-c-raspberrypi-getstartedkit/azure-iot- sdks/c/build_all/linux/setup.sh chmod +x ~/iot-hub-c-raspberrypi-getstartedkit/sample/build.sh
~/iot-hub-c-raspberrypi-getstartedkit/sample/build.sh
I've verified following the steps above, it builds successfully on various environments.