This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Cannot find definition of extern function, reference only

I am transferred a source from friend for study. inside main.c, there is a function named setSensiPars called (setSensiPars(3,0)), I tried to trace its definition by right-clicked on it and choose go to definition of 'setSensiPars' but I get the msg box: Source Browser:'setSensiPars'- undefined definition/reference.

if I also right click but choose "go to reference to.." i get extern void setSensiPars(uint8_t pga, uint8_t forceUpdate); in pga.h, which it is included by main.c

it is weird that there is no definition of setSensiPars but no error.
then I tried to comment extern void setSensiPars(uint8_t pga, uint8_t forceUpdate); and re build again, still no error (even though there is a warning is setSensiPars is implicitly called)

if I rename setSensiPars into setSensiPars1, get error when compiling

so I strongly guess setSensiPars is defined somewhere I could not find out.

Any suggestion can help me find out setSensiPars?

Parents Reply Children
  • You could use your toolchain's library manager to find what functions are exposed by the library.

    You could also look in the Linker map to see if it tells you where the definition came from.

    You haven't stated what toolchain you're using, so can't be more specific.