Announcements

Help us improve the Power & Sensing Selection Guide. Share feedback

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Translation_Bot
Community Manager
Community Manager
Community Manager
100 likes received

When we are developing and debugging with a program, we often encounter situations where functions or variables are undefined.

But in our subsequent troubleshooting we found that the definitions and declarations were normal.

Then the occurrence of this error could be caused by a file naming problem.

Unic_0-1693757506313.png

If this is the case, check to see if the .h and .c in the code file are capitalized.

If you use uppercase .C or .H, please remove the file from the project, then change the file name format to lowercase in the file path folder and add it to the project again to compile it.

 

smartconx_target@Q!w2e3r4t5y6u7i8o9p0||/t5/PSoC-Creator-Designer/PSoC-Creator-%E7%BC%96%E8%AF%91%E5%B7%A5%E7%A8%8B%E5%87%BA%E7%8E%B0%E6%9C%AA%E5%AE%9A%E4%B9%89%E7%9A%84%E6%8A%A5%E9%94%99/td-p/485788

0 Likes
2 Replies
Translation_Bot
Community Manager
Community Manager
Community Manager
100 likes received

thank you for sharing

smartconx_target@Q!w2e3r4t5y6u7i8o9p0||/t5/PSoC-Creator-Designer/PSoC-Creator-%E7%BC%96%E8%AF%91%E5%B7%A5%E7%A8%8B%E5%87%BA%E7%8E%B0%E6%9C%AA%E5%AE%9A%E4%B9%89%E7%9A%84%E6%8A%A5%E9%94%99/m-p/488522

0 Likes
MotooTanaka
Level 9
Level 9
Distributor - Marubun (Japan)
First comment on blog Beta tester First comment on KBA

Hi,

Once upon a time, when C++ was first introduced, ".c" was for C and "C" was for C++.

But as Windows/Mac OS did not distinct upper and lower case, eventually ".cpp" was used fro C++.

Meantime to protect C's function name from C++ compilers mangling the names,

there came compiler directive 'extern "C"'.

So nomatter which extension ".c" or ".C", if you use "extern "C"" to protect the names,

"I hope" that you will be fine.

moto

0 Likes