473,396 Members | 2,076 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 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. {
  3.  
  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. }
  46.  
  47.  
Thanks for any help that can be given.
Feb 25 '08 #1
3 6108
hsn
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.

regrads
hsn
Feb 25 '08 #2
weaknessforcats
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

0
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...
1
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...
2
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...
3
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,,
2
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...
2
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...
4
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...
9
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/...
2
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);
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.