ld returned 1 exit status, cannot find -lobjc

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • joshfbm
    New Member
    • Feb 2008
    • 4

    ld returned 1 exit status, cannot find -lobjc

    In the title are the two errors I get when compiling. The code is as follows

    Code:
    int main()
    {
        
     int runs;
     double high=0;
     double remaining=0;
     double fremaining=0;
     int count=0; // count the # of times we reach out goal
     int progress=0;
     int h,r;
     srand((unsigned)time(NULL)); // seed random # generator
     printf("[....................]");
     for (runs=0;runs<NUMRUNS;runs++)
     {
      if (20*(runs+1)/NUMRUNS>progress)
      {
       progress=20*(runs+1)/NUMRUNS;
       printf("\r[");
       for(int x=0;x<progress;x++)
        printf("*");
      }
      start(h,r);
      high+=h;
      remaining+=r/NUMRUNS; // Compute a running average of remaining meat
      if (r>=GOALMONEY)
       count++;
      else
       fremaining+=r;
     }
     high/=NUMRUNS;
     if (NUMRUNS-count>0)
      fremaining/=NUMRUNS-count;
     printf("\n\nStarted with %dk. ",STARTINGMONEY/1000);
     if (GOALMONEY>0)
      printf("Set a goal of %dk. ",GOALMONEY/1000);
     printf("Ran %d times.\nGot up to an average %dk.\nEnded up with an average %dk.\n",NUMRUNS,int(high/1000),int(remaining/1000));
     if (GOALMONEY>0)
     {
      if (NUMRUNS-count>0)
       printf("Failures ended up with an average %dk.\n",int(fremaining/1000));
      printf("You reached your goal %f%% of the time.\n\n",(100*double(count)/NUMRUNS));
     }
     system("pause");
    return 0;
    }
    Thanks for any help that can be given.
    Last edited by sicarie; Feb 26 '08, 02:42 PM. Reason: No Full Code (Posting Guidelines)
  • hsn
    New Member
    • Sep 2007
    • 237

    #2
    i myself will not read a 115 line of code to find the error.
    you have to explain your code a little bit, try to find where the error is happening so we can help you.
    explain the problem if you can.

    regrads
    hsn

    Comment

    • weaknessforcats
      Recognized Expert Expert
      • Mar 2007
      • 9214

      #3
      Not a clue. Your code compiles and links using Visual Studio.NET 2005.

      However, this tool creates the makefile. If you have one of the others where you need to write your own makefile, then there may be an error there.

      Comment

      • joshfbm
        New Member
        • Feb 2008
        • 4

        #4
        Found the problem. Switched from Dev-CPP to digital mas compiler and it was fixed. THanks, all.

        Comment

        Working...