2

I have a pi zero that I have to develop a project for. Unfortunately the Pi has to be remote so it isn't the best, hardware and input wise, to develop on. I can do SSH and I can do samba and even teamviewer so I was wondering...

I need to develop a C++ project on it. What would be the ideal way of doing this? My main computer is running windows 10.

I was thinking maybe editing the source files in, say... notepad++, saving them via samba, and just building it on the raspberry via ssh.

But maybe there is a better way that allows me to use an IDE and just upload executables? Thanks.

  • 1
    The normative approach here is to use whatever IDE you want and work with remote access to (part or all of) the Pi's filesystem, and compile and test remotely: raspberrypi.stackexchange.com/q/36398/5538 WRT the IDE though, you may want to use something MinGW based since it will use the same compiler (GCC) as used on the pi, and should also provide the POSIX/Linux headers locally for code completion, etc. – goldilocks Oct 30 '17 at 19:40
  • Thanks, that was more or less what I was thinking. Just wanted to make sure I was heading in the right direction and not realize it halfway through development. – Kronephon Oct 30 '17 at 19:51
  • Better practice than transferring by ssh would be to use revision control (cvs, svn, hg, etc.) and use that to move code around. – Brick Oct 30 '17 at 21:58
  • I typically set up an sshfs mount on the localhost from the raspberry pi, and work directly on the files on the pi, right through my IDE. I am however not entirely sure that Windows supports an sshfs mount, but it's worth a look. – stevieb Oct 31 '17 at 15:32
0

The normative approach to Pi oriented development is to work remotely with files on the pi mounted over a network, using, for example, Samba, NFS, or SSHFS:

Development on Raspberry Pi

With regard to your IDE, you may want to look into something MinGW oriented, as this will use the same compiler (GCC) as used on the pi for things like code completion and error checking. You probably want to configure things to use the include path on the Pi (/usr/include, /usr/local/include), also accessed remotely.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.