dev-cpp-users Mailing List for Dev-C++ (Page 602)
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
You can subscribe to this list here.
| 2000 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(15) |
Oct
(115) |
Nov
(154) |
Dec
(258) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2001 |
Jan
(377) |
Feb
(260) |
Mar
(249) |
Apr
(188) |
May
(152) |
Jun
(150) |
Jul
(195) |
Aug
(202) |
Sep
(200) |
Oct
(286) |
Nov
(242) |
Dec
(165) |
| 2002 |
Jan
(245) |
Feb
(241) |
Mar
(239) |
Apr
(346) |
May
(406) |
Jun
(369) |
Jul
(418) |
Aug
(357) |
Sep
(362) |
Oct
(597) |
Nov
(455) |
Dec
(344) |
| 2003 |
Jan
(446) |
Feb
(397) |
Mar
(515) |
Apr
(524) |
May
(377) |
Jun
(387) |
Jul
(532) |
Aug
(364) |
Sep
(294) |
Oct
(352) |
Nov
(295) |
Dec
(327) |
| 2004 |
Jan
(416) |
Feb
(318) |
Mar
(324) |
Apr
(249) |
May
(259) |
Jun
(218) |
Jul
(212) |
Aug
(259) |
Sep
(158) |
Oct
(162) |
Nov
(214) |
Dec
(169) |
| 2005 |
Jan
(111) |
Feb
(165) |
Mar
(199) |
Apr
(147) |
May
(131) |
Jun
(163) |
Jul
(235) |
Aug
(136) |
Sep
(84) |
Oct
(88) |
Nov
(113) |
Dec
(100) |
| 2006 |
Jan
(85) |
Feb
(119) |
Mar
(33) |
Apr
(31) |
May
(56) |
Jun
(68) |
Jul
(18) |
Aug
(62) |
Sep
(33) |
Oct
(55) |
Nov
(19) |
Dec
(40) |
| 2007 |
Jan
(22) |
Feb
(49) |
Mar
(34) |
Apr
(51) |
May
(66) |
Jun
(43) |
Jul
(116) |
Aug
(57) |
Sep
(70) |
Oct
(69) |
Nov
(97) |
Dec
(86) |
| 2008 |
Jan
(32) |
Feb
(47) |
Mar
(106) |
Apr
(67) |
May
(28) |
Jun
(39) |
Jul
(31) |
Aug
(25) |
Sep
(18) |
Oct
(25) |
Nov
(5) |
Dec
(21) |
| 2009 |
Jan
(33) |
Feb
(27) |
Mar
(27) |
Apr
(22) |
May
(22) |
Jun
(10) |
Jul
(17) |
Aug
(9) |
Sep
(21) |
Oct
(13) |
Nov
(4) |
Dec
(11) |
| 2010 |
Jan
(10) |
Feb
(8) |
Mar
(4) |
Apr
(1) |
May
|
Jun
(2) |
Jul
|
Aug
(1) |
Sep
(8) |
Oct
(26) |
Nov
(9) |
Dec
(1) |
| 2011 |
Jan
(21) |
Feb
(16) |
Mar
(4) |
Apr
(19) |
May
(26) |
Jun
(9) |
Jul
(6) |
Aug
|
Sep
(4) |
Oct
(3) |
Nov
(2) |
Dec
(1) |
| 2012 |
Jan
(4) |
Feb
(7) |
Mar
(4) |
Apr
|
May
(1) |
Jun
(10) |
Jul
(1) |
Aug
(1) |
Sep
(18) |
Oct
(3) |
Nov
(1) |
Dec
(1) |
| 2013 |
Jan
(4) |
Feb
(2) |
Mar
(15) |
Apr
(6) |
May
(1) |
Jun
(3) |
Jul
(1) |
Aug
(2) |
Sep
(4) |
Oct
|
Nov
(9) |
Dec
|
| 2014 |
Jan
(4) |
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
(5) |
Aug
(4) |
Sep
|
Oct
(2) |
Nov
(1) |
Dec
(4) |
| 2015 |
Jan
(2) |
Feb
(3) |
Mar
(1) |
Apr
(2) |
May
(1) |
Jun
(2) |
Jul
|
Aug
(1) |
Sep
(2) |
Oct
(9) |
Nov
(35) |
Dec
(6) |
| 2016 |
Jan
(7) |
Feb
(10) |
Mar
(10) |
Apr
(9) |
May
(13) |
Jun
(9) |
Jul
(1) |
Aug
(3) |
Sep
(3) |
Oct
(1) |
Nov
(1) |
Dec
|
| 2017 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2018 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2019 |
Jan
(1) |
Feb
|
Mar
|
Apr
(2) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2020 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: Ioannis V. <no...@ho...> - 2002-04-11 09:20:04
|
> -----Original Message-----
> From: dev...@li...
> [mailto:dev...@li...] On Behalf
> Of rchavez
> Sent: Thursday, April 11, 2002 3:45 AM
> To: dev...@li...
> Cc: rchavez
> Subject: [Dev-C++] More: Reading file with getc(fp)
>
> 2. Is
>
> fopen("C:\Dev-C++\Dir1\Dir2\filename","r") a valid explict
> path syntax in
>
> Windows 2000 ? (assuming Dir1 & Dir2 already exist)
It should be \\ . But if i recall correctly MINGW follows the UNIX style
which is / .
>
> There must be a better book for re-learning C than "A Book on
> C" or K&R!
I did not understand the question but "The C Programming Language" 2nd
edition by Brian Kernighan - Dennis Ritchie is a great book.
Ioannis
* Ioannis Vranos
* Programming pages: http://www.noicys.cjb.net
* Alternative URL: http://run.to/noicys
|
|
From: Luigi S. <gi...@li...> - 2002-04-11 07:49:13
|
At 18:45 10/04/02 -0700, rchavez wrote:
>Hi,
>
>Thanks for the replies. I added a check for NULL file pointer and found
>that indeed it is NULL. That explains why the same code works in unix but
>not in Dev-C++. (In my defense I took the example directly from a book.)
>
>So 2 new questions:
>
>1. If the source file & the target file to be read are in the same
>directory I am using in Dev-C++, shouldn't
>
> fopen("filename","r") find the file? It doesn't seem to.
Uhm ... let me see if I understand the situation.
Say that I have a console application, named "cp.exe", which will duplicate
a file (the source code, "cp.c", is attached).
Now I have:
- the binary file in "c:\rch" (thus full path name of the file is
"c:\rch\cp.exe")
- the data file I wish to duplicate is "c:\rch\data.txt"
According to you, if I open a Dos box (I'm running Win98SE), switch my
current position such that the prompt says I'm in "c:\rch", and issue the
command:
cp data.txt a_copy.txt
I should expect some error to occur.
Well ... I did exactly what I described and no error occurred. :)
Now lets change situation.
I wish to run the console application "cp.exe" from within the Dev-C++ IDE
(i.e. I click the "run" button). It is possible, but I do not recommend it;
or better: I have only limited knowledge, so do not know hot to ensure that
Dev-C++ will run the application from the directory I want. IMHO, console
applications (by the way the sole kind of programs I am able to work out),
must be used from within a Dos console.
>2. Is
>
> fopen("C:\Dev-C++\Dir1\Dir2\filename","r") a valid explict path syntax in
>
>Windows 2000 ? (assuming Dir1 & Dir2 already exist)
I run Win98SE so can't say how things go on Win2000. However I think that
the path you have written, that is: "C:\Dev-C++\Dir1\Dir2\filename", is not
a valid one. Because of Dos using backslash ('\\') as directory separator,
your string appears as: "C:Dev-C++Dir1Dir2filename" (which is, highly
likely, a non existing file of the current directory on the unit "C"). The
right way to write your path is: "C:\\Dev-C++\\Dir1\\Dir2\\filename",
because this is the way to insert a backslash within a C string.
>There must be a better book for re-learning C than "A Book on C" or K&R!
This is something where I'm of little help, I've learned the few things I
know about C, from the well known K&R - 2nd edition. I remember the preface
telling that the book is not for beginners, but this should not be your
case since you are "re-learning".
>Regards,
>Rob.
--
Luigi
gi...@li... |
|
From: Lorenzo <co...@in...> - 2002-04-11 07:38:31
|
> How do you compile a DLL? is there any tutorials out there? Look the Colin Peter's tutorial at http://webclub.kcom.ne.jp/ma/colinp/win32/dll/index.html <no_begin_a_flame> please don't send the same question after a few hours!!! </no_begin_a_flame> ---------------------------------------------------------------------------- --- If debugging is the process of removing bugs, then programming must be the process of putting them in. ---------------------------------------------------------------------------- --- |
|
From: rchavez <rc...@so...> - 2002-04-11 01:45:28
|
Hi,
Thanks for the replies. I added a check for NULL file pointer and found
that indeed it is NULL. That explains why the same code works in unix but
not in Dev-C++. (In my defense I took the example directly from a book.)
So 2 new questions:
1. If the source file & the target file to be read are in the same
directory I am using in Dev-C++, shouldn't
fopen("filename","r") find the file? It doesn't seem to.
2. Is
fopen("C:\Dev-C++\Dir1\Dir2\filename","r") a valid explict path syntax in
Windows 2000 ? (assuming Dir1 & Dir2 already exist)
There must be a better book for re-learning C than "A Book on C" or K&R!
Regards,
Rob.
|
|
From: <Roc...@ao...> - 2002-04-11 00:39:17
|
How do you compile a DLL? is there any tutorials out there? Thank you so much! Kevin Martin:) I am trying to make DLL's for the Orbiter Space Simulator. |
|
From: Bob W. <bo...@ph...> - 2002-04-11 00:21:40
|
Todd, See my posting at = http://sourceforge.net/forum/forum.php?forum_id=3D48211 I submitted a bug report to the gcc folks and they said the problem was = with either the mingw or Bloodshed folks.=20 ----- Original Message -----=20 From: "todd smith" <tod...@ya...> To: <dev...@li...> Sent: Wednesday, April 10, 2002 4:09 PM Subject: [Dev-C++] runtime errors > i posted a message to the forums yesterday about > runtime errors i was getting when i would execute a > compiled project. i kept getting memory access > violations and every so often Dev-C++ would crash.=20 >=20 > it seems to be the projects i had troubles with were > located deep in the file system, so i created some > bogus projects to see if the problem was related to > the pathname. it seems that when the folder name is > verylarge or the path to the project is long Dev has a > problem running the project. >=20 > BTW, when it crashed it says that it is generating an > error message. where does the message get written to? >=20 > -todd >=20 >=20 >=20 > =3D=3D=3D=3D=3D > Todd Smith > email: tod...@ya... > AIM: dtw SickBoy > phone: 802-587-1680 >=20 > __________________________________________________ > Do You Yahoo!? > Yahoo! Tax Center - online filing with TurboTax > http://taxes.yahoo.com/ >=20 > _______________________________________________ > Dev-cpp-users mailing list > Dev...@li... > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users >=20 |
|
From: christiaan s. <ck...@ia...> - 2002-04-10 23:06:18
|
i figured out to go to file>new project> dll to make a dll. it compiles = but i dont knwo how to use it. Also the linker says Warning: no export definition file provided dllwrap will create one, but may not be what you want how do i add a export definition file? |
|
From: <Roc...@ao...> - 2002-04-10 21:23:07
|
Hello im new to the Group! Hi my name is Kevin Martin. I work on a computer game called Orbiter. I know how to make the files already but how do i convert or make the into DLL file? thanks! Kevin Martin |
|
From: todd s. <tod...@ya...> - 2002-04-10 21:13:18
|
sorry, i forgot to mention that i'm running version 4.9.1.0 also, how does one get auto-indent to work? i've turned it on in the editor options but it doesnt seem to work. -todd ===== Todd Smith email: tod...@ya... AIM: dtw SickBoy phone: 802-587-1680 __________________________________________________ Do You Yahoo!? Yahoo! Tax Center - online filing with TurboTax http://taxes.yahoo.com/ |
|
From: todd s. <tod...@ya...> - 2002-04-10 21:09:12
|
i posted a message to the forums yesterday about runtime errors i was getting when i would execute a compiled project. i kept getting memory access violations and every so often Dev-C++ would crash. it seems to be the projects i had troubles with were located deep in the file system, so i created some bogus projects to see if the problem was related to the pathname. it seems that when the folder name is verylarge or the path to the project is long Dev has a problem running the project. BTW, when it crashed it says that it is generating an error message. where does the message get written to? -todd ===== Todd Smith email: tod...@ya... AIM: dtw SickBoy phone: 802-587-1680 __________________________________________________ Do You Yahoo!? Yahoo! Tax Center - online filing with TurboTax http://taxes.yahoo.com/ |
|
From: Luigi S. <gi...@li...> - 2002-04-10 20:54:37
|
At 18:47 09/04/02 -0700, rchavez wrote:
>Hi,
>
>I am trying to read a text file in a C program. This code runs fine on the
>unix C environments I can access but gives a fatal error that removes the
>console window in Dev-C++ environment.
I have attempted to run you code and the same thing happened to me, I think
the reason is: when the file named "word.h" does not exist, fp is assigned
a NULL value, so your code attempts to read something using a NULL pointer,
as a result, a run time error occurs.
>There are no warnings at compile time.
I shall not agree, in fact I tried to compile your code (using Dev-C++ 4.0
with MinGW 2.95) after setting these additional options:
-Wall -Wnested-externs -Wredundant-decls
Here is what I get in the "Compiler" panel:
4 c:\mail\rob\orig.c warning: return-type defaults to `int'
7 c:\mail\rob\orig.c warning: nested extern declaration of `fopen'
7 c:\mail\rob\orig.c warning: redundant redeclaration of `fopen' in same scope
179 c:\progra~2\dev-c_~1\include\stdio.h warning: previous declaration of
`fopen'
13 c:\mail\rob\orig.c warning: implicit declaration of function `system'
C:\mail\rob\orig.c compiled successfully
As you can see these are only warnings, so code is generated at your own
risk! :)
Anyway, at compile time one can't catch run time errors.
> It is definitely the getc() that causes the trouble because the program
>works in Dev-C++ when I use getch() and take input from standard input.
I do not know what the function "getch()" does, one thing I'm sure of, is
that it is not ANSI C 89.
> Four questions:
>
>1. How do I make it work with Dev-C++ ?
Try the code I wrote below, it works on my machine (Win98SE, Dev-C++ 4.0,
MinGW 2.95).
Note, if you are using my same version of Dev-C++, make sure that:
"Options"->"Compiler Options"->"Linker"->"compile for Win32 (no console)"
is unset, otherwise you will see nothing displayed on the screen.
>2. There was lots of talk on getch() and getchar() in the archives but
>nothing on getc(). Is getc() no longer ANSI C ?
Don't know what ANSI C99 says, however, since "getc" is in C89, I suppose
it is still supported
>3. getch() swallows the cntrl-Z so I can't properly terminate using std
>input. How do I overcome this when I want to use getch()?
As I said above, getch() is not a standard function.
>4. Why is EOF cntrl-Z instead of cntrl-D in Dev-C?
This is not related to Dev, it has to do with the differences between Dos
and Unix.
Since Dos came after Unix, I see no reason why to assume different
conventions (another one I don't understand is the backslash and the slash
issue).
>Your help will be greatly appreciated
hope it solves the problem
>and you people are wonderful to give so much help to the clueless like me
>on this list!
>Rob.
>
>----------------- my code --------------------------
>
>#include <stdio.h>
>
>main()
>{
>
>int c;
>FILE *fopen(), *fp;
>
>fp = fopen("words.h","r");
>while ( (c = getc(fp)) != EOF )
> printf("\ngot a char %c",c);
>
> system("PAUSE"); /** added this for Dev-C++ **/
> return 0;
>}
You need to add no special line of code if you run console applications
from the ... console! :)
Also remember that using function "PAUSE" makes program not portable to
Unix (where there is no command named "PAUSE").
/* file test.c */
#include <stdio.h>
#include <errno.h>
#define FILENAME "words.h" /* name of file to be read */
int
main()
{
FILE* fp = fopen(FILENAME,"r"); /* the file */
if (fp == NULL) /* unable to open file */
perror(FILENAME); /* notify user */
else /* ok, file is open */
{
int c; /* the character read from the file */
while ((c = getc(fp)) != EOF) /* found a character */
printf("\ngot a char %c", c); /* display the character */
}
return 0;
}
--
Luigi
gi...@li...
|
|
From: <ab...@gm...> - 2002-04-10 20:33:51
|
hi there I'm new in windows-programing. and I want that my EditText-Control in a Dialog Box writes instead of = the letters from the keyboard just astrerisk for a password i.e.=20 so how could I realize that? thanks to all |
|
From: Ricardo R. <ri...@po...> - 2002-04-10 18:37:35
|
another solution if it can be of help:
#include <stdio.h>
#include <stdlib.h>
#include <iostream.h>
extern "C"
{
int CeFunction()
{
printf("In C mode.\n");
return 0;
};
}
int main()
{
cout << "In C++ mode.\n";
CeFunction();
cout << "Back in C++ mode.\n";
system("PAUSE");
return 0;
}
|
|
From: <ech...@ne...> - 2002-04-10 15:44:49
|
"Robert Landle" <rl...@gd...> wrote: > >Hi, >I tried this and it didn't seem to make a difference. It's weird >because the linker is finding the library >it just doesn't know how to process the opengl commands found in my >library. Even though I am including >the opengl libraries in my main program! > >I've found some information on libtool on the web, but it didn't come >with the mingW32 compiler stuff. >Anyone have an idea where I can go to get a copy that will run with my >version of Dev-C++ (4.01)? >Thanks again, >Bobby > I haven't used libtool, but mabey you could try compiling your lib as a dll, using dev-c++ (new Project -> dll)? I an't think of a reason why it would make a difference, but who knows, it might work? Evan >-----Original Message----- >From: dev...@li... >[mailto:dev...@li...] On Behalf Of Evan >Hempel <ech...@ne...> >Sent: Monday, April 08, 2002 5:09 PM >To: "Dev-C++" >Cc: "Robert Landle" >Subject: RE: [Dev-C++] Problem linking in library > > >> Hello, >> I am very new to Dev-C++ so excuse my ignorance. I've been blindly >> using the big money C++ compiler, but now I'm better. >> Here is my deal. >> >> I have a gui development library that utilizes opengl and glut that >I >> want to link into my appication. >> Here are the steps I took. >> >> 1. Compiled the library >> 2. Developed an archive file from the object files using the >command >> line gcc archive command (ar -ru lib.a *.o). >> 3. Created a new project that links in -lopengl32 -lglu32 -lglut32 >and >> lib.a. (I put this in Further object files section of the project >> options window). > >I believe that libraries for gcc are suposed to be named lib<name>.a ie >libgl.a, libc.a, ... and then are linked by -l<name> -lgl -lc ... So >you might want to try naming the file libsomething.a Changing this >might be resolve the error. > > >Evan > >> 4. Attempted to compile my application >> >> When Dev-C++ attempts to link in the library it gives me an >"undefined >> reference to `opengl function' error. >> It's almost as if it doesn't know where to find the opengl functions >> that I included. >> >> If I put the whole library source code into my project I can >compile, >> link, and run the project without a hitch. >> >> Any clues as to what I'm doing wrong? >> >> Thanks for you help. >> Bobby > > >__________________________________________________________________ >Your favorite stores, helpful shopping tools and great gift ideas. >Experience the convenience of buying online with Shop@Netscape! >http://shopnow.netscape.com/ > >Get your own FREE, personal Netscape Mail account today at >http://webmail.netscape.com/ > > >_______________________________________________ >Dev-cpp-users mailing list >Dev...@li... >https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > >Sponsored by http://www.ThinkGeek.com/ > > > __________________________________________________________________ Your favorite stores, helpful shopping tools and great gift ideas. Experience the convenience of buying online with Shop@Netscape! http://shopnow.netscape.com/ Get your own FREE, personal Netscape Mail account today at http://webmail.netscape.com/ |
|
From: Kenneth A. <dig...@ho...> - 2002-04-10 15:41:26
|
thanx David. that did it.
>From: David McKen <ci...@ya...>
>Reply-To: ci...@ya...
>To: dev...@so...
>Subject: Re: [Dev-C++] newbie problem
>Date: Tue, 9 Apr 2002 22:41:46 -0700 (PDT)
>
>I got it to work by moving the declaration above the implementation
>
>all you have to do is move
> > extern "C"
> > {
> > int CeFunction();
> > }
>to just above
> > int CeFunction()
> > {
> > printf("In C mode.\n");
> > return 0;
> > }
>
>--- Kenneth Armstrong <dig...@ho...> wrote:
> > i tried to make a program that uses both c and c++ commands. well,
> > i'm new
> > to this so it didn't work. the error that i got was "call of
> > overloaded
> > 'CeFunction()' is ambiguous". here's my code:
> >
> > #include <stdio.h>
> > #include <iostream.h>
> >
> > int CeFunction()
> > {
> > printf("In C mode.\n");
> > return 0;
> > }
> >
> > extern "C"
> > {
> > int CeFunction();
> > }
> >
> > int main()
> > {
> > cout << "In C++ mode.\n";
> > CeFunction();
> > cout << "Back in C++ mode.\n";
> > return 0;
> > }
> >
> > if someone could explain what i did wrong here i would be very
> > thankful. go
> > easy on me please, i'm a newb. :)
> >
> >
> >
> > _________________________________________________________________
> > Join the worlds largest e-mail service with MSN Hotmail.
> > http://www.hotmail.com
> >
> >
> > _______________________________________________
> > Dev-cpp-users mailing list
> > Dev...@li...
> > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
>
>
>__________________________________________________
>Do You Yahoo!?
>Yahoo! Tax Center - online filing with TurboTax
>http://taxes.yahoo.com/
>
>_______________________________________________
>Dev-cpp-users mailing list
>Dev...@li...
>https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
_________________________________________________________________
Send and receive Hotmail on your mobile device: http://mobile.msn.com
|
|
From: Daniel G. <sp...@ho...> - 2002-04-10 14:13:51
|
THANKS!!! Great explanation, very clear! I have the idea now! Thanks again, Daniel >From: Luigi Santillo <gi...@li...> >To: dev...@so... >Subject: Re: [Dev-C++] A basic q... >Date: Wed, 10 Apr 2002 07:57:04 +0200 > >Hello Daniel, > >A makefile is a set of instructions (a program if you wish) that will be >interpreted by a program generally known as "make". > >"make" is a general tool, not strictly related to programming languages, >but undoubtedly one is likely to run into it when dealing with "compiled" >programming languages. > >Here is what I mean. > >Consider the classic "BASIC" programming language (hope you know a little >about it), a program written with such language is a set of instructions >which a BASIC interpreter reads and executes, one at a time, each time you >run the program. There is no executable file and to run a program you >always need: the source code and the interpreter. Also, if a program has >syntax errors, you will find out about them, only when the interpreter >executes the offending line of code; in fact only at that time it will >realize that the instruction is wrong. > >Consider instead a C (or C++) program (I mean here what is known as a >statically linked program, that is, one which does not use any DLL). You >write the source code, a compiler will then translate it into an object >file which a linker will use to make an executable file. Thus the program >is translated into machine code only once (and not each time you execute >the program), also to execute the program, you only need the executable >file (often called the binary file) and nothing else (this of course is not >true of dynamically linked programs, which also require the right DLLs). >Since to run a program, you must have compiled already *all* the >instructions, if there are syntax errors, you will find out about them, at >compile time, no instruction will be executed if there are syntax errors. > >Now here is the reason why one uses "make" with compiled programming >languages: >say that one writes some source code and then compiles it, making the >corresponding executable file, now suppose that he makes some changes to >the source code, what happens is that the executable file no longer >corresponds to the source. This never happens with interpreted languages, >because, as I said, there is no executable file for those languages. > >The classic way (don't know how many still use it) to keep a binary up to >date is to use "make". Roughly, What "make" does is the following: >- read the time stamp of the binary file >- read the time of the corresponding source file >- if the source happens to be "younger" that the binary, this latter is >out-of-date > >When the binary is out of date, the actions needed to update it will be >performed, by "make". > >Things are a bit more complicated when a program is made of code spread >across different source files, but the basic idea is the same. > >At this point you could ask: >- How does "make" know which source file is the one used to compile some >binary file? >- How does it know which are the actions to update a binary file? > >Well, you put these informations in a text file, named "makefile", >arranging them in some special way (just the syntax understood by "make"). > >The above is, I hope, the frame of the picture: if you wish to fill it with >details, you could start by reading the manual of the GNU "make" (I've >found it on the Dev-C++ resource site). > >At 14:13 09/04/02 +0100, Daniel Glenfield wrote: >>I have gaps in my knowledge lol. >>What's a MAKE file, and what does it do? > > > > >-- >Luigi >gi...@li... > > >_______________________________________________ >Dev-cpp-users mailing list >Dev...@li... >https://lists.sourceforge.net/lists/listinfo/dev-cpp-users _________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp. |
|
From: Luigi S. <gi...@li...> - 2002-04-10 12:55:03
|
Hello Daniel, A makefile is a set of instructions (a program if you wish) that will be interpreted by a program generally known as "make". "make" is a general tool, not strictly related to programming languages, but undoubtedly one is likely to run into it when dealing with "compiled" programming languages. Here is what I mean. Consider the classic "BASIC" programming language (hope you know a little about it), a program written with such language is a set of instructions which a BASIC interpreter reads and executes, one at a time, each time you run the program. There is no executable file and to run a program you always need: the source code and the interpreter. Also, if a program has syntax errors, you will find out about them, only when the interpreter executes the offending line of code; in fact only at that time it will realize that the instruction is wrong. Consider instead a C (or C++) program (I mean here what is known as a statically linked program, that is, one which does not use any DLL). You write the source code, a compiler will then translate it into an object file which a linker will use to make an executable file. Thus the program is translated into machine code only once (and not each time you execute the program), also to execute the program, you only need the executable file (often called the binary file) and nothing else (this of course is not true of dynamically linked programs, which also require the right DLLs). Since to run a program, you must have compiled already *all* the instructions, if there are syntax errors, you will find out about them, at compile time, no instruction will be executed if there are syntax errors. Now here is the reason why one uses "make" with compiled programming languages: say that one writes some source code and then compiles it, making the corresponding executable file, now suppose that he makes some changes to the source code, what happens is that the executable file no longer corresponds to the source. This never happens with interpreted languages, because, as I said, there is no executable file for those languages. The classic way (don't know how many still use it) to keep a binary up to date is to use "make". Roughly, What "make" does is the following: - read the time stamp of the binary file - read the time of the corresponding source file - if the source happens to be "younger" that the binary, this latter is out-of-date When the binary is out of date, the actions needed to update it will be performed, by "make". Things are a bit more complicated when a program is made of code spread across different source files, but the basic idea is the same. At this point you could ask: - How does "make" know which source file is the one used to compile some binary file? - How does it know which are the actions to update a binary file? Well, you put these informations in a text file, named "makefile", arranging them in some special way (just the syntax understood by "make"). The above is, I hope, the frame of the picture: if you wish to fill it with details, you could start by reading the manual of the GNU "make" (I've found it on the Dev-C++ resource site). At 14:13 09/04/02 +0100, Daniel Glenfield wrote: >I have gaps in my knowledge lol. >What's a MAKE file, and what does it do? -- Luigi gi...@li... |
|
From: Ioannis V. <no...@ho...> - 2002-04-10 11:57:36
|
-----Original Message----- From: dev...@li... [mailto:dev...@li...] On Behalf Of Bob Wilson Sent: Tuesday, April 09, 2002 5:16 PM To: Dev-C++ User Mailing List Subject: [Dev-C++] Bloodshed programming environment Earlier, Ioannis Varnos and I had exchanged emails about a problem I experienced with the Bloodshed programming environment, and she had recommended Ehm, he not she. :) Ioannis * Ioannis Vranos * Programming pages: http://www.noicys.cjb.net <http://www.noicys.cjb.net/> * Alternative URL: http://run.to/noicys |
|
From: Ioannis V. <no...@ho...> - 2002-04-10 11:46:28
|
> -----Original Message----- > From: dev...@li... > [mailto:dev...@li...] On Behalf > Of Kenneth Armstrong > Sent: Wednesday, April 10, 2002 5:35 AM > To: dev...@so... > Subject: [Dev-C++] newbie problem > > > i tried to make a program that uses both c and c++ commands. > well, i'm new > to this so it didn't work. the error that i got was "call of > overloaded > 'CeFunction()' is ambiguous". here's my code: extern "C" is used for functions defined in a .c file, that is to interoperate with C stuff e.g. a C library. In your case extern "C" is not needed since you programmed in C++ (even in C-style C++). Ioannis * Ioannis Vranos * Programming pages: http://www.noicys.cjb.net * Alternative URL: http://run.to/noicys |
|
From: <igo...@po...> - 2002-04-10 07:37:45
|
Hi,
For reading files try using fgetc instead of getc
and your program should work OK.
Regards
Igor Pierscinski
-----Original Message-----
From: rchavez [mailto:rc...@so...]
Sent: Wednesday, April 10, 2002 3:48 AM
To: dev...@li...
Cc: rc...@so...
Subject: [Dev-C++] Reading file with getc(fp)
Hi,
I am trying to read a text file in a C program. This code runs fine on the
unix C environments I can access but gives a fatal error that removes the
console window in Dev-C++ environment. There are no warnings at compile
time. It is definitely the getc() that causes the trouble because the
program
works in Dev-C++ when I use getch() and take input from standard input.
Four questions:
1. How do I make it work with Dev-C++ ?
2. There was lots of talk on getch() and getchar() in the archives but
nothing on getc(). Is getc() no longer ANSI C ?
3. getch() swallows the cntrl-Z so I can't properly terminate using std
input. How do I overcome this when I want to use getch()?
4. Why is EOF cntrl-Z instead of cntrl-D in Dev-C?
Your help will be greatly appreciated and you people are wonderful to give
so much help to the clueless like me on this list!
Rob.
----------------- my code --------------------------
#include <stdio.h>
main()
{
int c;
FILE *fopen(), *fp;
fp = fopen("words.h","r");
while ( (c = getc(fp)) != EOF )
printf("\ngot a char %c",c);
system("PAUSE"); /** added this for Dev-C++ **/
return 0;
}
_______________________________________________
Dev-cpp-users mailing list
Dev...@li...
https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
|
|
From: David M. <ci...@ya...> - 2002-04-10 05:41:47
|
I got it to work by moving the declaration above the implementation
all you have to do is move
> extern "C"
> {
> int CeFunction();
> }
to just above
> int CeFunction()
> {
> printf("In C mode.\n");
> return 0;
> }
--- Kenneth Armstrong <dig...@ho...> wrote:
> i tried to make a program that uses both c and c++ commands. well,
> i'm new
> to this so it didn't work. the error that i got was "call of
> overloaded
> 'CeFunction()' is ambiguous". here's my code:
>
> #include <stdio.h>
> #include <iostream.h>
>
> int CeFunction()
> {
> printf("In C mode.\n");
> return 0;
> }
>
> extern "C"
> {
> int CeFunction();
> }
>
> int main()
> {
> cout << "In C++ mode.\n";
> CeFunction();
> cout << "Back in C++ mode.\n";
> return 0;
> }
>
> if someone could explain what i did wrong here i would be very
> thankful. go
> easy on me please, i'm a newb. :)
>
>
>
> _________________________________________________________________
> Join the worlds largest e-mail service with MSN Hotmail.
> http://www.hotmail.com
>
>
> _______________________________________________
> Dev-cpp-users mailing list
> Dev...@li...
> https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
__________________________________________________
Do You Yahoo!?
Yahoo! Tax Center - online filing with TurboTax
http://taxes.yahoo.com/
|
|
From: Kenneth A. <dig...@ho...> - 2002-04-10 03:35:28
|
i tried to make a program that uses both c and c++ commands. well, i'm new
to this so it didn't work. the error that i got was "call of overloaded
'CeFunction()' is ambiguous". here's my code:
#include <stdio.h>
#include <iostream.h>
int CeFunction()
{
printf("In C mode.\n");
return 0;
}
extern "C"
{
int CeFunction();
}
int main()
{
cout << "In C++ mode.\n";
CeFunction();
cout << "Back in C++ mode.\n";
return 0;
}
if someone could explain what i did wrong here i would be very thankful. go
easy on me please, i'm a newb. :)
_________________________________________________________________
Join the worlds largest e-mail service with MSN Hotmail.
http://www.hotmail.com
|
|
From: rchavez <rc...@so...> - 2002-04-10 01:48:12
|
Hi,
I am trying to read a text file in a C program. This code runs fine on the
unix C environments I can access but gives a fatal error that removes the
console window in Dev-C++ environment. There are no warnings at compile
time. It is definitely the getc() that causes the trouble because the program
works in Dev-C++ when I use getch() and take input from standard input.
Four questions:
1. How do I make it work with Dev-C++ ?
2. There was lots of talk on getch() and getchar() in the archives but
nothing on getc(). Is getc() no longer ANSI C ?
3. getch() swallows the cntrl-Z so I can't properly terminate using std
input. How do I overcome this when I want to use getch()?
4. Why is EOF cntrl-Z instead of cntrl-D in Dev-C?
Your help will be greatly appreciated and you people are wonderful to give
so much help to the clueless like me on this list!
Rob.
----------------- my code --------------------------
#include <stdio.h>
main()
{
int c;
FILE *fopen(), *fp;
fp = fopen("words.h","r");
while ( (c = getc(fp)) != EOF )
printf("\ngot a char %c",c);
system("PAUSE"); /** added this for Dev-C++ **/
return 0;
}
|
|
From: http//:angelfire.com/dc/85 Sale's <bc...@ms...> - 2002-04-09 22:02:27
|
http://advertising.IsAmazing.com Make money by doing nothing or advertise for very cheap. Get a domain name for only $20,just like me. _________________________________________________________________ MSN Photos is the easiest way to share and print your photos: http://photos.msn.com/support/worldwide.aspx |
|
From: Bob W. <bo...@ph...> - 2002-04-09 18:20:40
|
MessageIoannis, I think the bullet-proof code is a thing that must be taught after the = basics. Yes, I know that you believe that, and, while I agree that any in-depth = study of bullet proofing should wait until the student knows the = constructs of the language, bullet proofing should not be ignored as the = student learns the basics of the language.=20 Regards, Bob |