Author Topic: Webbot lib - multiple definitions  (Read 1270 times)

0 Members and 1 Guest are viewing this topic.

Offline chelmiTopic starter

  • Supreme Robot
  • *****
  • Posts: 496
  • Helpful? 15
Webbot lib - multiple definitions
« on: March 27, 2010, 12:55:06 PM »
Hi guys,

I want to separate my code in several modules and I can't find a way to do that without upsetting the linker :p

Here is my configuration:
- main.c file which include <sys/atmega168.h> to initialize basic stuff like a status LED. It defines the appInit*
and appControl functions.

- scanner.c that defines functions to initialize a servo and a distance sensor. These function are called by the appInit* functions in

Which file should I include in scanner.c to hat the port definition? (like D0, D1...)


Offline Webbot

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 2,165
  • Helpful? 111
Re: Webbot lib - multiple definitions
« Reply #1 on: March 27, 2010, 06:44:19 PM »
Easiest is to use a 'scanner.h' rather than a 'scanner.c'

For ease of use, to newbs, the lib expects one C file.

Webbot Home:
WebbotLib online docs:
If your in the neighbourhood:


Get Your Ad Here