<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-gb">
	<link rel="self" type="application/atom+xml" href="https://forums.obdev.at/app.php/feed/topic/8397" />

	<title>Objective Development Forums</title>
	
	<link href="https://forums.obdev.at/index.php" />
	<updated>2013-04-15T21:15:06+02:00</updated>

	<author><name><![CDATA[Objective Development Forums]]></name></author>
	<id>https://forums.obdev.at/app.php/feed/topic/8397</id>

		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2013-04-15T21:15:06+02:00</updated>

		<published>2013-04-15T21:15:06+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=8397&amp;p=25138#p25138</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=8397&amp;p=25138#p25138"/>
		<title type="html"><![CDATA[Re: Undefined reference problems]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=8397&amp;p=25138#p25138"><![CDATA[
There are two ways of compiling this.<br />The parameter &quot;USB_PUBLIC&quot; (usbconfig.h) decides what to use.<br /><br />(A)<br />The classical thing is linking the usbdrv to your firmware. Therefore the usbdrv.c needs to be compiled into usbdrv.o and is fianlly linked.<br />This is safe and sound way - good programming practice.<br /><br />(B)<br />The other way is including usbdrv into your main-project C-file. Therefore usbdrv.c is not compiled as stand alone, but instead all functions of the driver &quot;appear&quot; to be part of your main file.<br />This saves a little bit of programm space, since all-static code does not need to be position independed and is compiled a little-bit smaller:<br /><br />#if (USB_PUBlIC==static)<br />#include &lt;usbdrv.c&gt;<br />#endif<br />#include &lt;usbdrv.h&gt;<br /><br /><br />If you need an example for (A) you can look into the firmware-part of the VUSB-example of:<br /><!-- m --><a class="postlink" href="http://matrixstorm.com/avr/tinyusbboard/#examples">http://matrixstorm.com/avr/tinyusbboard/#examples</a><!-- m --><br /><br />(&quot;VUSB skeleton/example with corresponding linux, windows (delphi) and platform independent GTK libusb program&quot;)<br /><br />Have fun!<p>Statistics: Posted by Guest — Mon Apr 15, 2013 9:15 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2013-04-14T19:37:57+02:00</updated>

		<published>2013-04-14T19:37:57+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=8397&amp;p=25134#p25134</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=8397&amp;p=25134#p25134"/>
		<title type="html"><![CDATA[Undefined reference problems]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=8397&amp;p=25134#p25134"><![CDATA[
Ok, so i wanted to compile my program which uses vusb and this error always comes up:<br /><div class="codebox"><p>Code: </p><pre><code>usbdrv/usbdrv.o: In function `usbPoll':<br />usbdrv.c:(.text+0x132): undefined reference to `usbDescriptorHidReport'<br />usbdrv.c:(.text+0x134): undefined reference to `usbDescriptorHidReport'<br />usbdrv.c:(.text+0x256): undefined reference to `usbEventResetReady'<br /></code></pre></div><br />i tried both with older and newer versions of the library, multiple makefiles, but nothing<p>Statistics: Posted by Guest — Sun Apr 14, 2013 7:37 pm</p><hr />
]]></content>
	</entry>
	</feed>
