<?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/5206" />

	<title>Objective Development Forums</title>
	
	<link href="https://forums.obdev.at/index.php" />
	<updated>2010-12-05T17:25:06+02:00</updated>

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

		<entry>
		<author><name><![CDATA[maxi]]></name></author>
		<updated>2010-12-05T17:25:06+02:00</updated>

		<published>2010-12-05T17:25:06+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=5206&amp;p=16921#p16921</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=5206&amp;p=16921#p16921"/>
		<title type="html"><![CDATA[Re: Dev-cpp]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=5206&amp;p=16921#p16921"><![CDATA[
<blockquote><div><cite>yariash wrote:</cite>Is this possible to make a c++ project with libusb?</div></blockquote><br /><br />I have done so with MSVC++ like this<div class="codebox"><p>Code: </p><pre><code>extern &quot;C&quot;<br />{<br />#include &quot;opendevice.h&quot;<br />}<br /><br />usb_dev_handle *m_Handle = NULL;<br /></code></pre></div><br />Where opendevice.h &amp; .c are taken directly from the v-usb custom class example. The device is initialized like so<div class="codebox"><p>Code: </p><pre><code>   static char vendor&#91;&#93;  = &quot;Usb Vendor Name&quot;;<br />   static char product&#91;&#93; = &quot;Usb Device Name&quot;;<br />   usb_init();<br />   m_Init = ( usbOpenDevice( &amp;m_Handle,<br />      USB_VENDOR_ID, vendor,<br />      USB_DEVICE_ID, product,<br />      NULL, NULL, NULL ) == 0 );<br /><br /></code></pre></div><br />It's been a while since I did this so I may have missed something but hopefully you get the idea.<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=2570">maxi</a> — Sun Dec 05, 2010 5:25 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2010-12-04T20:26:30+02:00</updated>

		<published>2010-12-04T20:26:30+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=5206&amp;p=16913#p16913</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=5206&amp;p=16913#p16913"/>
		<title type="html"><![CDATA[Dev-cpp]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=5206&amp;p=16913#p16913"><![CDATA[
Is this possible to make a c++ project with libusb?<br /><br />When I compile hiddata commandline as single file (hidtool.c) I link libraries libsetupapi.a and libhid.a and it compliles without any problem.<br />But when I create a empty project and add hidtool.c to it, it seems that it cant find these libraries because some linker errors happen. I was trying to link them either by Tools -&gt; Compiler Options -&gt;Add these commands to linker command line or by Project Options-&gt;Additional Command Line Options but it doesnt work.<br /><br />Is there any solution to that problem?<br /><br /><div class="codebox"><p>Code: </p><pre><code>Objects/MingW/hiddata.o(.text+0x86):hiddata.c: undefined reference to `_Z15HidD_GetHidGuidP5_GUID@4'<br />Objects/MingW/hiddata.o(.text+0x20c):hiddata.c: undefined reference to `_Z18HidD_GetAttributesPvP15HIDD_ATTRIBUTES@8'<br />Objects/MingW/hiddata.o(.text+0x261):hiddata.c: undefined reference to `_Z26HidD_GetManufacturerStringPvS_m@12'<br />Objects/MingW/hiddata.o(.text+0x2b7):hiddata.c: undefined reference to `_Z21HidD_GetProductStringPvS_m@12'<br />Objects/MingW/hiddata.o(.text+0x369):hiddata.c: undefined reference to `_Z15HidD_SetFeaturePvS_m@12'<br />Objects/MingW/hiddata.o(.text+0x3b7):hiddata.c: undefined reference to `_Z15HidD_GetFeaturePvS_m@12'</code></pre></div><p>Statistics: Posted by Guest — Sat Dec 04, 2010 8:26 pm</p><hr />
]]></content>
	</entry>
	</feed>
