Remote cross-platform project in Eclipse - c

I would like to make a C/C++ app for OrangePi zero. As orpi zero is a pretty low power running Eclipse on it is pain.
I would prefer to run Eclipse on Windows machine and remotely build and run/debug the app on orpi. I tried to achieve this by using RSE. After setting up RSE connection I can make a remote project. Edit files but without auto-completion, showing declarations(missing headers) and so on. Also, I cannot compile or run the app.
Is there any other way than cross-compiling on Windows and deploying to remote orpi? Some way to have autocompletion and compiling directly using orpi toolchain? Or at least have auto-completion working. My biggest concern about using cross-compile toolchain is dependency hell for external libraries.
Orpi is running Armbian. Developing in Eclipse 4.9

Related

debugging error "interpreter `mi2' unrecognized" with eclipse

Debugging with eclipse ide I get this error:
"Error in services launch sequence. Interpreter `mi2' unrecognized."
This was all working a month ago so for some reason it has stopped.
I know mi2 is something to do with GDB.
Code is built using gcc-8.3.0-2019.08.0, using Freedom Studio SiFive Eclipse IDE for C/C++ Development
Version: 4.12.0.2019-08-2
I realise this is a bit niche so any suggestions welcome
Solution:
Recreate Project using Freedom-E SDK Software Project for my project - which was e310 arty (I had selected the wrong one in starting the project).
When debugging use configuration for "SiFive GDB OpenOCD Debugging."
This seemed to work.

Switch C project configuration in Eclipse between Windows and Linux

I installed Eclipse with CDT plugin. I created a simple TCP client software that runs on Windows. I can open the project on Ubuntu also. I'd like to change build configuration in order to create Linux executable. Is it possible to create executable for the operating system that the project is compiled. I mean if I compile the project on Ubuntu, there should be Linux executable and if I compile the project on Windows, there should be Windows executable. Is it possible?
It is possible. When you are creating a Project in Eclipse, you are provided with two build options. One debug and one release. The release build will create the executable for the OS in which it is run.
Good Luck!

C/C++ Run/Debug configuration in Eclipse

I am new to C/C++ development in Eclipse and trying to configure Eclipse. I'm working in a Linux environment with GNU GCC and my toolchain is detected by Eclipse. As given in the Eclipse documentation 1, I opened Run>>Run configurations. But the C/C++ Local tab is not there.
This is all I get.
But when I build a sample helloworld program, it's being built correctly.
Any idea why this happens?
1 http://help.eclipse.org/indigo/index.jsp?topic=%2Forg.eclipse.cdt.doc.user%2Ftasks%2Fcdt_t_run_com.htm
I faced same issue as you. I was able to create and build one c/c++ project, but I couldn't run/debug it. Actually, I installed wrong CDT (CDT Visual C++ Support). Next I installed correct CDT (c/c++ development tools) and after one eclipse restart I had c/c++ application inside of Run Configuration.

mod_xsendfile for Win x64?

I'm trying to install the mod_xsendfile Apache Module on Windows (7) x64 (using Apache 2.2) -- yes I'm doomed from the get-go, I know :-). Apparently there is :
a) No Win x64 binary for mod_xsendfile, just a Win32 binary from the module's website
b) No Win x64 binary for apxs from ApacheLounge
I've tried the usual LoadModule xsendfile_module modules/mod_xsendfile.so but the semi-obvious error (httpd: Syntax error on line 127 of C:/Apache/conf/httpd.conf: Cannot load C:/Apache/modules/mod_xsendfile.so into
server: The specified module could not be found.) occurs, it's not Win x64 compatible.
The question remains -- how does one build the module for x64, is that even possible ? I have VS and any tools that might be required.
I just wanted to see if this would improve my Rails protected attachment download speed - currently getting quite ghastly speeds for simple images.
Thank you in advance !
I'm the author of mod_xsendfile.
I provide win32 binaries only as a courtesy. I still recommend you build yourself from the source. That way you can be sure the binary isn't tampered with, not even by me :p
There are currently no official Win64 Apache2 (or 2.2) builds from the Apache Foundation. Since I test my builds against the official binaries I cannot be sure the binaries will work once the foundation releases official Win64 binaries. Hence no Win64 builds from me
Building from the source is pretty much straight-forward if you aren't novice to (in the Windows case) Visual Studio. The binaries ZIP and/or my github repo contain project files you may import into your Apache solution. I was told even the free Visual Studio Express should be enough to do working builds. The thing is open source.
Should there be unanticipated portability problems, I welcome patches ;)
As a last resort you can still run the official Win32 apache + mod_xsendfile on a Win64 box.
I was able to load mod_xsendfile in my system.
Here's my setup:
-Windows 7 Ultimate x64
-Apache/2.2.9 (installed via Xampp 1.6.7)
Basically, I just downloaded the module from here:
http://www.apachelounge.com/download/mods/mod_xsendfile-0.9-w32.zip
...extracted it to the "modules" directory of apache, added "LoadModule xsendfile_module modules/mod_xsendfile.so" to httpd.conf, then restarted apache.
After this, I checked the loaded modules using phpinfo(), and mod_xsendfile is already available.
Here are the binaries for both x32 and x64
https://github.com/nmaier/mod_xsendfile

Problem creating an exe from C

I've made a small application in C with Netbeans.
I've ran the application in Netbeans and it created an exe.
I used that exe and it worked fine on my comp but when I move it to other comp it says:
"This application failed to start because cygwin1.dll was not found. Re-installing the application may fix this problem."
How can i create the exe so that it runs anywhere?
The problem is you're using Cygwin GCC to compile your code. Cygwin provides a unix-like environment
if you're not doing anything Unix-y you can recomplie -mno-cygwin - see Can you statically compile a cygwin application?
if you are using Unix calls you'll need to distribute cygwin1.dll along with your app
or you can recompile with a different compiler, e.g. a GCC that targets mingw32 not cygwin, or one of the free (as-in-beer) Microsoft compilers from the platform SDK or Visual Studio Express downloads.

Resources