• Join
  • Sign In with my.TI Login
Texas Instruments
  • Products
  • Applications
  • Tools & Software
  • Support & Community
  • Sample & Buy
  • About TI
Sample & Purchase Cart Sample & Purchase Cart
  • Search
  • Advanced
TI E2E™ Community
  • Support Forums
  • Blogs
  • Groups
  • Videos
  • 简体中文
  • More ...
TI Home » TI E2E Community » Support Forums » Embedded Software » BIOS » BIOS forum » Linking NDK 2 libraries problem.
Share
BIOS
  • Forum
  • Announcements
Options
  • Subscribe via RSS

Forums

Linking NDK 2 libraries problem.

This question is answered
Anatoly Odler
Posted by Anatoly Odler
on Apr 04 2012 03:57 AM
Expert1660 points

Hello,

I'm working with C6748, NDK 2.20.06.35, BIOS 5.41.11.38, nsp_1_00_00_09.

I'm developing a network application using TCP/IP stack.

I have copied the following NDK libraries to my project:

os_bios5.lib

netctrl.lib

nettool.lib

stack.lib

hal_timer_bios5.lib

hal_userled_stub.lib

hal_eth_stub.lib

hal_ser_stub.lib

ti.drv.omapl138.a674

I try to compile, but get the following message:

 undefined        first referenced                                                  
symbol in file
--------- ----------------
_NIMUDeviceTable C:/TI/ndk_2_20_06_35/packages/ti/ndk/lib/C674/stack.lib<nimu.o674>


If I link these libraries via "Project->Properties->Build->C6000 Linker->File Search Path->Include library file or command file as input" 
everything works fine and the project compiles successfully.
  1. Am I missing some other reference to the NDK?
  2. Is there any difference in the project build between actually copying required NDK libraries to the project and linking them from outside?
  3. How can I solve this problem without linking to the libraries?
Thank you, Anatoly.
Report Abuse
  • Reply
You have posted to a forum that requires a moderator to approve posts before they are publicly available.
All Replies
  • Steven Connell
    Posted by Steven Connell
    on Apr 04 2012 14:47 PM
    Mastermind20600 points

    Hi Anatoly,

    That symbol comes out of the ti.drv.omapl138.a674 library.

    This may be due to a link ordering problem.  Do you have the "-x" linker option set in your project?

    Steve

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Anatoly Odler
    Posted by Anatoly Odler
    on Apr 05 2012 02:20 AM
    Expert1660 points

    Thank you, Steve.

    I have this option checked in my project, it says:

    Reread libraries; resolve backward references (--reread_libs, -x).

    Is this right?

    How can I solve mentioned problem anyway?

    Anatoly.

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Steven Connell
    Posted by Steven Connell
    on Apr 05 2012 14:26 PM
    Verified Answer
    Verified by David Friedland
    Mastermind20600 points

    Ok, I thought the -x options was missing and might have been the solution ... yes you have the option right.

    Do you have the client example (unmodified, as it was shipped)?

    The best option is to compare the project settings of the client example to your project and ensure that they are the same.

    Steve

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Anatoly Odler
    Posted by Anatoly Odler
    on Apr 19 2012 01:47 AM
    Expert1660 points

    Hi, Steve.

    Thank you for the response.

    I have opened the client example and copied the libraries to it's folder.

    In the client example options I have added the path "${PROJECT_ROOT}" to the "Project->Properties->Build->C6000 Linker->File Search Path" with checked -x option.

    It drops the same error, mentioned above, as in my application project.

    If I add actual library path to the -l option it compiles fine in both client example and my application project.

    How can I solve it?

    Anatoly.

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Steven Connell
    Posted by Steven Connell
    on Apr 19 2012 13:19 PM
    Mastermind20600 points

    Anatoly,

    For any library which you wish to link with your application, you must use the -l option in your application's project settings so that the linker will know to link it.  If you have a library listed with the -l option, then you must ensure that the linker options have the path to the actual library in order to be able to find it.

    Note that the paths that you have put in the "-l <library>" option will be concatenated to the end of each path in the linker's file search path.

    So for example if you listed "-l ti/ndk/lib/c64plus/stk.lib" and your linker search path had "C:/; C:/foo; C:/ti/ndk_2.20.00.XX/packages" then the following places will be checked for the library to see if it exists:

    C:/ti/ndk/lib/c64plus/stk.lib

    C:/foo/ti/ndk/lib/c64plus/stk.lib

    C:/ti/ndk_2.20.00.XX/packages/ti/ndk/lib/c64plus/stk.lib   // <- this check would probably succeed.

    Steve

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Anatoly Odler
    Posted by Anatoly Odler
    on Apr 22 2012 01:27 AM
    Expert1660 points

    Is it legal to add a search path with -x option, but not specify the actual library with -l option?

    Anatoly.

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Anatoly Odler
    Posted by Anatoly Odler
    on Apr 22 2012 02:12 AM
    Expert1660 points

    Hi, thank you for the explanation.

    Is it legal to add a search path to the libraries with -x option without adding actual library with -l option?

    Anatoly

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Steven Connell
    Posted by Steven Connell
    on Apr 23 2012 14:50 PM
    Mastermind20600 points

    Hi Anatoly,

    The -x option is not used for adding search paths to the linker, it's used to re-read the libraries for back reference.  Running "lnk6x.exe -help" from the command line provides some info:

      --reread_libs,-x             Reread libraries; resolve backward references

    For search paths you want:

      -i,--search_path=dir         Add <dir> to library search path

    Steve

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
TI E2E™ Community
  • Support Forums
  • Blogs
  • Videos
  • Groups
  • Site Support & Feedback
  • Settings
TI E2E™ Community Groups
  • TI University Program
  • Make the Switch
  • Microcontroller Projects
  • Motor Drive & Control
Other Communities
  • Deyisupport
  • Designsomething.org
  • beagleboard.org
  • TI on Element 14
  • TI on TechXchangeSM
Other Technical & Support Resources
  • WEBENCH® Design Center
  • Product Information Centers
  • Technical Documents
  • TI Design Network
  • TI Technical Articles
  • TI Training

All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.

Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms of Use of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms of Use of this site. TI, its suppliers and providers of content reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.

Follow Us Texas Instruments on Facebook Texas Instruments on Twitter Texas Instruments on LinkedIn Texas Instruments on Google+
TI Worldwide | Contact Us | my.TI Login | Site Map | Corporate Citizenship | mobile m.ti.com (Mobile Version)

TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs and
embedded processors, along with software, tools and the industry’s largest sales/support staff.

© Copyright 1995-2013 Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy Policy | Terms of Use