472,799 Members | 1,548 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,799 software developers and data experts.

ld returned 1 exit status, cannot find -lobjc

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

Expand|Select|Wrap|Line Numbers
  1. int main()
  2. {
  4.  int runs;
  5.  double high=0;
  6.  double remaining=0;
  7.  double fremaining=0;
  8.  int count=0; // count the # of times we reach out goal
  9.  int progress=0;
  10.  int h,r;
  11.  srand((unsigned)time(NULL)); // seed random # generator
  12.  printf("[....................]");
  13.  for (runs=0;runs<NUMRUNS;runs++)
  14.  {
  15.   if (20*(runs+1)/NUMRUNS>progress)
  16.   {
  17.    progress=20*(runs+1)/NUMRUNS;
  18.    printf("\r[");
  19.    for(int x=0;x<progress;x++)
  20.     printf("*");
  21.   }
  22.   start(h,r);
  23.   high+=h;
  24.   remaining+=r/NUMRUNS; // Compute a running average of remaining meat
  25.   if (r>=GOALMONEY)
  26.    count++;
  27.   else
  28.    fremaining+=r;
  29.  }
  30.  high/=NUMRUNS;
  31.  if (NUMRUNS-count>0)
  32.   fremaining/=NUMRUNS-count;
  33.  printf("\n\nStarted with %dk. ",STARTINGMONEY/1000);
  34.  if (GOALMONEY>0)
  35.   printf("Set a goal of %dk. ",GOALMONEY/1000);
  36.  printf("Ran %d times.\nGot up to an average %dk.\nEnded up with an average %dk.\n",NUMRUNS,int(high/1000),int(remaining/1000));
  37.  if (GOALMONEY>0)
  38.  {
  39.   if (NUMRUNS-count>0)
  40.    printf("Failures ended up with an average %dk.\n",int(fremaining/1000));
  41.   printf("You reached your goal %f%% of the time.\n\n",(100*double(count)/NUMRUNS));
  42.  }
  43.  system("pause");
  44. return 0;
  45. }
Thanks for any help that can be given.
Feb 25 '08 #1
3 6077
237 100+
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.

Feb 25 '08 #2
9,208 Expert Mod 8TB
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.
Feb 25 '08 #3
Found the problem. Switched from Dev-CPP to digital mas compiler and it was fixed. THanks, all.
Feb 26 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

by: Jari Aalto+usenet | last post by:
Hi, Where I can specify more linking search directories for a Python module that makes a gcc build? Setting the LD_LIBRARY_PATH on command line does not seem to propagate to the linker. Jari...
by: francescomoi | last post by:
Hi. I'm trying to build MySQL-python-1.2.0 on my Linux FC2 (with MySQL 3.23.58). But when building, I get this error message: ------------------------------------------------------- # python...
by: Adam | last post by:
Hi I have been trying to compile a program and keep getting this error gcc -g -Wall -c filecopy.c g++ -static -g -o assess mark.o mark1.o mark2.o mark3.o mark4.o mark5.o mark5a.o mark5b.o...
by: learning_C++ | last post by:
Hi, When i tried to compile my code, there is an error: collect2: ld returned 1 exit status what is the reason causing this error? Thanks,,
by: Jeffrey W. Baker | last post by:
I just noticed something unexpected when using psql. I had written a shell script to bulk-load some hundreds of files into a database, and move each file to success/ or failure/ directories...
by: Navaneet | last post by:
Hi, I am building a application on linux. I am getting an error which relates to undefined reference to a function. I had build same on other platform, no error comes. Here is whole error...
by: GHUM | last post by:
The compile works, BUT linking fails: 2.5\Release\psycopg\_psycopg.def -Lc:\python25\libs -Lc: \python25\PCBuild -Lc:/p ostgres/83RC2/lib -lpython25 -lpq -lws2_32 -ladvapi32 -o build...
by: TsanChung | last post by:
How to fix the following error? # make .... g++ -o src/prog ./src/addSrv.o ./src/createClntCert_main.o ./src/ createSupportFile.o ./src/deleteSrv.o ./src/replaceSrv.o ./src/...
by: babhishek | last post by:
Hi I am trying to compile this code on dev c++ #include<windows.h> #include<stdio.h> #include<iostream> int main(){ char s; GetWindowsDirectory(s,255);
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 2 August 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
by: erikbower65 | last post by:
Using CodiumAI's pr-agent is simple and powerful. Follow these steps: 1. Install CodiumAI CLI: Ensure Node.js is installed, then run 'npm install -g codiumai' in the terminal. 2. Connect to...
by: linyimin | last post by:
Spring Startup Analyzer generates an interactive Spring application startup report that lets you understand what contributes to the application startup time and helps to optimize it. Support for...
by: erikbower65 | last post by:
Here's a concise step-by-step guide for manually installing IntelliJ IDEA: 1. Download: Visit the official JetBrains website and download the IntelliJ IDEA Community or Ultimate edition based on...
by: kcodez | last post by:
As a H5 game development enthusiast, I recently wrote a very interesting little game - Toy Claw ((http://claw.kjeek.com/))。Here I will summarize and share the development experience here, and hope it...
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Sept 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
by: DJRhino | last post by:
Private Sub CboDrawingID_BeforeUpdate(Cancel As Integer) If = 310029923 Or 310030138 Or 310030152 Or 310030346 Or 310030348 Or _ 310030356 Or 310030359 Or 310030362 Or...
by: lllomh | last post by:
How does React native implement an English player?
by: Mushico | last post by:
How to calculate date of retirement from date of birth

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.