Quantcast
Channel: Intel Communities: Message List
Viewing all articles
Browse latest Browse all 18547

Re: Galileo Arduino compiler/linker error: Undefined Reference to Main

$
0
0

rmm200-- If that's your "second data point", I have to infer that you initially tried to compile the program for the Galileo outside the IDE--something you didn't mention.  In that case I understand the problem.

 

A normal C/C++ program has a main() entry point that the programmer is expected to provide.  In Arduino-land it's a little different.  Here we write setup() and loop() routines which are called by a hidden main() program that the development environment provides behind the scenes.  Something like:

 

void main()

{

  setup();

  while (true)

    loop();

}

 

Since you are compiling in an environment that expects a main() you might add that one.

 

Mikal


Viewing all articles
Browse latest Browse all 18547