chipKIT® Development Platform

Inspired by Arduino™

Routines in included files are not linked.

Created Tue, 06 Nov 2012 06:07:58 +0000 by leverett2


leverett2

Tue, 06 Nov 2012 06:07:58 +0000

I am familiar with c and c++ but new to max32. the following pde code is in ..mpide/test/test.pde

#include <WProgram.h>
#include <Other.h>

void setup(){
  Start();
}

void loop(){
}

Here is the Other.h and the Other.c files that are in the same directory. When I open the pde I get three tabs as expected. the Other.h file

#ifndef Other_h
#define Other_h

#include <WProgram.h>
#include <p32_defs.h>
    void Start(void);

#endif

Here is the Other.c file

#include <Other.h>

void Start(){
}

When verified I get the following error: test.cpp.o: In function setup': test.cpp:8: undefined reference to Start()' collect: ld returned 1 exit status

I don't understand why the Start function is not linked.