Navigation

    全志在线开发者论坛

    • Register
    • Login
    • Search
    • Categories
    • Tags
    • 在线文档
    • 社区主页

    D1-H裸机开发--C-Sky环境用GCC编译使用不了标准库函数

    MR Series
    1
    1
    628
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • A
      a792947123 LV 3 last edited by xiaowenge

      最近在对D1-H开发板进行裸机开发,开发环境是官网下的C-Sky,里面提供了MinGW编译器和gdb调试等工具。裸机程序里想调用c标准库函数,如strlen(),但在编译阶段会提示“undefined reference 'strlen'”,最终导致链接失败。

      然后我加了-static,也加了-L 和 -lm去指定库路径与库文件,但是却一直提示“cannot find -lm”(路径内有libm.a文件)。

      我只是想在裸机开发中使用一些c标准库函数,但是目前看来一直调用不了,是我的步骤错了吗,还是说这条路行不通。

      1 Reply Last reply Reply Quote Share 1
      • 1 / 1
      • First post
        Last post

      Copyright © 2024 深圳全志在线有限公司 粤ICP备2021084185号 粤公网安备44030502007680号

      行为准则 | 用户协议 | 隐私权政策