Unresolved inclusion of stdlib.h and string.h, when generating code for C

1,056 views
Skip to first unread message

David Richard

unread,
Oct 30, 2017, 10:53:16 PM10/30/17
to YAKINDU User
Hello.

I have never used Eclipse and I have just started out with Yakindu statechart tool(I would have searched for already existing threads but I couldn't find any search tool).

Anyway, everything have gone well but there is one issue.

When the code generator have generated code in C there are these two lines:
#include <stdlib.h>
#include <string.h>

I know perfectly well what these do, but what I don't know is why they are flagged as "Unresolved inclusion"(with a question-mark marker).

What do I have to do in order for Yakindu to be able to find these files?

I have some experience but not very much with programming with Atmel Studio 7 but I don't know enough about the workings of IDE's to be able to know what to do.

Do you have any suggestion?

Regards

Rene Beckmann

unread,
Nov 3, 2017, 6:03:51 AM11/3/17
to YAKINDU User
Hey David,

You can use the search bar right at the top to search for topics. However, I don't believe we've had this issue already (well, it is not an issue with SCT, but I will try to help you anyways).

So, the plugin that is responsible for everything concerning C and C++ code is the Eclipse CDT, and its internal analysis thinks that these header files do not exist. Be advised that C is a complicated language and while CDT can help you to find errors before you compile, there will always be stuff that CDT misses or where CDT thinks there is an error where there is actually none - which might be the case in your situation. Whenever CDT tells you there is an error in your (or our) code, which you can't explain, just use "Build project" and let the compiler tell you what's really wrong. More often than not, it's nothing.

If, however, that doesn't work either, I would bet your compiler setup is not correct. You can right-click your project, go on Properties, and check the C- related settings there, especially the selected toolchain. What is your operating system and which compiler did you installl? If you build the project, is a compiler output generated at all?

For more C-related issues you run into, you can just google "Eclipse C <whatever>". This will give you the results you want.

Regards,
René
Reply all
Reply to author
Forward
0 new messages