<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Programming in C&#x2F;C++?]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">Is there any tutorial showing how to develop a C or C++ on Onion?</p>
<p dir="auto">Or could you please tell me the steps for a hello world program?</p>
<p dir="auto">I don't even know if I should do cross-compilation, or if I can install the compiler on the onion. If it is cross-compilation, I would ideally prefer to do it from Windows rather than Linux.</p>
<p dir="auto">Thanks in advance!</p>
<p dir="auto">btw, I have read the "Cross Compile" (<a href="https://wiki.onion.io/Tutorials/Cross-Compile" rel="nofollow">https://wiki.onion.io/Tutorials/Cross-Compile</a>), but it looks like it is rather devoted to compile the Onion Linux kernel, so I guess it is not what I need.</p>
]]></description><link>http://community.onion.io/topic/402/programming-in-c-c</link><generator>RSS for Node</generator><lastBuildDate>Mon, 10 Aug 2026 13:16:42 GMT</lastBuildDate><atom:link href="http://community.onion.io/topic/402.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 09 Jan 2016 12:37:04 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Programming in C&#x2F;C++? on Sat, 09 Jan 2016 12:37:04 GMT]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">Is there any tutorial showing how to develop a C or C++ on Onion?</p>
<p dir="auto">Or could you please tell me the steps for a hello world program?</p>
<p dir="auto">I don't even know if I should do cross-compilation, or if I can install the compiler on the onion. If it is cross-compilation, I would ideally prefer to do it from Windows rather than Linux.</p>
<p dir="auto">Thanks in advance!</p>
<p dir="auto">btw, I have read the "Cross Compile" (<a href="https://wiki.onion.io/Tutorials/Cross-Compile" rel="nofollow">https://wiki.onion.io/Tutorials/Cross-Compile</a>), but it looks like it is rather devoted to compile the Onion Linux kernel, so I guess it is not what I need.</p>
]]></description><link>http://community.onion.io/post/3198</link><guid isPermaLink="true">http://community.onion.io/post/3198</guid><dc:creator><![CDATA[Frederic Baumann]]></dc:creator><pubDate>Sat, 09 Jan 2016 12:37:04 GMT</pubDate></item><item><title><![CDATA[Reply to Programming in C&#x2F;C++? on Sat, 09 Jan 2016 17:12:46 GMT]]></title><description><![CDATA[<p dir="auto">Go to <a href="http://www.softintegration.com/" rel="nofollow">www.softintegration.com/</a>  it is free.</p>
]]></description><link>http://community.onion.io/post/3199</link><guid isPermaLink="true">http://community.onion.io/post/3199</guid><dc:creator><![CDATA[Ruud van der Pluijm]]></dc:creator><pubDate>Sat, 09 Jan 2016 17:12:46 GMT</pubDate></item><item><title><![CDATA[Reply to Programming in C&#x2F;C++? on Sat, 09 Jan 2016 18:04:37 GMT]]></title><description><![CDATA[<p dir="auto">Many thanks, but I am actually not looking for something to learn the language, which I know already, but the steps needed to compile and run a C program on the Onion.</p>
]]></description><link>http://community.onion.io/post/3200</link><guid isPermaLink="true">http://community.onion.io/post/3200</guid><dc:creator><![CDATA[Frederic Baumann]]></dc:creator><pubDate>Sat, 09 Jan 2016 18:04:37 GMT</pubDate></item><item><title><![CDATA[Reply to Programming in C&#x2F;C++? on Sat, 09 Jan 2016 21:20:14 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="http://community.onion.io/uid/944">@Frederic-Baumann</a> Hi, a few comments and pointers on programming in C/C++ for Omega:</p>
<ol>
<li>The Omega does not have sufficient memory resources to run a C/C++ build tool chain</li>
<li>Since you are on Windows (as I am), your best bet is to set up a VM (VirtualBox or Vmware) running a standard Linux distribution - I use Kubuntu 14.04 and run cross compilation from there.  It is possible to gain direct access to the Omega from the Linux VM so long as the VM networking is set up correctly.</li>
<li>The following two posts may be of assistance to you - they cover what I am successfully doing for cross compilation of C/C++ code for the Omega:
<ul>
<li><a href="https://community.onion.io/topic/9/how-to-install-gcc/20" rel="nofollow">https://community.onion.io/topic/9/how-to-install-gcc/20</a></li>
<li><a href="https://community.onion.io/topic/125/using-netbeans-to-compile-c-c-code-for-omega" rel="nofollow">https://community.onion.io/topic/125/using-netbeans-to-compile-c-c-code-for-omega</a></li>
</ul>
</li>
</ol>
<p dir="auto">Hop these help</p>
]]></description><link>http://community.onion.io/post/3204</link><guid isPermaLink="true">http://community.onion.io/post/3204</guid><dc:creator><![CDATA[Kit Bishop]]></dc:creator><pubDate>Sat, 09 Jan 2016 21:20:14 GMT</pubDate></item><item><title><![CDATA[Reply to Programming in C&#x2F;C++? on Sun, 10 Jan 2016 07:53:34 GMT]]></title><description><![CDATA[<p dir="auto">Yes it helps, many thanks, will have a look to these links!</p>
]]></description><link>http://community.onion.io/post/3208</link><guid isPermaLink="true">http://community.onion.io/post/3208</guid><dc:creator><![CDATA[Frederic Baumann]]></dc:creator><pubDate>Sun, 10 Jan 2016 07:53:34 GMT</pubDate></item><item><title><![CDATA[Reply to Programming in C&#x2F;C++? on Sun, 10 Jan 2016 10:51:46 GMT]]></title><description><![CDATA[<p dir="auto">Just to say that it worked! Thanks a lot again. So if it may help others, here is what I did to compile my first C program for Onion:</p>
<ul>
<li>
<p dir="auto">install Kubuntu 14.04 64 bits on a VirtualBox VM</p>
</li>
<li>
<p dir="auto">follow KitBishop guidelines (great stuff initially here : <a href="https://community.onion.io/topic/9/how-to-install-gcc/22" rel="nofollow">https://community.onion.io/topic/9/how-to-install-gcc/22</a><img src="http://community.onion.io/plugins/nodebb-plugin-emoji/emoji/android/1f61e.png?v=ic093v0mjao" class="not-responsive emoji emoji-android emoji--disappointed" title="):" alt="😞" /></p>
</li>
<li>
<p dir="auto">Download the tool chain from <a href="https://s3-us-west-2.amazonaws.com/onion-cdn/community/openwrt/OpenWrt-Toolchain-ar71xx-generic_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64.tar.bz2" rel="nofollow">https://s3-us-west-2.amazonaws.com/onion-cdn/community/openwrt/OpenWrt-Toolchain-ar71xx-generic_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64.tar.bz2</a></p>
</li>
<li>
<p dir="auto">Unpack it to some suitable directory (referred to below as &lt;tc_dir&gt;)</p>
</li>
<li>
<p dir="auto">Set up environment variables as follows (I put this in my ~/.profile file so it was always there):</p>
</li>
</ul>
<p dir="auto">PATH=&lt;tc_dir&gt;/OpenWrt-Toolchain-ar71xx-generic_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/toolchain-mips_34kc_gcc-4.8-linaro_uClibc-0.9.33.2/bin:$PATH</p>
<p dir="auto">STAGING_DIR=&lt;tc_dir&gt;/OpenWrt-Toolchain-ar71xx-generic_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/toolchain-mips_34kc_gcc-4.8-linaro_uClibc-0.9.33.2</p>
<p dir="auto">export STAGING_DIR</p>
<ul>
<li>
<p dir="auto">Create your c program - e.g. test-prog.c</p>
</li>
<li>
<p dir="auto">Compile the program using (e.g.): mips-openwrt-linux-uclibc-gcc test-prog.c -o test-prog</p>
</li>
<li>
<p dir="auto">Transfer the output file (test-prog) to your Omega using you favourite tools.</p>
</li>
<li>
<p dir="auto">On the Omega in the directory you placed the file, run it by: ./test-prog - and there you are</p>
</li>
</ul>
]]></description><link>http://community.onion.io/post/3216</link><guid isPermaLink="true">http://community.onion.io/post/3216</guid><dc:creator><![CDATA[Frederic Baumann]]></dc:creator><pubDate>Sun, 10 Jan 2016 10:51:46 GMT</pubDate></item><item><title><![CDATA[Reply to Programming in C&#x2F;C++? on Sun, 10 Jan 2016 14:35:07 GMT]]></title><description><![CDATA[<p dir="auto">If it may help someone, here is a working piece of code to make a stepper engine rotate. The unipolar, 4-phase stepper engine is connected to pins 0, 1, 6, 7.</p>
<p dir="auto">The program expects one argument being the microseconds to wait between 2 half-steps. In my case, below 600 it's too fast for the engine to follow, but any value higher is fine.</p>
<p dir="auto">Thanks again KitBishop for this nice GPIO API!</p>
<p dir="auto">Cheers</p>
<p dir="auto">#include &lt;cstdlib&gt;<br />
#include &lt;stdio.h&gt;<br />
#include &lt;unistd.h&gt;<br />
#include &lt;string.h&gt;<br />
#include "GPIOPin.h"<br />
#include "GPIOAccess.h"</p>
<p dir="auto">int main(int argc, char** argv) {<br />
int d = atoi(argv[1]);<br />
printf("delay=%d\n", d);</p>
<p dir="auto">GPIOPin* pins[4];<br />
pins[0] = new GPIOPin(0);<br />
pins[1] = new GPIOPin(1);<br />
pins[2] = new GPIOPin(6);<br />
pins[3] = new GPIOPin(7);<br />
for (int i = 0; i &lt; 4; i++) {<br />
pins[i]-&gt;setDirection(GPIO_OUTPUT);<br />
}<br />
int i = 0, j = 3;<br />
for (;;) {<br />
pins[i]-&gt;set(1);<br />
usleep(d);<br />
pins[j]-&gt;set(0);<br />
usleep(d);<br />
j = i++;<br />
i = i % 4;<br />
}<br />
return 0;<br />
}</p>
]]></description><link>http://community.onion.io/post/3225</link><guid isPermaLink="true">http://community.onion.io/post/3225</guid><dc:creator><![CDATA[Frederic Baumann]]></dc:creator><pubDate>Sun, 10 Jan 2016 14:35:07 GMT</pubDate></item><item><title><![CDATA[Reply to Programming in C&#x2F;C++? on Sun, 10 Jan 2016 14:49:14 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="http://community.onion.io/uid/944">@Frederic-Baumann</a> Cool <img src="http://community.onion.io/plugins/nodebb-plugin-emoji/emoji/android/1f642.png?v=ic093v0mjao" class="not-responsive emoji emoji-android emoji--slightly_smiling_face" title=":-)" alt="🙂" /> Glad my code is of use.<br />
Your code is not dissimilar to what I have used on Arduino for driving a stepper motor.</p>
]]></description><link>http://community.onion.io/post/3227</link><guid isPermaLink="true">http://community.onion.io/post/3227</guid><dc:creator><![CDATA[Kit Bishop]]></dc:creator><pubDate>Sun, 10 Jan 2016 14:49:14 GMT</pubDate></item><item><title><![CDATA[Reply to Programming in C&#x2F;C++? on Wed, 08 Mar 2017 15:43:23 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="http://community.onion.io/uid/19">@Kit-Bishop</a> help please<br />
<strong>i want to cross compile C++ to omega 2 but failed</strong><br />
<strong>i do every thing i know !</strong><br />
<strong>most of tutorials not clear</strong><br />
<strong>they just say some words</strong><br />
<strong>im beginner in Linux</strong><br />
<strong>please help !</strong><br />
** i download the tool chain for 32,64 , change the path , write simple hello word file , compiled it<br />
transferred to onion by winscp , change mode , execute it !! get error like below !!<br />
./asd: line 1: syntax error: unexpected "&amp;" (expecting ")")<br />
what can i do ???? **</p>
]]></description><link>http://community.onion.io/post/11885</link><guid isPermaLink="true">http://community.onion.io/post/11885</guid><dc:creator><![CDATA[anglo marc]]></dc:creator><pubDate>Wed, 08 Mar 2017 15:43:23 GMT</pubDate></item><item><title><![CDATA[Reply to Programming in C&#x2F;C++? on Wed, 08 Mar 2017 16:05:51 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="http://community.onion.io/uid/2857">@anglo-marc</a> the onion <a href="https://wiki.onion.io/Tutorials/Cross-Compile" rel="nofollow">tutorial</a> is for Omega 1, not Omega2. Did you use the MIPSel (little-endian) compiler?</p>
<p dir="auto">In my <a href="https://community.onion.io/topic/1592/project-docker-omega2-sdk-for-cross-compilation-cmake-support" rel="nofollow">docker project</a> you can find a long conversation between another apprentice in compiling for Omega2 and me, and in the OP a little introduction to <em>How to compile C code</em> (right before the <em>Edit 1</em>)</p>
<p dir="auto">If you have a toolchain already set, you don't need Docker. Everything said in the post that must be executed inside the docker container is what you must do with your own toolchain, if it is the right one, the MIPSel 24kc.</p>
]]></description><link>http://community.onion.io/post/11886</link><guid isPermaLink="true">http://community.onion.io/post/11886</guid><dc:creator><![CDATA[José Luis Cánovas]]></dc:creator><pubDate>Wed, 08 Mar 2017 16:05:51 GMT</pubDate></item><item><title><![CDATA[Reply to Programming in C&#x2F;C++? on Thu, 09 Mar 2017 13:58:51 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="http://community.onion.io/uid/2945">@José-Luis-Cánovas</a> said in <a href="/topic/402/programming-in-c-c/10">Programming in C/C++?</a>:</p>
<blockquote>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="http://community.onion.io/uid/2857">@anglo-marc</a> the onion <a href="https://wiki.onion.io/Tutorials/Cross-Compile" rel="nofollow">tutorial</a> is for Omega 1, not Omega2. Did you use the MIPSel (little-endian) compiler?</p>
<p dir="auto">In my <a href="https://community.onion.io/topic/1592/project-docker-omega2-sdk-for-cross-compilation-cmake-support" rel="nofollow">docker project</a> you can find a long conversation between another apprentice in compiling for Omega2 and me, and in the OP a little introduction to <em>How to compile C code</em> (right before the <em>Edit 1</em>)</p>
<p dir="auto">If you have a toolchain already set, you don't need Docker. Everything said in the post that must be executed inside the docker container is what you must do with your own toolchain, if it is the right one, the MIPSel 24kc.</p>
</blockquote>
<p dir="auto"><strong>thanks dear for replaying</strong><br />
<strong>actually im beginner in this field</strong><br />
and unfortunately there are no Clear tutorials to explain that !<br />
the Onion did not release enough resources !</p>
]]></description><link>http://community.onion.io/post/11913</link><guid isPermaLink="true">http://community.onion.io/post/11913</guid><dc:creator><![CDATA[anglo marc]]></dc:creator><pubDate>Thu, 09 Mar 2017 13:58:51 GMT</pubDate></item><item><title><![CDATA[Reply to Programming in C&#x2F;C++? on Fri, 10 Mar 2017 16:02:42 GMT]]></title><description><![CDATA[<p dir="auto">Wow, I have actually managed to get this to work!</p>
<p dir="auto">The biggest problem was getting the environment variables to remain valid over a reboot! Thanks very much for the pointers.</p>
]]></description><link>http://community.onion.io/post/11950</link><guid isPermaLink="true">http://community.onion.io/post/11950</guid><dc:creator><![CDATA[Ian Marchant]]></dc:creator><pubDate>Fri, 10 Mar 2017 16:02:42 GMT</pubDate></item><item><title><![CDATA[Reply to Programming in C&#x2F;C++? on Mon, 13 Mar 2017 18:54:03 GMT]]></title><description><![CDATA[<p dir="auto">It looks like i can compile and run fairly simple command line code at the moment. if i try and compile ogps (for example) then i get a number of errors which relate to additional libraries and header files and so on.</p>
<p dir="auto">I have managed to get as far as</p>
<pre><code>CLEAN SUCCESSFUL (total time: 60ms)
cd '/home/ianm/ogps'
/usr/bin/make -f Makefile
[ 33%] Building C object CMakeFiles/ugps.dir/main.c.o
[ 66%] Building C object CMakeFiles/ugps.dir/nmea.c.o
[100%] Linking C executable ugps
/home/ianm/toolchain/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.15/bin/../lib/gcc/mipsel-openwrt-linux-musl/5.4.0/../../../../mipsel-openwrt-linux-musl/bin/ld: cannot find -lubox
/home/ianm/toolchain/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.15/bin/../lib/gcc/mipsel-openwrt-linux-musl/5.4.0/../../../../mipsel-openwrt-linux-musl/bin/ld: cannot find -lubus
collect2: error: ld returned 1 exit status
CMakeFiles/ugps.dir/build.make:120: recipe for target 'ugps' failed
make[2]: *** [ugps] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/ugps.dir/all' failed
make[1]: *** [CMakeFiles/ugps.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2
</code></pre>
<p dir="auto">has anyone else tried this yet? I think it is upset about libraries but I am not 100% on this as the whole linux things is a bit new to me at present.</p>
]]></description><link>http://community.onion.io/post/12061</link><guid isPermaLink="true">http://community.onion.io/post/12061</guid><dc:creator><![CDATA[Ian Marchant]]></dc:creator><pubDate>Mon, 13 Mar 2017 18:54:03 GMT</pubDate></item><item><title><![CDATA[Reply to Programming in C&#x2F;C++? on Mon, 13 Mar 2017 21:21:41 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="http://community.onion.io/uid/2180">@Ian-Marchant</a> you have to select in <code>make menuconfig</code> <em>ubos</em> and <em>ubus</em>, compile with <code>make</code>.<br />
Check <a href="https://community.onion.io/topic/1592/project-docker-omega2-sdk-for-cross-compilation-cmake-support/26" rel="nofollow">this post</a> in my docker project about getting onion libraries, it explains where the library files will appear. You don't need to add onion feeds, but the thread is full with problems and solutions.</p>
]]></description><link>http://community.onion.io/post/12065</link><guid isPermaLink="true">http://community.onion.io/post/12065</guid><dc:creator><![CDATA[José Luis Cánovas]]></dc:creator><pubDate>Mon, 13 Mar 2017 21:21:41 GMT</pubDate></item><item><title><![CDATA[Reply to Programming in C&#x2F;C++? on Tue, 14 Mar 2017 13:25:33 GMT]]></title><description><![CDATA[<p dir="auto">while the onion site not provide good support !<br />
ex.. the omega2+ dist. is lede ..<br />
in lede site i found some info about the supported distrib. of linux that can use it ! to cross compile !</p>
<p dir="auto">so &gt;&gt; why this ?</p>
<p dir="auto">check link below !<br />
<a href="https://lede-project.org/docs/guide-developer/install-buildsystem" rel="nofollow">https://lede-project.org/docs/guide-developer/install-buildsystem</a><br />
my os . Ubuntu 14<br />
not supported !</p>
<p dir="auto">hope some serious support from official onion .</p>
]]></description><link>http://community.onion.io/post/12081</link><guid isPermaLink="true">http://community.onion.io/post/12081</guid><dc:creator><![CDATA[anglo marc]]></dc:creator><pubDate>Tue, 14 Mar 2017 13:25:33 GMT</pubDate></item><item><title><![CDATA[Reply to Programming in C&#x2F;C++? on Tue, 14 Mar 2017 14:40:35 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="http://community.onion.io/uid/2857">@anglo-marc</a> said in <a href="/topic/402/programming-in-c-c/15">Programming in C/C++?</a>:</p>
<blockquote>
<p dir="auto">hope some serious support from official onion .</p>
</blockquote>
<p dir="auto">There have already been a lot of threads here explaining how to build C programs, both via building a LEDE cross toolchain as part of a "close enough" LEDE build, or by a ready-to-go docker virtual machine image that has been offered.  For someone in a position to really do native development, these work fine, and are the standard approach for an Embedded Linux system of this category.</p>
<p dir="auto">It might be important to recognize that C development isn't really a primary goal of the product, compared to scripting languages and web widgets.  Rather than chasing every varied user request (and especially those such as this that are already well covered by the community), the onion team's time would be far better spent catching up on their overdue obligations for <em>corresponding</em> source releases - the thing that <em>only they</em> can do.</p>
<p dir="auto">In comparison to something that some might call a success, like the Raspberry Pi, the key takeway has to be that the system vendor there is <em>only</em> providing the Hardware and the directly <em>required</em> GPL sources - most of the resources people think of in the pi ecosystem, including Raspbian itself, <strong>do not come from the hardware vendor</strong>.  It's a rich ecosystem precisely because they have enabled their community, and not restricted it to the glacial pace of doing everything themselves.</p>
]]></description><link>http://community.onion.io/post/12082</link><guid isPermaLink="true">http://community.onion.io/post/12082</guid><dc:creator><![CDATA[Chris Stratton]]></dc:creator><pubDate>Tue, 14 Mar 2017 14:40:35 GMT</pubDate></item><item><title><![CDATA[Reply to Programming in C&#x2F;C++? on Tue, 14 Mar 2017 14:55:46 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="http://community.onion.io/uid/2602">@Chris-Stratton</a> said in <a href="/topic/402/programming-in-c-c/16">Programming in C/C++?</a>:</p>
<blockquote>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="http://community.onion.io/uid/2857">@anglo-marc</a> said in <a href="/topic/402/programming-in-c-c/15">Programming in C/C++?</a>:</p>
<blockquote>
<p dir="auto">hope some serious support from official onion .</p>
</blockquote>
<p dir="auto">There have already been a lot of threads here explaining how to build C programs, both via building a LEDE cross toolchain as part of a "close enough" LEDE build, or by a ready-to-go docker virtual machine image that has been offered.  For someone in a position to really do native development, these work fine, and are the standard approach for an Embedded Linux system of this category.</p>
<p dir="auto">It might be important to recognize that C development isn't really a primary goal of the product, compared to scripting languages and web widgets.  Rather than chasing every varied user request (and especially those such as this that are already well covered by the community), the onion team's time would be far better spent catching up on their overdue obligations for <em>corresponding</em> source releases - the thing that <em>only they</em> can do.</p>
<p dir="auto">In comparison to something that some might call a success, like the Raspberry Pi, the key takeway has to be that the system vendor there is <em>only</em> providing the Hardware and the directly <em>required</em> GPL sources - most of the resources people think of in the pi ecosystem, including Raspbian itself, <strong>do not come from the hardware vendor</strong>.  It's a rich ecosystem precisely because they have enabled their community, and not restricted it to the glacial pace of doing everything themselves.</p>
</blockquote>
<p dir="auto">thanks for interesting<br />
but .. realy !!<br />
the steps not clear !</p>
]]></description><link>http://community.onion.io/post/12084</link><guid isPermaLink="true">http://community.onion.io/post/12084</guid><dc:creator><![CDATA[anglo marc]]></dc:creator><pubDate>Tue, 14 Mar 2017 14:55:46 GMT</pubDate></item><item><title><![CDATA[Reply to Programming in C&#x2F;C++? on Tue, 14 Mar 2017 15:02:51 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="http://community.onion.io/uid/2857">@anglo-marc</a> said in <a href="/topic/402/programming-in-c-c/17">Programming in C/C++?</a>:</p>
<blockquote>
<p dir="auto">the steps not clear !</p>
</blockquote>
<p dir="auto">The topic is an advanced one, but the necessary information has been provided.</p>
<p dir="auto">You'll need to spend more time reading and learning.  In particular, handling any uniqueness of your particular development machine's Linux installation is uniquely your task, not anyone else's.</p>
<p dir="auto">The intent was that those wanting a simple path would be using pre-built capabilities and scripting languages, not C.</p>
]]></description><link>http://community.onion.io/post/12086</link><guid isPermaLink="true">http://community.onion.io/post/12086</guid><dc:creator><![CDATA[Chris Stratton]]></dc:creator><pubDate>Tue, 14 Mar 2017 15:02:51 GMT</pubDate></item><item><title><![CDATA[Reply to Programming in C&#x2F;C++? on Mon, 14 Jan 2019 01:46:26 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="http://community.onion.io/uid/944">@Frederic-Baumann</a> hi sir<br />
can u give me the gpio library of your version ?<br />
and why i cannot compile it in C++ compiler even though i already switch it from C compiler to C++<br />
Here's my error<br />
$ gccmips --std=gnu++11 sm_rotate.c -I../../libnewgpio/</p>
<p dir="auto">gccmips: warning: environment variable 'STAGING_DIR' not defined<br />
cc1: warning: command line option '-std=gnu++11' is valid for C++/ObjC++ but not for C [enabled by default]<br />
In file included from ../libnewgpio/hdr/GPIOPin.h:5:0,<br />
from sm_rotate.c:5:<br />
../libnewgpio/hdr/GPIOTypes.h:37:24: error: expected '=', ',', ';', 'asm' or '<strong>attribute</strong>' before '{' token<br />
GPIO_Irq_Handler_Object{<br />
^<br />
../libnewgpio/hdr/GPIOTypes.h:44:28: error: expected '=', ',', ';', 'asm' or '<strong>attribute</strong>' before '{' token<br />
GPIO_PulseIn_Handler_Object{<br />
^<br />
In file included from sm_rotate.c:5:0:<br />
../libnewgpio/hdr/GPIOPin.h:7:1: error: unknown type name 'class'<br />
class GPIOPin {<br />
^<br />
../libnewgpio/hdr/GPIOPin.h:7:15: error: expected '=', ',', ';', 'asm' or '<strong>attribute</strong>' before '{' token<br />
class GPIOPin {<br />
^<br />
In file included from ../libnewgpio/hdr/GPIOAccess.h:13:0,<br />
from sm_rotate.c:6:<br />
../libnewgpio/hdr/GPIOPwmPin.h:10:1: error: unknown type name 'class'<br />
class GPIOPwmPin {<br />
^<br />
../libnewgpio/hdr/GPIOPwmPin.h:10:18: error: expected '=', ',', ';', 'asm' or '<strong>attribute</strong>' before '{' token<br />
class GPIOPwmPin {<br />
^<br />
In file included from ../libnewgpio/hdr/GPIOAccess.h:14:0,<br />
from sm_rotate.c:6:<br />
../libnewgpio/hdr/GPIOIrqInfo.h:7:5: error: unknown type name 'GPIO_Irq_Type'<br />
GPIO_Irq_Type type;<br />
^<br />
../libnewgpio/hdr/GPIOIrqInfo.h:9:5: error: unknown type name 'GPIO_Irq_Handler_Object'<br />
GPIO_Irq_Handler_Object * handlerObj;<br />
^<br />
../libnewgpio/hdr/GPIOIrqInfo.h:10:5: error: unknown type name 'bool'<br />
bool enabled;<br />
^<br />
In file included from ../libnewgpio/hdr/GPIOAccess.h:15:0,<br />
from sm_rotate.c:6:<br />
../libnewgpio/hdr/GPIOPulseInPin.h:7:1: error: unknown type name 'class'<br />
class GPIOPulseInPin {<br />
^<br />
../libnewgpio/hdr/GPIOPulseInPin.h:7:22: error: expected '=', ',', ';', 'asm' or '<strong>attribute</strong>' before '{' token<br />
class GPIOPulseInPin {<br />
^<br />
In file included from sm_rotate.c:6:0:<br />
../libnewgpio/hdr/GPIOAccess.h:21:1: error: unknown type name 'class'<br />
class GPIOAccess {<br />
^<br />
../libnewgpio/hdr/GPIOAccess.h:21:18: error: expected '=', ',', ';', 'asm' or '<strong>attribute</strong>' before '{' token<br />
class GPIOAccess {<br />
^<br />
sm_rotate.c: In function 'main':<br />
sm_rotate.c:14:2: error: unknown type name 'GPIOPin'<br />
GPIOPin* pins[4];<br />
^<br />
sm_rotate.c:15:12: error: 'new' undeclared (first use in this function)<br />
pins[0] = new GPIOPin(0);<br />
^<br />
sm_rotate.c:15:12: note: each undeclared identifier is reported only once for each function it appears in<br />
sm_rotate.c:15:16: error: expected ';' before 'GPIOPin'<br />
pins[0] = new GPIOPin(0);<br />
^<br />
sm_rotate.c:16:16: error: expected ';' before 'GPIOPin'<br />
pins[1] = new GPIOPin(1);<br />
^<br />
sm_rotate.c:17:16: error: expected ';' before 'GPIOPin'<br />
pins[2] = new GPIOPin(6);<br />
^<br />
sm_rotate.c:18:16: error: expected ';' before 'GPIOPin'<br />
pins[3] = new GPIOPin(7);<br />
^<br />
sm_rotate.c:20:2: error: 'for' loop initial declarations are only allowed in C99 mode<br />
for (int i = 0; i &lt; 4; i++)<br />
^<br />
sm_rotate.c:20:2: note: use option -std=c99 or -std=gnu99 to compile your code<br />
sm_rotate.c:22:10: error: request for member 'setDirection' in something not a structure or union<br />
pins[i]-&gt;setDirection(GPIO_OUTPUT);<br />
^<br />
sm_rotate.c:25:6: error: redefinition of 'i'<br />
int i = 0, j = 3;<br />
^<br />
sm_rotate.c:20:11: note: previous definition of 'i' was here<br />
for (int i = 0; i &lt; 4; i++)<br />
^<br />
sm_rotate.c:28:10: error: request for member 'set' in something not a structure or union<br />
pins[i]-&gt;set(1);<br />
^<br />
sm_rotate.c:30:10: error: request for member 'set' in something not a structure or union<br />
pins[j]-&gt;set(0);</p>
]]></description><link>http://community.onion.io/post/18676</link><guid isPermaLink="true">http://community.onion.io/post/18676</guid><dc:creator><![CDATA[Raymond Cahyadi]]></dc:creator><pubDate>Mon, 14 Jan 2019 01:46:26 GMT</pubDate></item><item><title><![CDATA[Reply to Programming in C&#x2F;C++? on Mon, 14 Jan 2019 14:19:05 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="http://community.onion.io/uid/6217">@Raymond-Cahyadi</a> "gccmips: warning: environment variable 'STAGING_DIR' not defined" - fix that first &amp; the others will probably fix themselves.   See <a href="https://docs.onion.io/omega2-docs/cross-compiling.html" rel="nofollow">https://docs.onion.io/omega2-docs/cross-compiling.html</a></p>
]]></description><link>http://community.onion.io/post/18678</link><guid isPermaLink="true">http://community.onion.io/post/18678</guid><dc:creator><![CDATA[mawg]]></dc:creator><pubDate>Mon, 14 Jan 2019 14:19:05 GMT</pubDate></item></channel></rss>