This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC2640R2F pthread 函数编译问题



Hi TI JRs:

    我想把 pthread_attr_xxx 函数移植到 simple_broadcaster 里,单是一种编译不过,问题是在 link 时找不到 pthread_attr_xxx 的函数。

     我看 pthread_attr_xxx 系列函数是在 source\ti\posix\ccs\pthread.h 里的。

     而编译 simple_broadcaster 这个 example project 时 默认是不会编译 source\ti\posix\ccs 这个目录的。

      我做了如下的修改,请看下面图片:我在 CCS 的 simple_broadcaster  project 里增加了 ${SRC_BLE_DIR}/../../../source/ti/posix/ccs 这个 include file ,并在代码里增加了 #include <pthread.h>,这样编译还是出错。

    请问这是为什么?

     

undefined first referenced
symbol in file
--------- ----------------
pthread_attr_init <whole-program>
pthread_attr_setdetachstate <whole-program>
pthread_attr_setschedparam <whole-program>
pthread_attr_setstacksize <whole-program>
pthread_create <whole-program>