[Top][All Lists]

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

Re: Foundation import file not found

From: Johannes Brakensiek
Subject: Re: Foundation import file not found
Date: Wed, 15 May 2019 15:52:43 +0200

Hi Peter,

I am currently discovering the ways of building stuff with GNUstep as well. ;)

The most important thing to start correctly is to make sure to have all compiler/linker flags and environment variables set. The easiest way to do this is to source (not execute) the corresponding GNUstep.sh file, which might work as this using Ubuntu:

. /usr/GNUstep/System/Library/Makefiles/GNUstep.sh

You might even want to add execute this to add the line above to your bashrc:

echo ". /usr/GNUstep/System/Library/Makefiles/GNUstep.sh" >> ~/.bashrc

For a reference on how to build a simple Objective C app by either using the command or a make file you might look at this demo from Patryk Laurent:


Of course there clang is used so handling might differ a little bit when using gcc. But in general I think gnustep-config should output the correct flags when set up with gcc.

Hope that helps,

On 14 May 2019, at 10:00, Peter Wiehe wrote:

Hi all,

I'm new to Objective-C and GNUStep. I am using xubuntu 18.04 GNU/Linux.

I installed GNUStep with "sudo apt-get install gnustep gnustep devel".

I'm trying to compile a simple Hello World Objc program which imports Foundation/Foundation.h.

The first line of that program is "#import <Foundation/Foundation.h>".

I compile with "gcc -x objective.c hello.m -o hello".

But there comes an error message because the compiler can't find the Foundation file.

What is wrong?

Kind regards


reply via email to

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