peng-zhihui / Dummy-Robot

我的超迷你机械臂机器人项目。

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

STM32 Cube IDE 編譯問題 (undefined reference to)

Kevin75311 opened this issue · comments

我使用 Cube IDE 開啟專案後,編譯時發現無法找到 Userapp/common_inc.h
image
將它加入 compiler include 的 PATH 後,變成 common_inc.h 裡面的 function 無法引用 (undefined reference to)
image
想請問是 C 和 C++ 混編造成的問題嗎? 謝謝!

我把main.cpp的名字改成 userapp.c 就好使了

commented

改CMakeLists.txt,不要改path,正常应该是有这个包含路径的,CLion里面clear cache and restart试一下