bugGNUstep - Bugs: bug #29301, Trouble linking to the...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #29301: Trouble linking to the gnustep-objective c library (on mingw)

Submitted by:  Brock Erwin <berwin>
Submitted on:  Mon 22 Mar 2010 06:44:44 PM UTC  
 
Category:  Libraries Severity:  3 - Normal
Item Group:  None Status:  Need Info
Privacy:  Public Assigned to:  None
Open/Closed:  Closed

Fri 18 Mar 2011 09:54:41 PM UTC, comment #5:

Closing for lack of feedback.

Thanks

Nicola Pero <nico>
Project Member
Tue 11 May 2010 05:08:36 PM UTC, comment #4:

Compiling the Objective-C runtime is only needed for very old versions of gcc. Or if you want to use the new Objective-C 2.0, but this wasn't the case for you.

I see that you are using a standard Makefile to compile your program, this works fine for me, but it surely is easier to use a GNUmakefile that handles most of the more complex things for you.
As the compilation failed for you it would be helpful to see what the different variable contain you defined. If the problem still persists, please report back these values.

Fred Kiefer <FredKiefer>
Project Member
Thu 29 Apr 2010 02:25:51 PM UTC, comment #3:

My apologies for the horrid formatting: I must have done the markup formatting wrong on my comment.

Here it is again without any attempts at markup:

...

The first line of make.out shows us exactly what's being passed to gcc: it's using data returned from gnustep-config to use for options. If you execute each of those three in a shell, alone - outside of make, do the paths displayed for the -I and -L options point to the right places?

Running just gcc -Wall main.m on my Linode produces the same output as your Makefile; it's possible that gnustep-config isn't returning anything because there isn't anything set for any of the supplied flags - not even a message indicating such. Any informational or error messages returned by gnustep-config would be processed by gcc as options, leading to additional error messages - which we don't see in make.out.

Try to run gcc on your main.m directly using the same options it would expect to receive from gnustep-config (mine is included at the end of this message as a convenience - adjust things like paths as needed) - it could hopefully fix the errors.

Now, about that warning - control reaches end of non-void function. When you write +methodName or -methodName, the compiler expects you to return an object. This is because +methodName is shorthand for + (id) methodName. This warning can be silenced by either returning self or specifying void in the signature.

Lastly, did you mean to define Test as a root class? It doesn't define a superclass. Given the minimal context of your example, it's probably intentional on your part, but I'll mention it just in case it isn't.

Hopefully, something in this wall of text helps you out in some way.

-- thoughts from a curious bystander

Lowell Vizon <lowell>
Thu 29 Apr 2010 02:21:56 PM UTC, comment #2:

The first line of +make.out+ shows us exactly what's being passed to +gcc+: it's using data returned from +gnustep-config+ to use for options. If you execute each of those three in a shell, alone - outside of make, do the paths displayed for the +-I+ and +-L+ options point to the right places?

Running just +gcc -Wall+ main.m on my Linode produces the same output as your +Makefile+; it's possible that +gnustep-config+ isn't returning anything because there isn't anything set for any of the supplied flags - not even a message indicating such. Any informational or error messages returned by +gnustep-config+ would be processed by +gcc+ as options, leading to additional error messages - which we don't see in make.out.

Try to run +gcc+ on your +main.m+ directly using the same options it would expect to receive from +gnustep-config+ (I attached mine for you - adjust things like paths as needed) - it could hopefully fix the errors.

Now, about that warning - +control reaches end of non-void function+. When you write ++methodName+ or +-methodName+, the compiler expects you to return an object. This is because ++methodName+ is shorthand for ++ (id) methodName+. This warning can be silenced by either returning self or specifying +void+ in the signature.

Lastly, did you mean to define +Test+ as a root class? It doesn't define a superclass. Given the minimal context of your example, it's probably intentional on your part, but I'll mention it just in case it isn't.

Hopefully, something in this wall of text of mine helps you out in some way.

-- thoughts from a curious bystander

(file #20373)

Lowell Vizon <lowell>
Thu 25 Mar 2010 11:05:23 AM UTC, comment #1:

> I could not get the latest svn version of gnustep-base to
> compile properly


Can you report what problems you had ?

It worked for me just about a week ago, using the instructions on core/make/Documentation/README.MinGW. :-)

Thanks

Nicola Pero <nico>
Project Member
Mon 22 Mar 2010 06:44:44 PM UTC, original submission:

To install gnustep-obj, I used the following instructions:

svn co http://svn/gna.org/svnu/gnustep/libs/libobjc/trunk

make
make install

I also followed the instructions for compiling and installing gnustep-make gnustep-base, back, and all the other libraries. I could not get the latest svn version of gnustep-base to compile properly, but I was able to get the stable version (downloaded from the website) compiled and installed properly.

My sample program is attached in a tarball. You will see I am getting a bunch of undefined references to objc_get_class, objc_msg_lookup, and __objc_exec_class

Thanks.

Brock Erwin <berwin>

 

Attached Files
file #20373:  gnustep-config.text added by lowell (918B - text/plain)
file #20004:  testprogram.tar.gz added by berwin (886B - application/gzip)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by FredKiefer (Posted a comment)
  • -email is unavailable- added by lowell (Posted a comment)
  • -email is unavailable- added by nico (Posted a comment)
  • -email is unavailable- added by berwin (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

     

     

    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2011-03-18 nico Open/ClosedOpen => Closed
    2010-05-11 FredKiefer CategoryNone => Libraries
        StatusNone => Need Info
    2010-04-29 lowell Attached File- => Added gnustep-config.text, #20373
    2010-03-22 berwin Attached File- => Added testprogram.tar.gz, #20004

    Back to the top


    Powered by Savane 3.4