Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 8 of 8

Thread: collect2.exe: error: ld returned 5 exit status

  1. #1
    Member
    Join Date
    Dec 2013
    Location
    Tulsa, OK
    Posts
    64

    collect2.exe: error: ld returned 5 exit status

    Merry Christmas....
    Teensy 2.0 on XP computer trying to compile the sample code from the analog temperature monitor.

    Code:
    void setup()
    {                
      Serial.begin(38400);
    }
    
    float code;
    float celsius;
    float fahrenheit;
    
    void loop()                     
    {
      code = analogRead(1);
      celsius = 25 + (code - 512) / 11.3;
      fahrenheit = celsius * 1.8 + 32;
      Serial.print("temperature: ");
      Serial.print(celsius);
      Serial.print(" Celsius, ");
      Serial.print(fahrenheit);
      Serial.println(" Fahrenheit");
      delay(1000);
    }
    Sorry about not using the Code tag but for some reason the tag links are not showing up for me. Running FireFox and not sure why.
    This should compile just fine and I can get it to if I comment out the two SerialPrint celsius lines. I see nothing wrong, what am I missing?
    Last edited by Theremingenieur; 12-24-2017 at 03:48 PM.

  2. #2
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    18,183
    Which version of Arduino & Teensyduino are you using? Click Help > About to check.

    It compiles without any error when I try on Linux 64 bit. I no longer have a Windows XP test machine set up, but I could try on Windows 10 if needed...

  3. #3
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    18,183
    If you have Arduino older than 1.8.2, you might be seeing this problem (which Arduino fixed in 1.8.2).

    https://github.com/arduino/Arduino/issues/5845

  4. #4
    Member
    Join Date
    Dec 2013
    Location
    Tulsa, OK
    Posts
    64
    Ya, 1.6.11, I'll update and see how it goes..I'm one of those that doesn't update software unless I have a problem that needs fixing. Too many times an update has caused me more grief than help
    Thanks

  5. #5
    Member
    Join Date
    Dec 2013
    Location
    Tulsa, OK
    Posts
    64
    That fixed it.. I had previously downloaded the latest versions of Arduino and Teensy for another computer but never updated this one.
    Thanks a bunch...

    Now if I could just figure out why the formatting links are not showing on this forum in FireFox I would be good. Pretty sure I am running the latest version of FireFox.

  6. #6
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    3,638
    Quote Originally Posted by BReeves View Post
    Now if I could just figure out why the formatting links are not showing on this forum in FireFox I would be good. Pretty sure I am running the latest version of FireFox.
    Works for me with Firefox. The Quick reply (as well as the full edit) has the # button in it which is for code tags.

    Of course you could do it the old fashion way as well:
    type in {code} ... {/code} but use the [] instead of {} I typed so they would show up...

  7. #7
    Member
    Join Date
    Dec 2013
    Location
    Tulsa, OK
    Posts
    64
    Well durn,
    Downloaded and installed the latest version of FireFox and did a Refresh to set everything back to the default settings and still do not have the edit buttons. Only left is to try a restart with add in's disabled.

  8. #8
    Member
    Join Date
    Dec 2013
    Location
    Tulsa, OK
    Posts
    64
    That didn't help.. Oh well now that I'm past the compile error on to my new project.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •