Skip to main content
LucasStartTech
Associate III
Mar 20, 2025 4:30 PM UTC
Solved

Type 'Button' could not be resolved

@MM..1  @Tesla DeLorean 

Hi! I am getting this error and not being able to find out why. I've looked online and haven't found an answer either.

I have some #defines in my header file and for some reason I it is like my source file can't see these definitions. I've done just the same for all my other files and all of them work, however this one gives me: Type 'Button' could not be resolved.

I checked if there is a type, but everything seems to be correct. Any chance someone could help me?

 

Thank you!!

 

(I am using STM CUBE IDE)

This topic has been closed for replies.
mƎALLEm
mƎALLEmBest answer
ST Technical Moderator
Mar 20, 2025 7:34 PM UTC

Hello,

Use search utility to find were these defines are defined and check if they were defined before you have used it.

Check also it they were undefined somewhere in the code after their definitions.

To give better visibility on the answered topics, please click "Best answer" on the reply which solved your issue or answered your question.

3 replies

Andrew Neil
Super User
Mar 20, 2025 4:52 PM UTC

You'll need to give more details on your code, system & development environment:

How to write your question to maximize your chances to find a solution

 

Is it TouchGFX?

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
TDK
Mar 20, 2025 5:59 PM UTC

If it can't be resolved, it isn't defined before you use it. Check that it is defined and the order of include files such that it's defined before use.

"If you feel a post has answered your question, please click ""Accept as Solution""."
mƎALLEm
mƎALLEmBest answer
ST Technical Moderator
Mar 20, 2025 7:34 PM UTC

Hello,

Use search utility to find were these defines are defined and check if they were defined before you have used it.

Check also it they were undefined somewhere in the code after their definitions.

To give better visibility on the answered topics, please click "Best answer" on the reply which solved your issue or answered your question.