Re: problem with libraries

Eric Wasylishen <[email protected]> Mon, 14 Nov 2011 15:12:58 -0700
Newsgroups gmane.comp.lib.gnustep.user
Message-ID <[email protected]>
--===============3705761404113526005==
Content-Type: multipart/alternative; boundary="Apple-Mail=_82FC100E-9419-43DE-ADAE-C4A08D2C2ABB"


--Apple-Mail=_82FC100E-9419-43DE-ADAE-C4A08D2C2ABB
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=iso-8859-1

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 =3D $(wildcard *.m)
in my GNUmakefile, which will compile all .m (implementation files) in =
the current directory.

It may help to check out these examples:

ftp://ftp.gnustep.org/pub/gnustep/core/gnustep-examples-1.3.0.tar.gz

and the docs at

=
http://www.gnustep.org/resources/documentation/Developer/Make/Manual/make_=
toc.html

--Eric

On 2011-11-14, at 3:02 PM, Thanasis Petridis wrote:

> Hello again
> =20
> I have a new problem.=20
>=20
> How can I compile in objective-C when I have the implementation code, =
the class main and the interface code in different files ?
>=20
> 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?=20
>=20
> Thanks.
>=20
> On Tue, Nov 8, 2011 at 12:21 AM, Thanasis Petridis =
<[email protected]> wrote:
> Thanks for the answers Adam and Richard!
>=20
>=20
> On Mon, Nov 7, 2011 at 4:54 PM, Richard Frith-Macdonald =
<[email protected]> wrote:
>=20
> On 6 Nov 2011, at 19:59, Thanasis Petridis wrote:
>=20
> > 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
>=20
> 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.
>=20
> See http://www.gnustep.it/nicola/Tutorials/WritingMakefiles/index.html =
for a good starting point.
>=20
>=20
>=20
>=20
> _______________________________________________
> Help-gnustep mailing list
> [email protected]
> https://lists.gnu.org/mailman/listinfo/help-gnustep


--Apple-Mail=_82FC100E-9419-43DE-ADAE-C4A08D2C2ABB
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html;
	charset=iso-8859-1

<html><head></head><body style=3D"word-wrap: break-word; =
-webkit-nbsp-mode: space; -webkit-line-break: after-white-space; =
">Hi,<div><br></div><div>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"</div><div><br></div><div>typically I use the =
line:</div><div>$(APP_NAME)_OBJC_FILES =3D $(wildcard *.m)</div><div>in =
my GNUmakefile,&nbsp;which will compile all .m (implementation files) in =
the current directory.</div><div><br></div><div>It may help to check out =
these examples:</div><div><br></div><div><a =
href=3D"ftp://ftp.gnustep.org/pub/gnustep/core/gnustep-examples-1.3.0.tar.=
gz">ftp://ftp.gnustep.org/pub/gnustep/core/gnustep-examples-1.3.0.tar.gz</=
a></div><div><br></div><div>and the docs at</div><div><br></div><div><a =
href=3D"http://www.gnustep.org/resources/documentation/Developer/Make/Manu=
al/make_toc.html">http://www.gnustep.org/resources/documentation/Developer=
/Make/Manual/make_toc.html</a></div><div><br></div><div>--Eric</div><div><=
br><div><div>On 2011-11-14, at 3:02 PM, Thanasis Petridis =
wrote:</div><br class=3D"Apple-interchange-newline"><blockquote =
type=3D"cite"><div>Hello again</div><div>&nbsp;</div>I have a new =
problem.&nbsp;<div><br></div><div>How can I compile in objective-C when =
I have the implementation code, the class main and the interface code in =
different files ?</div><div><br></div>
<div>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 .</div><div>What should I have to =
write inside the&nbsp;GNUmakefile file?&nbsp;</div>
<div><br></div><div>Thanks.</div><div><br><div class=3D"gmail_quote">On =
Tue, Nov 8, 2011 at 12:21 AM, Thanasis Petridis <span dir=3D"ltr">&lt;<a =
href=3D"mailto:[email protected]">[email protected]</a>&gt;</span>=
 wrote:<br>
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 =
.8ex;border-left:1px #ccc solid;padding-left:1ex;">Thanks for the =
answers Adam and Richard!<div class=3D"HOEnZb"><div =
class=3D"h5"><br><br><div class=3D"gmail_quote">On Mon, Nov 7, 2011 at =
4:54 PM, Richard Frith-Macdonald <span dir=3D"ltr">&lt;<a =
href=3D"mailto:[email protected]" =
target=3D"_blank">[email protected]</a>&gt;</span> wrote:<br>

<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 =
.8ex;border-left:1px #ccc solid;padding-left:1ex"><div><br>
On 6 Nov 2011, at 19:59, Thanasis Petridis wrote:<br>
<br>
&gt; Hello. My name is Thanasis.<br>
&gt;<br>
&gt; First of all sorry for my poor english.<br>
&gt;<br>
&gt; 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.<br>
&gt;<br>
&gt; 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.<br>
&gt; 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<br>
&gt;<br>
&gt; -gnustep-msys-system-0.28.1-setup<br>
&gt; -gnustep-core-0.28.0-setup<br>
&gt; -gnustep-devel-1.3.0-setup<br>
&gt;<br>
&gt; I have created a file hello.m in the folder c:\new<br>
&gt; I started the shell application<br>
&gt; I wrote c:\new<br>
&gt; and then I wrote g++ hello.m<br>
<br>
</div>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.<br>
You should use gnustep-make to automate the build process and fill in =
all those options for you.<br>
<br>
See <a =
href=3D"http://www.gnustep.it/nicola/Tutorials/WritingMakefiles/index.html=
" =
target=3D"_blank">http://www.gnustep.it/nicola/Tutorials/WritingMakefiles/=
index.html</a> for a good starting point.<br>
<br>
<br>
</blockquote></div><br>
</div></div></blockquote></div><br></div>
_______________________________________________<br>Help-gnustep mailing =
list<br><a =
href=3D"mailto:[email protected]">[email protected]</a><br>https://l=
ists.gnu.org/mailman/listinfo/help-gnustep<br></blockquote></div><br></div=
></body></html>=

--Apple-Mail=_82FC100E-9419-43DE-ADAE-C4A08D2C2ABB--


--===============3705761404113526005==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Help-gnustep mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/help-gnustep

--===============3705761404113526005==--