What causes undefined reference when compiling even though the IDE knows it's there?

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

cross mob
DaSl_2925376
Level 2
Level 2
First like given

Just recently changed to PSoc Creator 4.4 and added a new function EEPROM_Save_R_Data(&test);

now get Build fail message   ......./main.c:226: undefined reference to `EEPROM_Save_R_Data'

The IDE knows it exists. That is Intellisense reacts to it and also "Go to Definition" and "Go to Declaration" work as expected.

So, what have I inadvertently done or not done?

Dafydd

0 Likes
1 Solution
VenkataD_41
Moderator
Moderator
Moderator
750 replies posted 500 replies posted 250 solutions authored

Hi Dafydd,

Please check if you have included the header file which contains the declaration of the function `EEPROM_Save_R_Data' .

Also, please attach the project here to test at my side.

Thanks

Ganesh

View solution in original post

0 Likes
2 Replies
VenkataD_41
Moderator
Moderator
Moderator
750 replies posted 500 replies posted 250 solutions authored

Hi Dafydd,

Please check if you have included the header file which contains the declaration of the function `EEPROM_Save_R_Data' .

Also, please attach the project here to test at my side.

Thanks

Ganesh

0 Likes

Thanks for making me look further. I had a header file. The problem was that it just happened to have the same name as one of the generated ones. This I hadn't noticed until I made a "cut-down" version of the project to send to you.

Thanks

Dafydd

0 Likes