With gcc & with Eclipse

Anne van Rossum <[email protected]>
Newsgroups gmane.comp.lib.gnustep.user
Organization Almende
Message-ID <1166027243.22038.15.camel@anagent>
Dear list members,

Currently I'm starting to explore the Objective-C world. I figured out
to begin with GNUstep. The file I use is "source.m":

#import <Foundation/Foundation.h>
int main (void) 
{ 
  NSLog (@"Executing: Hello World!!!");
  return 0;
}
____________________________________________
I'm currently able to type make using this GNUmakefile:

include $(GNUSTEP_MAKEFILES)/common.make
TOOL_NAME = LogTest
LogTest_OBJC_FILES = source.m
include $(GNUSTEP_MAKEFILES)/tool.make
____________________________________________
However, I can't make it work using gcc:

source.m:1:34: error: Foundation/Foundation.h: No such file or directory
source.m: In function ‘main’:
source.m:5: error: cannot find interface declaration for
‘NXConstantString’
____________________________________________
And more important, but maybe in some way related, I want to run the
project in Eclipse, CDT. However, the console output is in this case:

make all 
Making all for tool LogTest...
 Linking tool LogTest ...
/usr/lib/GNUstep/System/Library/Libraries/libgnustep-base_s.a(objc-load.o): In function `objc_get_symbol_path':
(.text+0x1ef): undefined reference to `dlsym'
/usr/lib/GNUstep/System/Library/Libraries/libgnustep-base_s.a(objc-load.o): In function `objc_get_symbol_path':
(.text+0x20b): undefined reference to `dladdr'
...
...
...
collect2: ld returned 1 exit status
make[1]: *** [static_obj/LogTest] Error 1
make: *** [LogTest.all.tool.variables] Error 2

____________________________________________
I already tried to play with Environment variables within the Project
properties, but am not sure what is needed, and what not. And it seemed
like I copied every GNUSTEP_... env variable. I downloaded the stuff
using aptitude search gnustep, and have the libdl.so, libdl.a files
in /usr/lib.
____________________________________________
I use GNU Make 3.81, gcc 4.1.2 20060928 (prerelease) (Ubuntu
4.1.1-13ubuntu5), Ubuntu Edgy Eft

____________________________________________
I hope someone can help me figure out the settings in Eclipse. I want to
run it from there.

Thanks a lot in advance.

Kind regards,

Anne
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.