Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

problem with libraries

27 views
Skip to first unread message

Thanasis Petridis

unread,
Nov 6, 2011, 2:59:51 PM11/6/11
to help-g...@gnu.org
Hello. My name is Thanasis. 

First of all sorry for my poor english.

Secondly, if this is the wrong mailing list or if there is a solution for my problem, just tell me which is the correct mailing list or where is the answer.

I have a PC running on Windows 7 and I want to start programming apps for iOS. So I figured out that I should start from learning the Objective-C language.
So I searched in the Internet and I found that I can program Objective-C on windows 7 through GNUstep. I install in the directory c:\GNUstep the following 3 setups

-gnustep-msys-system-0.28.1-setup
-gnustep-core-0.28.0-setup
-gnustep-devel-1.3.0-setup

I have created a file hello.m in the folder c:\new 
I started the shell application
I wrote c:\new
and then I wrote g++ hello.m and I get the error " Foundation.h: No such file or directory compilation terminated"
I changed the path of Foundation in the source code of my program to the correct 

" #import <C:\GNUstep\GNUstep\System\Library\Headers\Foundation\Foundation.h> "

and then I get the error : " C:\GNUstep\GNUstep\System\Library\Headers\Foundation\Foundation.h:30:40: fatal error: GNUstepBase/GSVersionMacros.h: No such file or directory "

I changed the path of the GSVersionMacros.h inside the source code of the Foundation.h file and then I got a new error for another header file inside the GSVersionMacros.h file.

How can I fix this? Should I have to do this for all the header files? 

Thank you very much.


Adam Fedor

unread,
Nov 7, 2011, 9:50:13 AM11/7/11
to Thanasis Petridis, help-g...@gnu.org

On Nov 6, 2011, at 12:59 PM, Thanasis Petridis wrote:

I have created a file hello.m in the folder c:\new 
I started the shell application
I wrote c:\new
and then I wrote g++ hello.m and I get the error " Foundation.h: No such file or directory compilation terminated"
I changed the path of Foundation in the source code of my program to the correct 

" #import <C:\GNUstep\GNUstep\System\Library\Headers\Foundation\Foundation.h> "

and then I get the error : " C:\GNUstep\GNUstep\System\Library\Headers\Foundation\Foundation.h:30:40: fatal error: GNUstepBase/GSVersionMacros.h: No such file or directory "

I changed the path of the GSVersionMacros.h inside the source code of the Foundation.h file and then I got a new error for another header file inside the GSVersionMacros.h file.

How can I fix this? Should I have to do this for all the header files? 

Thank you very much.


It would be easiest to use Makefiles to help set up and compile you program.  See the documentation here:


and more documentation here:


Richard Frith-Macdonald

unread,
Nov 7, 2011, 9:54:54 AM11/7/11
to Thanasis Petridis, help-g...@gnu.org

On 6 Nov 2011, at 19:59, Thanasis Petridis wrote:

> Hello. My name is Thanasis.
>
> First of all sorry for my poor english.
>
> Secondly, if this is the wrong mailing list or if there is a solution for my problem, just tell me which is the correct mailing list or where is the answer.
>
> I have a PC running on Windows 7 and I want to start programming apps for iOS. So I figured out that I should start from learning the Objective-C language.
> So I searched in the Internet and I found that I can program Objective-C on windows 7 through GNUstep. I install in the directory c:\GNUstep the following 3 setups
>
> -gnustep-msys-system-0.28.1-setup
> -gnustep-core-0.28.0-setup
> -gnustep-devel-1.3.0-setup
>
> I have created a file hello.m in the folder c:\new
> I started the shell application
> I wrote c:\new
> and then I wrote g++ hello.m

This is where you went wrong ... you can't really build code trying to use a compiler directly because there are various options, include directories, and libraries which need to be used.
You should use gnustep-make to automate the build process and fill in all those options for you.

See http://www.gnustep.it/nicola/Tutorials/WritingMakefiles/index.html for a good starting point.



Thanasis Petridis

unread,
Nov 7, 2011, 5:21:17 PM11/7/11
to help-g...@gnu.org
Thanks for the answers Adam and Richard!

Thanasis Petridis

unread,
Nov 14, 2011, 5:02:37 PM11/14/11
to help-g...@gnu.org
Hello again
 
I have a new problem. 

How can I compile in objective-C when I have the implementation code, the class main and the interface code in different files ?

For example I would like to have the main class in the file "test.m", and the interface in the file Fraction.h and the implementation in the file Fraction.m .
What should I have to write inside the GNUmakefile file? 

Thanks.

Eric Wasylishen

unread,
Nov 14, 2011, 5:12:58 PM11/14/11
to Thanasis Petridis, help-g...@gnu.org
Hi,

The .h files do not need to be included in the GNUmakefile; you just have to include them in your .m files with a line like: #import "MyHeader.h"

typically I use the line:
$(APP_NAME)_OBJC_FILES = $(wildcard *.m)
in my GNUmakefile, which will compile all .m (implementation files) in the current directory.

It may help to check out these examples:


and the docs at


--Eric

_______________________________________________
Help-gnustep mailing list
Help-g...@gnu.org
https://lists.gnu.org/mailman/listinfo/help-gnustep

Ivan Vučica

unread,
Nov 16, 2011, 4:42:34 AM11/16/11
to Eric Wasylishen, help-g...@gnu.org, Thanasis Petridis
Specifying header files is necessary for "make dist" to work.
--
Ivan Vučica - iv...@vucica.net


0 new messages