swarm-support
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: infos on compiler flag


From: Paul Johnson
Subject: Re: infos on compiler flag
Date: Wed, 11 Sep 2002 08:42:29 -0500
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.0) Gecko/20020606

That "Simple Test Program" has never compiled cleanly for me. It goes:

main.m:1:2: warning: #import is obsolete, use an #ifndef wrapper in the header file
main.m: In function `main':
main.m:4: warning: return type of `main' is not `int'
Printer.m:1:2: warning: #import is obsolete, use an #ifndef wrapper in the header file /usr/bin/ld: warning: type and size of dynamic symbol `__objc_class_name_Object' are not defined


A couple of years ago I revised that so it would compile/run on my systems:

http://lark.cc.ku.edu/~pauljohn/SwarmFaq/WorkingExampleCode/Objc_HelloWorld.tar.gz

WHen I compile that, it runs, but I still get the annoying messages:

$ gcc -lobjc main.m Printer.m -o test
main.m:47:2: warning: #import is obsolete, use an #ifndef wrapper in the header file Printer.m:17:2: warning: #import is obsolete, use an #ifndef wrapper in the header file /usr/bin/ld: warning: type and size of dynamic symbol `__objc_class_name_Object' are not defined




Perrone Alessandro wrote:
Hi all
I am compiling a very simple program written in objc (http://www.slip.net/~dekorte/Objective-C/Documentation/5_SampleCode/SampleCode1.html), Here it is the result of compilation
--
gcc -fgnu-runtime main.m printer.m -o test
main.m:0: Assertion "flag_next_runtime" failed
printer.m:0: Assertion "flag_next_runtime" failed
[localhost:~/objc-sample] alex% gcc -v
Reading specs from /usr/libexec/gcc/darwin/ppc/2.95.2/specs
Apple Computer, Inc. version gcc-937.2, based on gcc version 2.95.2 19991024 (release)
----
gcc3 -fgnu-runtime main.m printer.m -o test
main.m: In function `main':
main.m:6: warning: return type of `main' is not `int'
main.m: At top level:
main.m:14: internal error: Bus error
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://developer.apple.com/bugreporter> for instructions.
------
But If I use the -lobjc flag,
gcc3 -lobjc main.m printer.m -o test
main.m: In function `main':
main.m:6: warning: return type of `main' is not `int'
[localhost:~/objc-sample] alex% ./test
Hello World!
[localhost:~/objc-sample] alex%
----
Any hints?
Regards.
                    ALEX

                 ==================================
  Swarm-Support is for discussion of the technical details of the day
  to day usage of Swarm.  For list administration needs (esp.
  [un]subscribing), please send a message to <address@hidden>
  with "help" in the body of the message.



--
Paul E. Johnson                       email: address@hidden
Dept. of Political Science            http://lark.cc.ku.edu/~pauljohn
University of Kansas                  Office: (785) 864-9086
Lawrence, Kansas 66045                FAX: (785) 864-5700


                 ==================================
  Swarm-Support is for discussion of the technical details of the day
  to day usage of Swarm.  For list administration needs (esp.
  [un]subscribing), please send a message to <address@hidden>
  with "help" in the body of the message.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]