Problem with -lobjc

For everyone, just starting with C++ or programming at all. Ask newbie questions in this forum!

Moderators: Darobat, RecursiveS, Dante Shamest, Bugdude, Wizard

Problem with -lobjc

Postby Odin2014 » Mon Nov 13, 2006 5:21 pm

Sorry if this is a stupid question but i'm having problems compiling a project in dev-c++ because it always throws the same error:
"cannot find -lobjc
ld returned 1 exit status "

Thank you for any information.
User avatar
Odin2014
 
Posts: 5
Joined: Mon Nov 13, 2006 5:12 pm

Postby ventsyv » Tue Nov 14, 2006 11:18 am

For some reason Dev-C++ does not like spaces in its path. So if you installed it in C:\Program Files\Bloodshed\ for example, it might have difficulties finding libraries etc. This could be the causing the problem you are having.
However, a different possibility is that you have set some parameters that the compiler/linker does not like and is bugging out.
I suggest to try to rebuild the whole project first. If that does not work, look in Tools->Compiler Options. In that tab you'll see 2 fields that will allow you to add extra commands to you compiler linker. Check if -lobjc appears anywhere. My bet is that it would appear in the linker options.
I think -lobjc is an option for the compiler to compile Object C code.
Do you really need this option set ? Tre removing it and see if that works.

Hope this works.
User avatar
ventsyv
 
Posts: 2828
Joined: Mon Sep 22, 2003 5:25 pm
Location: MD USA

Postby Odin2014 » Tue Nov 14, 2006 11:28 am

-lobjc doesn't appear anywhere; and that error happens with almost all my proyects.
User avatar
Odin2014
 
Posts: 5
Joined: Mon Nov 13, 2006 5:12 pm

Postby ventsyv » Tue Nov 14, 2006 7:20 pm

Hmm, thats weird. You are not getting any compiler errors correct ?
Try compiling a simple Hello world program
Code: Select all
#include <iostream>
using namespace std;

int main()
{
   cout<<"Hello"<<endl;
   return 0;
}


Is this working ?
User avatar
ventsyv
 
Posts: 2828
Joined: Mon Sep 22, 2003 5:25 pm
Location: MD USA

Postby ggliff » Wed Nov 15, 2006 6:17 am

I have no problem using Dev-C++ with spaces in the directory paths.
"The secret to creativity is knowing how to hide your sources" Albert Einstein
User avatar
ggliff
 
Posts: 123
Joined: Tue Feb 17, 2004 10:51 am
Location: U.K.

Postby ventsyv » Fri Nov 17, 2006 8:00 am

Well, it used to be a problem. They might have fixed it in the newer releases ...
User avatar
ventsyv
 
Posts: 2828
Joined: Mon Sep 22, 2003 5:25 pm
Location: MD USA


Return to For Beginners

Who is online

Users browsing this forum: Google [Bot] and 4 guests