Closed cgu2022 closed 4 years ago
I have not tried doing this in Windows. The Unix environment in Windows should have access to the various command line tools, if they're not installed by default you can try to apt-get them (I think it is based on Ubuntu distro).
As for the issue with the
cd /PATH/TO/ev3dev-c/docker/
I think you haven't cloned the ev3dev-c repository to your drive yet. You should go to the directory you want to keep the ev3dev-c code, then:
git clone https://github.com/in4lio/ev3dev-c.git
Thanks tcwan. I followed through the instructions, but after installing the static and shared libraries like on the tutorial, I tried compiling a test cpp file that had the #include "ev3.h"
, with g++ test.cpp -lev3dev-c -o test
like I normally do on the ev3, but said it couldn't find the ev3.h file. Is there supposed to be a different way to compile the cpp files?
Also, I compiled the hello file at: "/home/robot/ev3dev-c/eg/hello" and get a hello executable. Do you know how I could transfer that file to my ev3?
Also, I compiled the hello file at: "/home/robot/ev3dev-c/eg/hello" and get a hello executable. Do you know how I could transfer that file to my ev3?
Try looking at some of the info here. You would probably need to adjust a bit for Windows, but you can get WinSCP which is a GUI version of scp for Windows. Putty provides SSH.
Thanks tcwan. I followed through the instructions, but after installing the static and shared libraries like on the tutorial, I tried compiling a test cpp file that had the
#include "ev3.h"
, withg++ test.cpp -lev3dev-c -o test
like I normally do on the ev3, but said it couldn't find the ev3.h file. Is there supposed to be a different way to compile the cpp files?
This has to do with the Include paths. You can check the Makefile.* in the ev3dev-c/eg directory to understand a bit more regarding how to configure CFLAGS and CXXFLAGS. The actual Makefile for the program is found in the respective subdirectories. The easiest is to clone one of the example subdirectories and start from there for your own code.
Note that the Makefiles in the project is a bit advanced. I don't know the details regarding how to do filename substitution and suffix conversion, but there should be something on the Internet.
So I'm trying to install the docker cross compiler, and it says that I need to clone the ev3dev-c library in the docker folder. So, I run (in powershell):
docker build https://github.com/in4lio/ev3dev-c.git#master:docker
. And it gives me:After that, I tried running:
cd /PATH/TO/ev3dev-c/docker/
but it doesn't work and gives me an error saying it can't find it. After copying the library, is there anything else I need to set-up?And also just to clarify: does the bash command line support secure copy protocol (scp) like on linux? If not, how would I transfer my compiled files to my ev3?
Thanks!