This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

MSP430FR5994: Compiler error when I am trying to call the function in another file.

Part Number: MSP430FR5994

Hi Team,

I am compiling my program by using msp430-8.2.0.  One function in one file tries to call another function on another file. The error alerts. It is like the following picture. How can I handle it?

With best regards,

Gaosheng

  • Hello Gaosheng,

    Were you able to get this working?  Typically, to call functions in another file, you need a header that has the function definition and include that head in the file that is calling the function.  That way the compiler can locate the function you are referencing.  

    Thanks,

    JD

  • While the compiler will complain if you don't have a prototype for an external function, it doesn't need it. You of course have to compile that other file and link it.

    The problem here appears to be with cmake. I am seeing this more recently but have never used it. It is supposed to be a smart make (I think) that in effect constructs a makefile for you. How it does that I do not know. There are of course complications in a cross compiler environment as you have to tell cmake (somehow) to use different tools, include files, and libraries. That would appear to be the problem here since it didn't find the basic multiply library function.

    I always use a plain old makefile and will not be learning how to use cmake anytime soon.

**Attention** This is a public forum