<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="bbPress/1.0.2" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>LeafLabs Garden &#187; Topic: converting library arduino-maple</title>
		<link>http://forums.leaflabs.com/topic.php?id=74432</link>
		<description>A place to share, learn, and grow...</description>
		<language>en-US</language>
		<pubDate>Fri, 22 Jan 2016 00:04:17 +0000</pubDate>
		<generator>http://bbpress.org/?v=1.0.2</generator>
		<textInput>
			<title><![CDATA[Search]]></title>
			<description><![CDATA[Search all topics from these forums.]]></description>
			<name>q</name>
			<link>http://forums.leaflabs.com/search.php</link>
		</textInput>
		<atom:link href="http://forums.leaflabs.com/rss.php?topic=74432" rel="self" type="application/rss+xml" />

		<item>
			<title>gbulmer on "converting library arduino-maple"</title>
			<link>http://forums.leaflabs.com/topic.php?id=74432#post-105735</link>
			<pubDate>Sat, 16 May 2015 04:49:58 +0000</pubDate>
			<dc:creator>gbulmer</dc:creator>
			<guid isPermaLink="false">105735@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;A useful technique to learn how to fix bugs in programs is to copy and paste the compiler's error messages into google search.&#60;/p&#62;
&#60;p&#62;For example&#60;br /&#62;
error: 'malloc' was not declared in this scope&#60;/p&#62;
&#60;p&#62;One page this finds is&#60;br /&#62;
&#60;a href=&#34;http://stackoverflow.com/questions/11425136/error-when-using-g-malloc-was-not-declared-in-this-scope&#34; rel=&#34;nofollow&#34;&#62;http://stackoverflow.com/questions/11425136/error-when-using-g-malloc-was-not-declared-in-this-scope&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;As I wrote above:&#60;/p&#62;
&#60;blockquote&#62;&#60;p&#62;
If you read the error messages you have posted, you will see some are:&#60;br /&#62;
&#34;error: 'calloc' was not declared in this scope&#34;&#60;br /&#62;
&#34;error: 'malloc' was not declared in this scope&#34;&#60;br /&#62;
&#34;error: 'rand' was not declared in this scope&#34;&#60;br /&#62;
&#34;error: 'RAND_MAX' was not declared in this scope&#34;&#60;/p&#62;
&#60;p&#62;These are, as the error message says, caused by having no declaration of those functions and identifiers.&#60;br /&#62;
This is likely because the code does not #include the right header files.&#60;/p&#62;
&#60;/blockquote&#62;
&#60;p&#62;You need to identify the correct header file to #include.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>valeriosv on "converting library arduino-maple"</title>
			<link>http://forums.leaflabs.com/topic.php?id=74432#post-105734</link>
			<pubDate>Thu, 14 May 2015 10:32:06 +0000</pubDate>
			<dc:creator>valeriosv</dc:creator>
			<guid isPermaLink="false">105734@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Thank you foy your reply, you right, i should post the entire code...&#60;/p&#62;
&#60;p&#62;First of all the code should be use to create a virtual neural network, i am working with some friends, but we don't have knowledge in c++ computing, so we don't know exactly what to change,&#60;br /&#62;
the code use, neuroduino library..&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;https://gist.githubusercontent.com/anonymous/2e01166b105b3317bc0c/raw/381b4624d098acab05e66c5b3b6db8abacb29f87/gistfile1.txt&#34; rel=&#34;nofollow&#34;&#62;https://gist.githubusercontent.com/anonymous/2e01166b105b3317bc0c/raw/381b4624d098acab05e66c5b3b6db8abacb29f87/gistfile1.txt&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;and this is the sketch:&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;https://gist.githubusercontent.com/anonymous/8451c48ad0f61f60da8d/raw/2e57206254539137c4fc026dccbb999799c8ef87/gistfile1.txt&#34; rel=&#34;nofollow&#34;&#62;https://gist.githubusercontent.com/anonymous/8451c48ad0f61f60da8d/raw/2e57206254539137c4fc026dccbb999799c8ef87/gistfile1.txt&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;As you can see it isn't commented so it's not very easy to understand, but in general the problem in the conversion is that the function are not present in the libraries..&#60;/p&#62;
&#60;p&#62;(We let it work on arduino changing WProgram.h with Arduino.h because it's an old version of the libraries, but it's not rilevant for Maple.)&#60;/p&#62;
&#60;p&#62;Valeriosv
&#60;/p&#62;</description>
		</item>
		<item>
			<title>gbulmer on "converting library arduino-maple"</title>
			<link>http://forums.leaflabs.com/topic.php?id=74432#post-105733</link>
			<pubDate>Tue, 12 May 2015 06:54:41 +0000</pubDate>
			<dc:creator>gbulmer</dc:creator>
			<guid isPermaLink="false">105733@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;@valeriosv, welcome to the forum.&#60;/p&#62;
&#60;p&#62;I believe none of those error messages are due to &#34;int*&#34; vs &#34;int *&#34;.&#60;br /&#62;
That is legal syntax for C and C++ for both Maple and Arduino. Space characters are not significant in C/C++.&#60;/p&#62;
&#60;p&#62;You can quickly and easily prove this for yourself by loading, for example, the blink program, and adding a few lines like:&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;int* a1;
int * a2;
int*a3;
int *a4 ;

void setup() {
    // Set up the built-in LED pin as an output:
    pinMode(BOARD_LED_PIN, OUTPUT);
}

void loop() {
    toggleLED();          // Turn the LED from off to on, or on to off
    delay(1000);          // Wait for 1 second (1000 milliseconds)
}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;The code compiles without errors.&#60;/p&#62;
&#60;p&#62;It helps to post the code which contains the errors, so that we can ensure we are looking at the same code as you.&#60;br /&#62;
There is some good advice in the thread &#60;a href=&#34;http://forums.leaflabs.com/topic.php?id=994&#34;&#62;&#34;Guidelines for Posting&#34;&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;Computing is a great science because it is often cheap and easy to check a theory with an experiment. &#60;/p&#62;
&#60;p&#62;If you think something is wrong, try to reduce it to the smallest, simplest case which still has the error. Often doing this is enough to help you see the error yourself. If that small simple case has an error you can't understand, it is helpful to us because we only need read and analyse a small piece of code.&#60;/p&#62;
&#60;p&#62;If you read the error messages you have posted, you will see some are:&#60;br /&#62;
&#34;error: 'calloc' was not declared in this scope&#34;&#60;br /&#62;
&#34;error: 'malloc' was not declared in this scope&#34;&#60;br /&#62;
&#34;error: 'rand' was not declared in this scope&#34;&#60;br /&#62;
&#34;error: 'RAND_MAX' was not declared in this scope&#34;&#60;/p&#62;
&#60;p&#62;These are, as the error message says, caused by having no declaration of those functions and identifiers.&#60;br /&#62;
This is likely because the code does not #include the right header files.&#60;br /&#62;
This would be easier to diagnose more definitely if you post the code.&#60;/p&#62;
&#60;p&#62;Almost all of the others are warnings like these:&#60;br /&#62;
&#34;warning: deprecated conversion from string constant to 'char*'&#34;&#60;br /&#62;
I assume the system that the code was previously compiled on did not have as many compiler warning switched on as the Maple IDE. This is potentially a very real problem. But, assuming the code runs on an Arduino, it should be okay on a Maple.&#60;/p&#62;
&#60;p&#62;You could try to ignore these for now. The compiler should generate code. These may be ignored providing the code does NOT try to write into those strings.&#60;br /&#62;
Again, this would be easier to diagnose more definitely if you post the code.&#60;/p&#62;
&#60;p&#62;The other warning is:&#60;br /&#62;
&#34;warning: unused variable 'temp'&#34;&#60;br /&#62;
that is likely a coding error, or the code which is using it has been #if'd out or commented out.&#60;br /&#62;
Once more, this would be easier to diagnose more definitely if you post the code.&#60;/p&#62;
&#60;p&#62;You may have got a poor response to your post from the community because: a) your diagnosis of the cause is not an error in C/C++, b) it has no evidence in the error messages you posted, and c) there was no code posted for anyone to read, and so good reasons to treat the post as a troll. All of that is easy for you to fix. So please don't let this put you off. &#60;/p&#62;
&#60;p&#62;(Full disclosure: I am not a member of LeafLabs staff.)
&#60;/p&#62;</description>
		</item>
		<item>
			<title>valeriosv on "converting library arduino-maple"</title>
			<link>http://forums.leaflabs.com/topic.php?id=74432#post-105732</link>
			<pubDate>Fri, 08 May 2015 02:25:48 +0000</pubDate>
			<dc:creator>valeriosv</dc:creator>
			<guid isPermaLink="false">105732@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Hello&#60;/p&#62;
&#60;p&#62;I'm new and this is my first approach with maple, I've to use code write for arduino that use libraries of cpp, but i met some problems, for example some pointer are difine like int* and into the arduino IDE it works but on maple IDE doesn't, because the pointer in the libraries are defined as int * with the space&#60;br /&#62;
this is a part of the log error&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;Also note that because of preprocessing, line numbers won&#38;#39;t match up exactly.  We&#38;#39;re working on a fix.
D:\stack objectdock\elettronica\olimexino\maple-ide-0.0.12-windowsxp32\libraries\Neuroduino\Neuroduino.cpp: In constructor &#38;#39;Neuroduino::Neuroduino(int*, int, double, double, boolean)&#38;#39;:
D:\stack objectdock\elettronica\olimexino\maple-ide-0.0.12-windowsxp32\libraries\Neuroduino\Neuroduino.cpp:23: warning: deprecated conversion from string constant to &#38;#39;char*&#38;#39;
D:\stack objectdock\elettronica\olimexino\maple-ide-0.0.12-windowsxp32\libraries\Neuroduino\Neuroduino.cpp:26: error: &#38;#39;calloc&#38;#39; was not declared in this scope
D:\stack objectdock\elettronica\olimexino\maple-ide-0.0.12-windowsxp32\libraries\Neuroduino\Neuroduino.cpp:37: error: &#38;#39;malloc&#38;#39; was not declared in this scope
D:\stack objectdock\elettronica\olimexino\maple-ide-0.0.12-windowsxp32\libraries\Neuroduino\Neuroduino.cpp: In member function &#38;#39;double Neuroduino::randomEqualDouble(double, double)&#38;#39;:
D:\stack objectdock\elettronica\olimexino\maple-ide-0.0.12-windowsxp32\libraries\Neuroduino\Neuroduino.cpp:66: error: &#38;#39;rand&#38;#39; was not declared in this scope
D:\stack objectdock\elettronica\olimexino\maple-ide-0.0.12-windowsxp32\libraries\Neuroduino\Neuroduino.cpp:66: error: &#38;#39;RAND_MAX&#38;#39; was not declared in this scope
D:\stack objectdock\elettronica\olimexino\maple-ide-0.0.12-windowsxp32\libraries\Neuroduino\Neuroduino.cpp: In member function &#38;#39;void Neuroduino::printNet()&#38;#39;:
D:\stack objectdock\elettronica\olimexino\maple-ide-0.0.12-windowsxp32\libraries\Neuroduino\Neuroduino.cpp:94: warning: deprecated conversion from string constant to &#38;#39;char*&#38;#39;
D:\stack objectdock\elettronica\olimexino\maple-ide-0.0.12-windowsxp32\libraries\Neuroduino\Neuroduino.cpp:96: warning: deprecated conversion from string constant to &#38;#39;char*&#38;#39;
D:\stack objectdock\elettronica\olimexino\maple-ide-0.0.12-windowsxp32\libraries\Neuroduino\Neuroduino.cpp:98: warning: deprecated conversion from string constant to &#38;#39;char*&#38;#39;
D:\stack objectdock\elettronica\olimexino\maple-ide-0.0.12-windowsxp32\libraries\Neuroduino\Neuroduino.cpp:100: warning: deprecated conversion from string constant to &#38;#39;char*&#38;#39;
D:\stack objectdock\elettronica\olimexino\maple-ide-0.0.12-windowsxp32\libraries\Neuroduino\Neuroduino.cpp: In member function &#38;#39;void Neuroduino::randomizeWeights()&#38;#39;:
D:\stack objectdock\elettronica\olimexino\maple-ide-0.0.12-windowsxp32\libraries\Neuroduino\Neuroduino.cpp:120: warning: unused variable &#38;#39;temp&#38;#39;
D:\stack objectdock\elettronica\olimexino\maple-ide-0.0.12-windowsxp32\libraries\Neuroduino\Neuroduino.cpp: In member function &#38;#39;void Neuroduino::train(int*, int*)&#38;#39;:
D:\stack objectdock\elettronica\olimexino\maple-ide-0.0.12-windowsxp32\libraries\Neuroduino\Neuroduino.cpp:210: warning: deprecated conversion from string constant to &#38;#39;char*&#38;#39;
D:\stack objectdock\elettronica\olimexino\maple-ide-0.0.12-windowsxp32\libraries\Neuroduino\Neuroduino.cpp: In member function &#38;#39;int* Neuroduino::simulate(int*)&#38;#39;:
D:\stack objectdock\elettronica\olimexino\maple-ide-0.0.12-windowsxp32\libraries\Neuroduino\Neuroduino.cpp:220: warning: deprecated conversion from string constant to &#38;#39;char*&#38;#39;&#60;/code&#62;&#60;/pre&#62;</description>
		</item>

	</channel>
</rss>
