<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>linker issue, undefined reference</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/68387/linker-issue-undefined-reference</link><description>Hi, 
 just start with SEGGER Embedded and use a usb acm to setup my target 
 to have a clean structure I moved code from main.c to dedicated files have the USB and BSP 
 I create new folder in the SEGGER and add the new files. They get compiled and no</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 17 Nov 2020 00:34:38 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/68387/linker-issue-undefined-reference" /><item><title>RE: linker issue, undefined reference</title><link>https://devzone.nordicsemi.com/thread/280223?ContentTypeID=1</link><pubDate>Tue, 17 Nov 2020 00:34:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2f848197-0a75-44a8-9630-c1c2b93078f5</guid><dc:creator>ChrisRu</dc:creator><description>&lt;p&gt;Hi Simon,&lt;/p&gt;
&lt;p&gt;I found the solution meanwhile. If I move the functions out the the main.c they can&amp;#39;t be static any more.&lt;br /&gt;Change the definitions to a non-static function make the trick!&lt;br /&gt;Same with global static variables which I will move to there modules now.&lt;/p&gt;
&lt;p&gt;Regards&lt;/p&gt;
&lt;p&gt;Chris&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: linker issue, undefined reference</title><link>https://devzone.nordicsemi.com/thread/280219?ContentTypeID=1</link><pubDate>Tue, 17 Nov 2020 00:02:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:489054f6-81cb-4f06-81f5-698f3ca9ee30</guid><dc:creator>ChrisRu</dc:creator><description>&lt;p&gt;Hi Simon,&lt;/p&gt;
&lt;p&gt;I used the SEGGER native method to add new files,&lt;br /&gt;1st) add a Folder &amp;#39;Implementation&amp;#39;&lt;br /&gt;2nd) add new files to the folder bsphandler.c usbhandler.c&lt;br /&gt;3rd) move static functions from main.c to bsphander.c &amp;amp; usbhandler.c add the definitions to header files&lt;br /&gt;bsphandler.h &amp;amp; usbhandler.h&amp;nbsp; and use #include directive in main to make them&lt;br /&gt;available for the Compile process.&lt;/p&gt;
&lt;p&gt;Both objects are in the projects output directory. (xxxhandler.o)&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1605571123187v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;My missing link is, where to add so that the linker will use them in the SEGGER Embedded environment.&lt;br /&gt;They got compiled but the linker does not inherit them.&lt;/p&gt;
&lt;p&gt;-Chris&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: linker issue, undefined reference</title><link>https://devzone.nordicsemi.com/thread/280106?ContentTypeID=1</link><pubDate>Mon, 16 Nov 2020 13:33:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9f5b3ba7-e719-4344-9ad6-12464e9f2614</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi Chris&lt;/p&gt;
&lt;p&gt;Where do you define the cdc_acm_user_ev_handler() function in your application. Seeing as you moved it from main.c to a dedicated file, you likely have to include the file defining&amp;nbsp;cdc_acm_user_ev_handler() to this dedicated file. I assume the following errors you&amp;#39;re seeing are consequential errors.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>