delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/12/29/09:21:29

From: "Jose MF" <josemataf AT hotmail DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Just a DJGPP Newbie
Date: Fri, 29 Dec 2000 14:17:24 -0000
Organization: Netvisao NNTPCache
Lines: 121
Message-ID: <978099449.872433@news>
References: <978030575 DOT 223213 AT news> <opan4t0nanl038smtu35i3c6surs851lst AT 4ax DOT com> <978046039 DOT 68387 AT news> <92h77r$47b$1 AT bob DOT news DOT rcn DOT net>
NNTP-Posting-Host: 213.228.128.15
Mime-Version: 1.0
X-Trace: sagan.global-one.pt 978103154 10712 213.228.128.15 (29 Dec 2000 15:19:14 GMT)
X-Complaints-To: abuse AT global-one DOT pt
NNTP-Posting-Date: 29 Dec 2000 15:19:14 GMT
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
Cache-Post-Path: news!unknown AT pal-213-228-145-187 DOT netvisao DOT pt
X-Cache: nntpcache 2.4.0b5 (see http://www.nntpcache.org/)
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Tanks you solve my problem

Jose MF
"Klytu" <jazzyjeff34 AT hotmail DOT com> escreveu na mensagem
news:92h77r$47b$1 AT bob DOT news DOT rcn DOT net...
> I work quite a bit with RHIDE and I am a newbie, also. Do not include ".h"
> header files in your project; just include the implementation files. For
> example, organize your code like this:
>
> File snake.h:
>
> // begin "snake.h"
> #ifndef SNAKE_H
> #define SNAKE_H
>
> class Snake{
>     public:
>        Snake();
>        void retMSG();
> };
>
> #endif
> //  end "snake.h"
>
> File snake.cpp:
>
> // begin "snake.cpp"
> #include "snake.h"
> Snake::Snake()
> {
> }
>
> void Snake::retMSG()
> {
>    cout<<"Ey!! I'm just a lousy dummy Snake"<<endl;
> }
> // end "snake.cpp"
>
> File main.cpp:
>
> //  begin "main.cpp"
> #include <iostream.h>
> #include "snake.h" // I know C++ is case sensitive
>
>   int main()
>  {
>     Snake *snake;
>      snake=new Snake();
>     snake->retMSG();
>     return 0;
> }
> // end "main.cpp"
>
> Now you would include just the files "snake.cpp" and "main.cpp" in your
> project and then choose "compile" and "run".
>
> "Jose MF" <josemataf AT hotmail DOT com> wrote in message
> news:978046039 DOT 68387 AT news...
> >
> > hmm, I just have solve my problem, but I don't like the way I did. Ok
I'll
> > start from the beggining.
> >     I start rhide with the fation - c:\code\djgpp\bin\rhide ASnake - in
> > order to start a project.
> >     The program opens and I started the work.
> >     In the button bar e select add twice and include the files
ASnake.cpp
> > and snake.h:
> > They are the fowling:
> > file://ASnake.cpp --
> > #include <iostream.h>
> > #include "snake.h" file://I know C++ is case sensitive
> >
> > void main()
> > {
> >    Snake *snake;
> >    snake=new Snake();
> >    snake->retMSG();
> > }
> >  file://snake.h --
> >
> > class Snake {
> >    public :
> >       Snake();
> >       void retMSG();
> > };
> > Snake::Snake()
> > {
> > }
> >
> > void Snake::retMSG()
> > {
> >    cout<<"Ey!! I'm just a lousy dummy Snake"<<endl;
> > }
> >
> > OK thats my program! Then in rhide I have a project with those 2 files
> > included in it, I trie to run with the ASnake.cpp selected in screen and
> it
> > gives-me that "Don't Know how to build snake.o from snake.h" error.
> > I don't think that is because a lack configuration, I pick some samples
> > programs and their Run.
> >     When I had an idea, I took snake.h off the project files list. I
click
> > run and the program really runned.
> >     That means allways I start a project and want to create a include
> file,
> > I'll have to include the *.h file into project, edit the file and then
> > exclude the file from project to run the program, or I'll have to
> configure
> > rhide to identify *.h has a include file to the compiler know how to
> handle
> > it?
> > I tought it was automatic in Borland C it is. By the way, tanks to all
> > replys, I really need your support.
> >
> >
> >
>
>


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019