<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="bbPress/1.0.1" -->
<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>pnotepad.org forums Topic: How to compile multiple files - one project</title>
		<link>http://pnotepad.org/forums/topic/322</link>
		<description>Programmer&#039;s Notepad Forums</description>
		<language>en-US</language>
		<pubDate>Thu, 09 Sep 2010 12:32:32 +0000</pubDate>
		<generator>http://bbpress.org/?v=1.0.1</generator>
		<textInput>
			<title><![CDATA[Search]]></title>
			<description><![CDATA[Search all topics from these forums.]]></description>
			<name>q</name>
			<link>http://pnotepad.org/forums/search.php</link>
		</textInput>
		<atom:link href="http://pnotepad.org/forums/rss/topic/322" rel="self" type="application/rss+xml" />

		<item>
			<title>How to compile multiple files - one project (mohseni)</title>
			<link>http://pnotepad.org/forums/topic/322#post-7038</link>
			<pubDate>Mon, 07 Jun 2010 18:36:30 +0000</pubDate>
			<dc:creator>mohseni</dc:creator>
			<guid isPermaLink="false">7038@http://pnotepad.org/forums/</guid>
			<description>&#60;p&#62;Dear Members,&#60;/p&#62;
&#60;p&#62;I'am trying to define a function(a simple function which make a led on/off) and add it to main source code by including a header but the main source couldn't determine/define the function. I recieve below error:&#60;/p&#62;
&#60;p&#62;********* main.c12: undefined reference to 'ledon' ********&#60;/p&#62;
&#60;p&#62;some told me I should compile and linke them together. how?&#60;br /&#62;
Would you please tell me where is problem?&#60;/p&#62;
&#60;p&#62;%%%%%%%%% here is the codes %%%%%%%%%&#60;br /&#62;
main:&#60;br /&#62;
------------------------&#60;br /&#62;
#include &#38;lt;avr/io.h&#38;gt;&#60;br /&#62;
#include &#38;lt;util/delay.h&#38;gt;&#60;br /&#62;
#include &#34;ledon.h&#34;&#60;/p&#62;
&#60;p&#62;int main()&#60;br /&#62;
{&#60;br /&#62;
DDRA=0xff;&#60;br /&#62;
while(1)&#60;br /&#62;
{&#60;br /&#62;
ledon();&#60;br /&#62;
}&#60;br /&#62;
}&#60;/p&#62;
&#60;p&#62;--------------------------- Function( it's a simple function which make a led on/off---------&#60;/p&#62;
&#60;p&#62;void ledon()&#60;/p&#62;
&#60;p&#62;{&#60;br /&#62;
PORTA &#124;= 0x80;&#60;br /&#62;
_delay_ms(100);&#60;br /&#62;
PORTA &#38;amp;= ~0x80;&#60;br /&#62;
_delay_ms(100);&#60;br /&#62;
}&#60;/p&#62;
&#60;p&#62;------------------------- header---------------------&#60;br /&#62;
#ifndef MYHEADER_H&#60;br /&#62;
#define MYHEADER_H&#60;br /&#62;
void ledon();&#60;br /&#62;
#endif
&#60;/p&#62;</description>
		</item>
		<item>
			<title>How to compile multiple files - one project (superjacent)</title>
			<link>http://pnotepad.org/forums/topic/322#post-1167</link>
			<pubDate>Mon, 28 Jan 2008 02:10:49 +0000</pubDate>
			<dc:creator>superjacent</dc:creator>
			<guid isPermaLink="false">1167@http://pnotepad.org/forums/</guid>
			<description>&#60;p&#62;Thank you everyone for the advice, much appreciated.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>How to compile multiple files - one project (jumpfroggy)</title>
			<link>http://pnotepad.org/forums/topic/322#post-1162</link>
			<pubDate>Mon, 21 Jan 2008 22:40:44 +0000</pubDate>
			<dc:creator>jumpfroggy</dc:creator>
			<guid isPermaLink="false">1162@http://pnotepad.org/forums/</guid>
			<description>&#60;p&#62;I use simple makefiles that I copy and paste for new projects.  It's not like an IDE, but once you get used to it it's just as simple.&#60;/p&#62;
&#60;p&#62;Say I have two files, program.cpp and library.cpp.  Here's my makefile:&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;RunThis.exe : program.o library.o
     gcc -o $@ $^
#    $@ means target (RunThis.exe)
#    $^ means dependencies (program.o library.o)
#    You could also use this:
#    gcc RunThis.exe : program.o library.o
program.o: program.cpp
     gcc -c $@ $^
library.o: library.cpp
     gcc -c $@ $^&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;Here's a simpler one:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;RunThis.exe: program.cpp library.cpp
     gcc -o RunThis.exe program.cpp library.cpp&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;The benefit of the first is that if you change one file, the others don't need to be recompiled.  Make sure you use TAB characters to indent, spaces will not work.  Make is very picky.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>How to compile multiple files - one project (simon)</title>
			<link>http://pnotepad.org/forums/topic/322#post-1157</link>
			<pubDate>Mon, 21 Jan 2008 12:52:26 +0000</pubDate>
			<dc:creator>simon</dc:creator>
			<guid isPermaLink="false">1157@http://pnotepad.org/forums/</guid>
			<description>&#60;p&#62;You can use anything from a simple batch file to a script you write that parses the .pnproj file and runs the correct tool for each file. You might also google the following which are all good tools you can run to build multiple files:&#60;/p&#62;
&#60;p&#62;make&#60;br /&#62;
NAnt&#60;br /&#62;
Ant&#60;br /&#62;
cmake
&#60;/p&#62;</description>
		</item>
		<item>
			<title>How to compile multiple files - one project (superjacent)</title>
			<link>http://pnotepad.org/forums/topic/322#post-1155</link>
			<pubDate>Thu, 17 Jan 2008 05:22:48 +0000</pubDate>
			<dc:creator>superjacent</dc:creator>
			<guid isPermaLink="false">1155@http://pnotepad.org/forums/</guid>
			<description>&#60;p&#62;How is that done?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>How to compile multiple files - one project (qpsoft)</title>
			<link>http://pnotepad.org/forums/topic/322#post-1154</link>
			<pubDate>Thu, 17 Jan 2008 04:18:05 +0000</pubDate>
			<dc:creator>qpsoft</dc:creator>
			<guid isPermaLink="false">1154@http://pnotepad.org/forums/</guid>
			<description>&#60;p&#62;use makefile.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>How to compile multiple files - one project (superjacent)</title>
			<link>http://pnotepad.org/forums/topic/322#post-1153</link>
			<pubDate>Thu, 17 Jan 2008 00:48:02 +0000</pubDate>
			<dc:creator>superjacent</dc:creator>
			<guid isPermaLink="false">1153@http://pnotepad.org/forums/</guid>
			<description>&#60;p&#62;How somebody can help.   I'm learning C++ and have been using Programmer's Notepad to compile single file programs.   Now I've moved onto to multiple file programs.   How do I link &#38;#38; compile multiple (.cpp) files from within Programmer's Notepad?&#60;/p&#62;
&#60;p&#62;Any advice would be appreciated.
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
