Multiple definition error

Hi all,

I am a real newbe..

I get these errors when compiling. What do I wrong?

TinyGPS\TinyGPS.cpp.o: In function TinyGPS': C:\Documents and Settings\Gebruiker\Mijn documenten\Arduino\libraries\TinyGPS/TinyGPS.cpp:28: multiple definition ofTinyGPS::TinyGPS()' TinyGPS.cpp.o:C:\DOCUME~1\GEBRUI~1\LOCALS~1\Temp\build4646645334417534785.tmp/TinyGPS.cpp:28: first defined here TinyGPS\TinyGPS.cpp.o: In function TinyGPS': C:\Documents and Settings\Gebruiker\Mijn documenten\Arduino\libraries\TinyGPS/TinyGPS.cpp:28: multiple definition ofTinyGPS::TinyGPS()' TinyGPS.cpp.o:C:\DOCUME~1\GEBRUI~1\LOCALS~1\Temp\build4646645334417534785.tmp/TinyGPS.cpp:28: first defined here TinyGPS\TinyGPS.cpp.o: In function TinyGPS::stats(unsigned long*, unsigned short*, unsigned short*)': C:\Documents and Settings\Gebruiker\Mijn documenten\Arduino\libraries\TinyGPS/TinyGPS.cpp:102: multiple definition ofTinyGPS::stats(unsigned long*, unsigned short*, unsigned short*)' TinyGPS.cpp.o:C:\DOCUME~1\GEBRUI~1\LOCALS~1\Temp\build4646645334417534785.tmp/TinyGPS.cpp:102: first defined here TinyGPS\TinyGPS.cpp.o: In function TinyGPS::from_hex(char)': C:\Documents and Settings\Gebruiker\Mijn documenten\Arduino\libraries\TinyGPS/TinyGPS.cpp:113: multiple definition ofTinyGPS::from_hex(char)' TinyGPS.cpp.o:C:\DOCUME~1\GEBRUI~1\LOCALS~1\Temp\build4646645334417534785.tmp/TinyGPS.cpp:113: first defined here TinyGPS\TinyGPS.cpp.o: In function TinyGPS::parse_decimal()': C:\Documents and Settings\Gebruiker\Mijn documenten\Arduino\libraries\TinyGPS/TinyGPS.cpp:123: multiple definition ofTinyGPS::parse_decimal()' TinyGPS.cpp.o:C:\DOCUME~1\GEBRUI~1\LOCALS~1\Temp\build4646645334417534785.tmp/TinyGPS.cpp:123: first defined here TinyGPS\TinyGPS.cpp.o: In function TinyGPS::parse_degrees()': C:\Documents and Settings\Gebruiker\Mijn documenten\Arduino\libraries\TinyGPS/TinyGPS.cpp:142: multiple definition ofTinyGPS::parse_degrees()' TinyGPS.cpp.o:C:\DOCUME~1\GEBRUI~1\LOCALS~1\Temp\build4646645334417534785.tmp/TinyGPS.cpp:142: first defined here TinyGPS\TinyGPS.cpp.o: In function TinyGPS::gpsatol(char const*)': C:\Documents and Settings\Gebruiker\Mijn documenten\Arduino\libraries\TinyGPS/TinyGPS.cpp:278: multiple definition ofTinyGPS::gpsatol(char const*)' TinyGPS.cpp.o:C:\DOCUME~1\GEBRUI~1\LOCALS~1\Temp\build4646645334417534785.tmp/TinyGPS.cpp:278: first defined here TinyGPS\TinyGPS.cpp.o: In function TinyGPS::gpsstrcmp(char const*, char const*)': C:\Documents and Settings\Gebruiker\Mijn documenten\Arduino\libraries\TinyGPS/TinyGPS.cpp:286: multiple definition ofTinyGPS::gpsstrcmp(char const*, char const*)' TinyGPS.cpp.o:C:\DOCUME~1\GEBRUI~1\LOCALS~1\Temp\build4646645334417534785.tmp/TinyGPS.cpp:286: first defined here TinyGPS\TinyGPS.cpp.o: In function TinyGPS::cardinal(float)': C:\Documents and Settings\Gebruiker\Mijn documenten\Arduino\libraries\TinyGPS/TinyGPS.cpp:339: multiple definition ofTinyGPS::cardinal(float)' TinyGPS.cpp.o:C:\DOCUME~1\GEBRUI~1\LOCALS~1\Temp\build4646645334417534785.tmp/TinyGPS.cpp:339: first defined here TinyGPS\TinyGPS.cpp.o: In function TinyGPS::f_altitude()': C:\Documents and Settings\Gebruiker\Mijn documenten\Arduino\libraries\TinyGPS/TinyGPS.cpp:393: multiple definition ofTinyGPS::f_altitude()' TinyGPS.cpp.o:C:\DOCUME~1\GEBRUI~1\LOCALS~1\Temp\build4646645334417534785.tmp/TinyGPS.cpp:393: first defined here TinyGPS\TinyGPS.cpp.o: In function TinyGPS::f_course()': C:\Documents and Settings\Gebruiker\Mijn documenten\Arduino\libraries\TinyGPS/TinyGPS.cpp:398: multiple definition ofTinyGPS::f_course()' TinyGPS.cpp.o:C:\DOCUME~1\GEBRUI~1\LOCALS~1\Temp\build4646645334417534785.tmp/TinyGPS.cpp:398: first defined here TinyGPS\TinyGPS.cpp.o: In function TinyGPS::f_speed_knots()': C:\Documents and Settings\Gebruiker\Mijn documenten\Arduino\libraries\TinyGPS/TinyGPS.cpp:403: multiple definition ofTinyGPS::f_speed_knots()' TinyGPS.cpp.o:C:\DOCUME~1\GEBRUI~1\LOCALS~1\Temp\build4646645334417534785.tmp/TinyGPS.cpp:403: first defined here TinyGPS\TinyGPS.cpp.o: In function TinyGPS::f_speed_mph()': C:\Documents and Settings\Gebruiker\Mijn documenten\Arduino\libraries\TinyGPS/TinyGPS.cpp:406: multiple definition ofTinyGPS::f_speed_mph()' TinyGPS.cpp.o:C:\DOCUME~1\GEBRUI~1\LOCALS~1\Temp\build4646645334417534785.tmp/TinyGPS.cpp:406: first defined here TinyGPS\TinyGPS.cpp.o: In function TinyGPS::f_speed_mps()': C:\Documents and Settings\Gebruiker\Mijn documenten\Arduino\libraries\TinyGPS/TinyGPS.cpp:412: multiple definition ofTinyGPS::f_speed_mps()' TinyGPS.cpp.o:C:\DOCUME~1\GEBRUI~1\LOCALS~1\Temp\build4646645334417534785.tmp/TinyGPS.cpp:412: first defined here TinyGPS\TinyGPS.cpp.o: In function TinyGPS::f_speed_kmph()': C:\Documents and Settings\Gebruiker\Mijn documenten\Arduino\libraries\TinyGPS/TinyGPS.cpp:418: multiple definition ofTinyGPS::f_speed_kmph()' TinyGPS.cpp.o:C:\DOCUME~1\GEBRUI~1\LOCALS~1\Temp\build4646645334417534785.tmp/TinyGPS.cpp:418: first defined here TinyGPS\TinyGPS.cpp.o: In function TinyGPS::get_datetime(unsigned long*, unsigned long*, unsigned long*)': C:\Documents and Settings\Gebruiker\Mijn documenten\Arduino\libraries\TinyGPS/TinyGPS.cpp:357: multiple definition ofTinyGPS::get_datetime(unsigned long*, unsigned long*, unsigned long*)' TinyGPS.cpp.o:C:\DOCUME~1\GEBRUI~1\LOCALS~1\Temp\build4646645334417534785.tmp/TinyGPS.cpp:357: first defined here TinyGPS\TinyGPS.cpp.o: In function TinyGPS::crack_datetime(int*, unsigned char*, unsigned char*, unsigned char*, unsigned char*, unsigned char*, unsigned char*, unsigned long*)': C:\Documents and Settings\Gebruiker\Mijn documenten\Arduino\libraries\TinyGPS/TinyGPS.cpp:374: multiple definition ofTinyGPS::crack_datetime(int*, unsigned char*, unsigned char*, unsigned char*, unsigned char*, unsigned char*, unsigned char*, unsigned long*)' TinyGPS.cpp.o:C:\DOCUME~1\GEBRUI~1\LOCALS~1\Temp\build4646645334417534785.tmp/TinyGPS.cpp:374: first defined here TinyGPS\TinyGPS.cpp.o: In function TinyGPS::get_position(long*, long*, unsigned long*)': C:\Documents and Settings\Gebruiker\Mijn documenten\Arduino\libraries\TinyGPS/TinyGPS.cpp:348: multiple definition ofTinyGPS::get_position(long*, long*, unsigned long*)' TinyGPS.cpp.o:C:\DOCUME~1\GEBRUI~1\LOCALS~1\Temp\build4646645334417534785.tmp/TinyGPS.cpp:348: first defined here TinyGPS\TinyGPS.cpp.o: In function TinyGPS::f_get_position(float*, float*, unsigned long*)': C:\Documents and Settings\Gebruiker\Mijn documenten\Arduino\libraries\TinyGPS/TinyGPS.cpp:365: multiple definition ofTinyGPS::f_get_position(float*, float*, unsigned long*)' TinyGPS.cpp.o:C:\DOCUME~1\GEBRUI~1\LOCALS~1\Temp\build4646645334417534785.tmp/TinyGPS.cpp:365: first defined here TinyGPS\TinyGPS.cpp.o: In function TinyGPS::course_to(float, float, float, float)': C:\Documents and Settings\Gebruiker\Mijn documenten\Arduino\libraries\TinyGPS/TinyGPS.cpp:319: multiple definition ofTinyGPS::course_to(float, float, float, float)' TinyGPS.cpp.o:C:\DOCUME~1\GEBRUI~1\LOCALS~1\Temp\build4646645334417534785.tmp/TinyGPS.cpp:319: first defined here TinyGPS\TinyGPS.cpp.o: In function TinyGPS::distance_between(float, float, float, float)': C:\Documents and Settings\Gebruiker\Mijn documenten\Arduino\libraries\TinyGPS/TinyGPS.cpp:294: multiple definition ofTinyGPS::distance_between(float, float, float, float)' TinyGPS.cpp.o:C:\DOCUME~1\GEBRUI~1\LOCALS~1\Temp\build4646645334417534785.tmp/TinyGPS.cpp:294: first defined here TinyGPS\TinyGPS.cpp.o: In function TinyGPS::term_complete()': C:\Documents and Settings\Gebruiker\Mijn documenten\Arduino\libraries\TinyGPS/TinyGPS.cpp:164: multiple definition ofTinyGPS::term_complete()' TinyGPS.cpp.o:C:\DOCUME~1\GEBRUI~1\LOCALS~1\Temp\build4646645334417534785.tmp/TinyGPS.cpp:164: first defined here TinyGPS\TinyGPS.cpp.o: In function TinyGPS::encode(char)': C:\Documents and Settings\Gebruiker\Mijn documenten\Arduino\libraries\TinyGPS/TinyGPS.cpp:59: multiple definition ofTinyGPS::encode(char)' TinyGPS.cpp.o:C:\DOCUME~1\GEBRUI~1\LOCALS~1\Temp\build4646645334417534785.tmp/TinyGPS.cpp:59: first defined here TinyGPS\TinyGPS.cpp.o:(.rodata._ZN7TinyGPS19GPS_INVALID_F_ANGLEE+0x0): multiple definition of TinyGPS::GPS_INVALID_F_ANGLE' TinyGPS.cpp.o:(.rodata._ZN7TinyGPS19GPS_INVALID_F_ANGLEE+0x0): first defined here TinyGPS\TinyGPS.cpp.o:(.rodata._ZN7TinyGPS22GPS_INVALID_F_ALTITUDEE+0x0): multiple definition ofTinyGPS::GPS_INVALID_F_ALTITUDE' TinyGPS.cpp.o:(.rodata._ZN7TinyGPS22GPS_INVALID_F_ALTITUDEE+0x0): first defined here TinyGPS\TinyGPS.cpp.o:(.rodata._ZN7TinyGPS19GPS_INVALID_F_SPEEDE+0x0): multiple definition of `TinyGPS::GPS_INVALID_F_SPEED' TinyGPS.cpp.o:(.rodata._ZN7TinyGPS19GPS_INVALID_F_SPEEDE+0x0): first defined here

Best regards,

Guus

Read this before posting a programming question

Your code?

Oops, it was late yesterday.

The code is bigger than 9500 chars, so I can't post it directly The code: http://karman.cc/blog/descargas/gps_code.tgz

Needed also: It uses TinyGPS library from Mikal Hart, custom new software serial to disable interrupts in pin ports and PinChangeInt, an Arduino library to handle buttons interrupts.

http://arduiniana.org/libraries/tinygps/ http://arduino.cc/playground/Main/PinChangeInt

I want to build this project: http://karman.cc/blog/archives/746

I use the WIndows IDE 1.0.1

I compiled your code and got this (only):

GPS_Toy.cpp: In function 'void setup()':
GPS_Toy:111: error: 'PCintPort' has not been declared
GPS_Toy:112: error: 'PCintPort' has not been declared
GPS_Toy.cpp: In function 'void interrupt_button()':
GPS_Toy:339: error: 'PCintPort' has not been declared
GPS_Toy:341: error: 'PCintPort' has not been declared

Something is wrong with the way you installed your libraries. Maybe you have multiple TinyGPS installed or something.

Strange, I installed the windows IDE at 3 different PC's. (1x XP, 2x Windows 7 (All Dutch)) Same error.

Maybe a language issue or something, I will install Linux Debian and try again.

Thanks for the help.

Found the problem, a double incude....