<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>OSBDM and TBDMLのトピックUSBDM API usage problems</title>
    <link>https://community.nxp.com/t5/OSBDM-and-TBDML/USBDM-API-usage-problems/m-p/271696#M2620</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i want to develop a new app that uses the USBDM interface and i have difficulties when i try to compile the USBDM_API_Example.cpp.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using codeblocks and mingw to compile the app but i keep getting undefined reference on the usbdm_api.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="c++" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_13914029700713749" jivemacro_uid="_13914029700713749"&gt;
&lt;P&gt;||=== Build: Release in usbdmapitest (compiler: GNU GCC Compiler) ===|&lt;/P&gt;
&lt;P&gt;obj\Release\main.o:main.cpp|| undefined reference to `_imp__USBDM_GetErrorString@4'|&lt;/P&gt;
&lt;P&gt;obj\Release\main.o:main.cpp|| undefined reference to `_imp__USBDM_Close@0'|&lt;/P&gt;
&lt;P&gt;obj\Release\main.o:main.cpp|| undefined reference to `_imp__USBDM_Exit@0'|&lt;/P&gt;
&lt;P&gt;||=== Build failed: 3 error(s), 0 warning(s) (0 minute(s), 0 second(s)) ===|&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the header file is in the same dir as the the cpp file and i keep getting these errors. Can i have some help? Is that an issue of the DLL file?&lt;/P&gt;&lt;P&gt;Any help is highly appreciated. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 03 Feb 2014 04:52:34 GMT</pubDate>
    <dc:creator>PadelisGR</dc:creator>
    <dc:date>2014-02-03T04:52:34Z</dc:date>
    <item>
      <title>USBDM API usage problems</title>
      <link>https://community.nxp.com/t5/OSBDM-and-TBDML/USBDM-API-usage-problems/m-p/271696#M2620</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i want to develop a new app that uses the USBDM interface and i have difficulties when i try to compile the USBDM_API_Example.cpp.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using codeblocks and mingw to compile the app but i keep getting undefined reference on the usbdm_api.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="c++" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_13914029700713749" jivemacro_uid="_13914029700713749"&gt;
&lt;P&gt;||=== Build: Release in usbdmapitest (compiler: GNU GCC Compiler) ===|&lt;/P&gt;
&lt;P&gt;obj\Release\main.o:main.cpp|| undefined reference to `_imp__USBDM_GetErrorString@4'|&lt;/P&gt;
&lt;P&gt;obj\Release\main.o:main.cpp|| undefined reference to `_imp__USBDM_Close@0'|&lt;/P&gt;
&lt;P&gt;obj\Release\main.o:main.cpp|| undefined reference to `_imp__USBDM_Exit@0'|&lt;/P&gt;
&lt;P&gt;||=== Build failed: 3 error(s), 0 warning(s) (0 minute(s), 0 second(s)) ===|&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the header file is in the same dir as the the cpp file and i keep getting these errors. Can i have some help? Is that an issue of the DLL file?&lt;/P&gt;&lt;P&gt;Any help is highly appreciated. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Feb 2014 04:52:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/OSBDM-and-TBDML/USBDM-API-usage-problems/m-p/271696#M2620</guid>
      <dc:creator>PadelisGR</dc:creator>
      <dc:date>2014-02-03T04:52:34Z</dc:date>
    </item>
    <item>
      <title>Re: USBDM API usage problems</title>
      <link>https://community.nxp.com/t5/OSBDM-and-TBDML/USBDM-API-usage-problems/m-p/271697#M2621</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Padelis,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I suspect that you are failing to link against the usbdm DLL when building.&amp;nbsp; This will result in the errors you are seeing.&lt;/P&gt;&lt;P&gt;Check how to add the library to the linking step for your build environment.&amp;nbsp; For GCC the usual command option would be &lt;STRONG&gt;-lusbdm.4.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The log from a successful build using minGW gcc is show below.&amp;nbsp; You can check the command lines against those used by your compiler.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_13914076061679267" jivemacro_uid="_13914076061679267"&gt;
&lt;P&gt;16:53:30 **** Incremental Build of configuration Default for project USBDM_API_Example ****&lt;/P&gt;
&lt;P&gt;mingw32-make all&lt;/P&gt;
&lt;P&gt;c:/Apps/MinGW/bin/mingw32-make exe -f Target.mk BUILDDIR=USBDM_API_Example CDEFS='-DUSE_ICON'&lt;/P&gt;
&lt;P&gt;mingw32-make[1]: Entering directory 'C:/Users/podonoghue/Development/USBDM/EclipseUSBDMExamples/USBDM_API_Example'&lt;/P&gt;
&lt;P&gt;c:/Apps/MinGW/msys/1.0/bin/mkdir USBDM_API_Example&lt;/P&gt;
&lt;P&gt;c:/Apps/MinGW/msys/1.0/bin/touch USBDM_API_Example/timestamp&lt;/P&gt;
&lt;P&gt;-- Building USBDM_API_Example/USBDM_API_Example.o from src/USBDM_API_Example.cpp&lt;/P&gt;
&lt;P&gt;c:/Apps/MinGW/bin/g++ -mthreads -O3 -g0&amp;nbsp;&amp;nbsp; -DUSE_ICON&amp;nbsp;&amp;nbsp;&amp;nbsp; -Isrc&amp;nbsp; -MD -c src/USBDM_API_Example.cpp -o USBDM_API_Example/USBDM_API_Example.o&lt;/P&gt;
&lt;P&gt;-- Building USBDM_API_Example/Version.o from src/Version.rc&lt;/P&gt;
&lt;P&gt;c:/Apps/MinGW/bin/windres src/Version.rc -DUSE_ICON&amp;nbsp;&amp;nbsp;&amp;nbsp; -Isrc&amp;nbsp; -o USBDM_API_Example/Version.o&lt;/P&gt;
&lt;P&gt;--&lt;/P&gt;
&lt;P&gt;-- Linking Target USBDM_API_Example/USBDM_API_Example.exe&lt;/P&gt;
&lt;P&gt;c:/Apps/MinGW/bin/g++ -o USBDM_API_Example/USBDM_API_Example.exe -mthreads -s&amp;nbsp; USBDM_API_Example/USBDM_API_Example.o USBDM_API_Example/Version.o&amp;nbsp; -L.&amp;nbsp; -lusbdm.4 &lt;/P&gt;
&lt;P&gt;mingw32-make[1]: Leaving directory 'C:/Users/podonoghue/Development/USBDM/EclipseUSBDMExamples/USBDM_API_Example'&lt;/P&gt;
&lt;P&gt;c:/Apps/MinGW/bin/mingw32-make exe -f Target.mk BUILDDIR=USBDM_API_Example-debug CDEFS='-DUSE_ICON' DEBUG='Y'&lt;/P&gt;
&lt;P&gt;mingw32-make[1]: Entering directory 'C:/Users/podonoghue/Development/USBDM/EclipseUSBDMExamples/USBDM_API_Example'&lt;/P&gt;
&lt;P&gt;mingw32-make[1]: Nothing to be done for 'exe'.&lt;/P&gt;
&lt;P&gt;mingw32-make[1]: Leaving directory 'C:/Users/podonoghue/Development/USBDM/EclipseUSBDMExamples/USBDM_API_Example'&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;16:53:32 Build Finished (took 1s.670ms)&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;



&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;bye&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Feb 2014 05:58:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/OSBDM-and-TBDML/USBDM-API-usage-problems/m-p/271697#M2621</guid>
      <dc:creator>pgo</dc:creator>
      <dc:date>2014-02-03T05:58:19Z</dc:date>
    </item>
    <item>
      <title>Re: USBDM API usage problems</title>
      <link>https://community.nxp.com/t5/OSBDM-and-TBDML/USBDM-API-usage-problems/m-p/271698#M2622</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think that i am using the wrong files. It sure has to do with linking the dll as you mention.&lt;/P&gt;&lt;P&gt;Can you give me a layout of the source folders that i should use? I am on WinXP and have installed the latest version of USBDM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your reply&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Feb 2014 13:17:18 GMT</pubDate>
      <guid>https://community.nxp.com/t5/OSBDM-and-TBDML/USBDM-API-usage-problems/m-p/271698#M2622</guid>
      <dc:creator>PadelisGR</dc:creator>
      <dc:date>2014-02-03T13:17:18Z</dc:date>
    </item>
    <item>
      <title>Re: USBDM API usage problems</title>
      <link>https://community.nxp.com/t5/OSBDM-and-TBDML/USBDM-API-usage-problems/m-p/271699#M2623</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Padelis,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I usually do work using Eclipse with MinGW.&amp;nbsp; The following screen grab shows the required files to build the example application:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_0.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/42535iC270470A62194E57/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_0.png" alt="pastedImage_0.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This project is included in the USBDM installation and is available in Eclipse if installed.&lt;/P&gt;&lt;P&gt;You can get these files from the directory (path will vary):&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;C:\Program Files (x86)\pgo\USBDM 4.10.6.120\Examples\USBDM_API_Example.zip&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since you are using Codeblocks you need to add the cpp file to your 'project' and make sure the header files are available (in the same directory?).&amp;nbsp; The dlls will need to be added as well.&amp;nbsp; I have no idea how to do this with Codeblocks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Alternatively, since you have MinGW installed you can just unzip the above file and then open a command line in the directory and build the example by typing (path will vary):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;c:\Apps\MinGW\bin\mingw32-make.exe&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;bye&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Feb 2014 22:35:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/OSBDM-and-TBDML/USBDM-API-usage-problems/m-p/271699#M2623</guid>
      <dc:creator>pgo</dc:creator>
      <dc:date>2014-02-03T22:35:29Z</dc:date>
    </item>
    <item>
      <title>Re: USBDM API usage problems</title>
      <link>https://community.nxp.com/t5/OSBDM-and-TBDML/USBDM-API-usage-problems/m-p/271700#M2624</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;pgo thank you for the reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem that i had was that i couldnt find a way to link the dll file to the project.&lt;/P&gt;&lt;P&gt;So here is what i did and it worked like a charm. (For future reference to anyone looking to do the same).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Go to "Project -&amp;gt; Build Options". Select "Release", "Debug" or both and then go to "Linker Settings" tab and click "Add".&lt;/P&gt;&lt;P&gt;&lt;IMG alt="gLYZTjC.png" class="jive-image" src="http://i.imgur.com/gLYZTjC.png" style="width: 620px; height: 448px;" /&gt;&lt;/P&gt;&lt;P&gt;On the window that opens choose "All Files" and then select the dll file that you want to link and click "Open".&lt;/P&gt;&lt;P&gt;&lt;IMG alt="0UAypTl.png" class="jive-image" src="http://i.imgur.com/0UAypTl.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Click "Yes" on the next dialog and you are set.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you pgo for showing me the way&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Feb 2014 01:39:43 GMT</pubDate>
      <guid>https://community.nxp.com/t5/OSBDM-and-TBDML/USBDM-API-usage-problems/m-p/271700#M2624</guid>
      <dc:creator>PadelisGR</dc:creator>
      <dc:date>2014-02-05T01:39:43Z</dc:date>
    </item>
  </channel>
</rss>

