dev-cpp-users Mailing List for Dev-C++ (Page 227)
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: <gl...@gr...> - 2004-04-20 18:49:45
|
I didn't get it, what you exactly want to do? write an entire OS? |
|
From: <gl...@gr...> - 2004-04-20 18:48:56
|
I had the same problem, and it was becouse of the language, i changed the language and it worked fine... |
|
From: Axel B. <new...@th...> - 2004-04-20 18:10:13
|
Hi Folks, I'm new to the list because I couldn't find a solution to this little problem. I am trying to use the sleepycat berkeley db 4.2, compiled under visual studio 6, with dev-c++. but this won't work - when linking I always get the following error: [Linker error] undefined reference to `Db::Db(DbEnv*, unsigned)' this bugs me. I tried to include the .lib-file by -l switch, directly, I set the include/library paths, I tried to include the .a file, etc. nothing works. AND I checked with nm that the lib indeed HAS the functions included - the cxx_*.obj-files are present in the lib. so - I'm clueless :-/ can anyone please help me, its kind of important ... :-) thanks in advance & greetings, axel. |
|
From: <or...@vp...> - 2004-04-20 17:04:20
|
Lior Wehrli wrote: > Hi, >=20 > Since I updated to 4.9.8.7, the "Compiler" tab of the Project options m= enu > has an entry "<ERR: 735>" in the C Compiler section, two entries "<ERR: > 3401>" and "<ERR: 3402>" in the Code Generation section and an entry "<= ERR: > 3400>" in the Linker section. > I guess that is a bug. Don't forget to update the language files, as those types of errors=20 appear because of the use of older language files. -- Greetings, Bal=E1zs |
|
From: Paul I. <pi...@ot...> - 2004-04-20 14:06:37
|
Citerar Per Westermark <pw...@ia...>: > Actually, depending on OS the array is _sometimes_ passed by the comman= d > shell but for a lot of OS, the application just receives a text line a= nd > must itself split it into arguments. You mean parsed by the command shell, not passed. (well anyhow it is then= =20 passed)... /Paul |
|
From: Per W. <pw...@ia...> - 2004-04-20 12:35:50
|
Actually, depending on OS the array is _sometimes_ passed by the command
shell but for a lot of OS, the application just receives a text line and
must itself split it into arguments.
Also, processing of wildcard characters on the command line is performed
at different locations depending on OS.
/Per W
On Tue, 20 Apr 2004, Matthew Ozor wrote:
> I think programming an OS even for fun you should
> learn the basics of computer programming first.
> Passing arguemtns is very elementary. In your main you
> have two variables one that holds numbers of arguments
> and the other an pointer to and array. That array is
> actually passed to the program by the OS. Most people
> use:
>
> int main(int argc, char *argv[])
> argc =3D number of arguments
> argv =3D the array of arguments
>
> Try this:
>
> #include <stdio.h>
>
> int main(int argc, char *argv[])
> {
> int i;
> fprintf(stdout,
> "The number of command line arguments is
> %d\n",
> argc);
> fprintf(stdout,"The program name is
> %s\n",argv[0]);
>
> for (i =3D 1; i < argc; i++)
> {
> fprintf(stdout,"%s",argv[i]);
> }
> fprintf(stdout,"\n");
> return 0;
> }
>
>
> If you do a search on OS programming your going to
> find a ton of sites that will teach you the basics
> step by step.
>
> http://directory.google.com/Top/Computers/Programming/Operating_Systems/
>
> Good luck
> Matthew Ozor
> --- Per Westermark <pw...@ia...> wrote:
> > Note that if you make your completely own OS, you
> > might use any method you
> > like, since you have to implement it yourself.
> >
> > Alternative 2 - using msdos.sys + io.sys and just
> > replacing the command
> > line. One again, you might use any method you like,
> > since msdos will only
> > specially handle the first two arguments meaning
> > that the command.com
> > replacement must contain full commandl line parsing.
> >
> > Alternative 3 - you are still going to use
> > command.com. Then - I haven't
> > an old MSDOS available so I can't test - I assume
> > you have to run your
> > commands as dir.exe, md.exe etc, since command.com
> > will otherwise process
> > the built-in commands dir/echo/... as reserved words
> > and process by itself
> > without looking for any external program with the
> > same name in the
> > program path. Anyway, if you manage to start your
> > own external programs,
> > the command line parameters will be available
> > exactly as if you write a
> > normal dos or win32 command line program.
> >
> > /Per W
> >
> > On Tue, 20 Apr 2004, Rick Langschultz wrote:
> >
> > > I am writing an operating system called StarFire
> > it will be based off of
> > > dos, however the programs included with
> > command.com (dir, echo, etc. ) will
> > > be external commands in the C:\bin folder. What
> > functions can I use to
> > > detect arguments passed from the shell to a
> > program.
> > >
> > > Example: [dir.exe -a C:\bin] or [dir.exe
> > -hsx C:\bin]
> > >
> > > dir is the standard dos dir statement however i
> > want the arguments to be:
> > > -a all files
> > > -h hidden files
> > > -s system files
> > > -x compressed files
> > > -u user files
> > > -t text files
> > >
> > > or any combination of those with only one dash.
> > Is this possible?
> > >
> > >
> > >
> > >
> >
> -------------------------------------------------------
> > > This SF.Net email is sponsored by: IBM Linux
> > Tutorials
> > > Free Linux tutorial presented by Daniel Robbins,
> > President and CEO of
> > > GenToo technologies. Learn everything from
> > fundamentals to system
> > >
> >
> administration.http://ads.osdn.com/?ad_id=3D1470&alloc_id=3D3638&op=3Dcli=
ck
> > > _______________________________________________
> > > Dev-cpp-users mailing list
> > > Dev...@li...
> > > TO UNSUBSCRIBE:
> > http://www23.brinkster.com/noicys/devcpp/ub.htm
> > >
> >
> https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
> > >
> >
> >
> >
> >
> -------------------------------------------------------
> > This SF.Net email is sponsored by: IBM Linux
> > Tutorials
> > Free Linux tutorial presented by Daniel Robbins,
> > President and CEO of
> > GenToo technologies. Learn everything from
> > fundamentals to system
> >
> administration.http://ads.osdn.com/?ad_id=3D1470&alloc_id=3D3638&op=3Dcli=
ck
> > _______________________________________________
> > Dev-cpp-users mailing list
> > Dev...@li...
> > TO UNSUBSCRIBE:
> > http://www23.brinkster.com/noicys/devcpp/ub.htm
> >
> https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
>
>
>
>
>
> __________________________________
> Do you Yahoo!?
> Yahoo! Photos: High-quality 4x6 digital prints for 25=A2
> http://photos.yahoo.com/ph/print_splash
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by: IBM Linux Tutorials
> Free Linux tutorial presented by Daniel Robbins, President and CEO of
> GenToo technologies. Learn everything from fundamentals to system
> administration.http://ads.osdn.com/?ad_id=3D1470&alloc_id=3D3638&op=3Dcli=
ck
> _______________________________________________
> Dev-cpp-users mailing list
> Dev...@li...
> TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm
> https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
>
|
|
From: Matthew O. <mt...@ya...> - 2004-04-20 12:13:09
|
I think programming an OS even for fun you should
learn the basics of computer programming first.
Passing arguemtns is very elementary. In your main you
have two variables one that holds numbers of arguments
and the other an pointer to and array. That array is
actually passed to the program by the OS. Most people
use:
int main(int argc, char *argv[])
argc = number of arguments
argv = the array of arguments
Try this:
#include <stdio.h>
int main(int argc, char *argv[])
{
int i;
fprintf(stdout,
"The number of command line arguments is
%d\n",
argc);
fprintf(stdout,"The program name is
%s\n",argv[0]);
for (i = 1; i < argc; i++)
{
fprintf(stdout,"%s",argv[i]);
}
fprintf(stdout,"\n");
return 0;
}
If you do a search on OS programming your going to
find a ton of sites that will teach you the basics
step by step.
http://directory.google.com/Top/Computers/Programming/Operating_Systems/
Good luck
Matthew Ozor
--- Per Westermark <pw...@ia...> wrote:
> Note that if you make your completely own OS, you
> might use any method you
> like, since you have to implement it yourself.
>
> Alternative 2 - using msdos.sys + io.sys and just
> replacing the command
> line. One again, you might use any method you like,
> since msdos will only
> specially handle the first two arguments meaning
> that the command.com
> replacement must contain full commandl line parsing.
>
> Alternative 3 - you are still going to use
> command.com. Then - I haven't
> an old MSDOS available so I can't test - I assume
> you have to run your
> commands as dir.exe, md.exe etc, since command.com
> will otherwise process
> the built-in commands dir/echo/... as reserved words
> and process by itself
> without looking for any external program with the
> same name in the
> program path. Anyway, if you manage to start your
> own external programs,
> the command line parameters will be available
> exactly as if you write a
> normal dos or win32 command line program.
>
> /Per W
>
> On Tue, 20 Apr 2004, Rick Langschultz wrote:
>
> > I am writing an operating system called StarFire
> it will be based off of
> > dos, however the programs included with
> command.com (dir, echo, etc. ) will
> > be external commands in the C:\bin folder. What
> functions can I use to
> > detect arguments passed from the shell to a
> program.
> >
> > Example: [dir.exe -a C:\bin] or [dir.exe
> -hsx C:\bin]
> >
> > dir is the standard dos dir statement however i
> want the arguments to be:
> > -a all files
> > -h hidden files
> > -s system files
> > -x compressed files
> > -u user files
> > -t text files
> >
> > or any combination of those with only one dash.
> Is this possible?
> >
> >
> >
> >
>
-------------------------------------------------------
> > This SF.Net email is sponsored by: IBM Linux
> Tutorials
> > Free Linux tutorial presented by Daniel Robbins,
> President and CEO of
> > GenToo technologies. Learn everything from
> fundamentals to system
> >
>
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
> > _______________________________________________
> > Dev-cpp-users mailing list
> > Dev...@li...
> > TO UNSUBSCRIBE:
> http://www23.brinkster.com/noicys/devcpp/ub.htm
> >
>
https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
> >
>
>
>
>
-------------------------------------------------------
> This SF.Net email is sponsored by: IBM Linux
> Tutorials
> Free Linux tutorial presented by Daniel Robbins,
> President and CEO of
> GenToo technologies. Learn everything from
> fundamentals to system
>
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
> _______________________________________________
> Dev-cpp-users mailing list
> Dev...@li...
> TO UNSUBSCRIBE:
> http://www23.brinkster.com/noicys/devcpp/ub.htm
>
https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
__________________________________
Do you Yahoo!?
Yahoo! Photos: High-quality 4x6 digital prints for 25¢
http://photos.yahoo.com/ph/print_splash
|
|
From: Koval V. <vk...@in...> - 2004-04-20 10:23:06
|
On Tue, 20 Apr 2004 02:46:30 -0700 (PDT) Siva Chandra <siv...@ya...> wrote: > > Hello all, > > Don't know if this is the right place to post... > How do I program the parallel port in C/C++ using > Dev-C++? > I am looking at WinMe/2000/NT/XP as my target > platforms. > > Any pointers and suggestions are welcome... see project avrdude: http://savannah.nongnu.org/download/avrdude/ avrdude - programmer, that work through serial and parallel ports with some hardware. |
|
From: Siva C. <siv...@ya...> - 2004-04-20 09:46:36
|
Hello all, Don't know if this is the right place to post... How do I program the parallel port in C/C++ using Dev-C++? I am looking at WinMe/2000/NT/XP as my target platforms. Any pointers and suggestions are welcome... TIA Siva Chandra __________________________________ Do you Yahoo!? Yahoo! Photos: High-quality 4x6 digital prints for 25¢ http://photos.yahoo.com/ph/print_splash |
|
From: Daniel K. O. <dan...@ya...> - 2004-04-20 09:40:33
|
Alain Paschoud wrote:
>The loop is like :
>
>while (!EOF) {
> fread(&mycharbuffer, 1, 1, myfile);
>}
>
>How can I read a file so that every byte can be any value between 0x00 and 0xFF in this file ???
>
>
This is known as "the Pascal disease".
http://www.eskimo.com/~scs/C-faq/q12.2.html
I would recomend you to a tutorial that explains what functions are (EOF
is not a function) and how to do I/O in C.
http://www.geocities.com/tom_torfs/cintro.html
Daniel K. O.
|
|
From: Per W. <pw...@ia...> - 2004-04-20 08:32:23
|
Note that if you make your completely own OS, you might use any method you like, since you have to implement it yourself. Alternative 2 - using msdos.sys + io.sys and just replacing the command line. One again, you might use any method you like, since msdos will only specially handle the first two arguments meaning that the command.com replacement must contain full commandl line parsing. Alternative 3 - you are still going to use command.com. Then - I haven't an old MSDOS available so I can't test - I assume you have to run your commands as dir.exe, md.exe etc, since command.com will otherwise process the built-in commands dir/echo/... as reserved words and process by itself without looking for any external program with the same name in the program path. Anyway, if you manage to start your own external programs, the command line parameters will be available exactly as if you write a normal dos or win32 command line program. /Per W On Tue, 20 Apr 2004, Rick Langschultz wrote: > I am writing an operating system called StarFire it will be based off of > dos, however the programs included with command.com (dir, echo, etc. ) will > be external commands in the C:\bin folder. What functions can I use to > detect arguments passed from the shell to a program. > > Example: [dir.exe -a C:\bin] or [dir.exe -hsx C:\bin] > > dir is the standard dos dir statement however i want the arguments to be: > -a all files > -h hidden files > -s system files > -x compressed files > -u user files > -t text files > > or any combination of those with only one dash. Is this possible? > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: IBM Linux Tutorials > Free Linux tutorial presented by Daniel Robbins, President and CEO of > GenToo technologies. Learn everything from fundamentals to system > administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click > _______________________________________________ > Dev-cpp-users mailing list > Dev...@li... > TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > |
|
From: Rick L. <sev...@co...> - 2004-04-20 07:51:54
|
I am writing an operating system called StarFire it will be based off of dos, however the programs included with command.com (dir, echo, etc. ) will be external commands in the C:\bin folder. What functions can I use to detect arguments passed from the shell to a program. Example: [dir.exe -a C:\bin] or [dir.exe -hsx C:\bin] dir is the standard dos dir statement however i want the arguments to be: -a all files -h hidden files -s system files -x compressed files -u user files -t text files or any combination of those with only one dash. Is this possible? |
|
From: Denis K. <di...@ya...> - 2004-04-20 07:28:33
|
Monday, April 19, 2004, 8:27:37 AM, you wrote: PK> Dear All, PK> I have launched into the steep learning curve of C++ by attempting to PK> get GTKmm installed and running on Windows 98SE machine. Installation is PK> straightforward (based on the excellent GTKmm Win 32 port site PK> www.pcpm.ucl.ac.be/~gustin/win32_ports/ and the instructions in the PK> docs) but in attempting my first program on Dev C++ I get the (linker?) PK> error list (only partial) as noted below: // skiped It is not a linker error. It looks like some headers are not correct, possibly you have not matching versions of gtk+ and gtkmm. PK> In file included from C:/DEV-CPP/include/gdk/gdk.h:33 This thing looks very strange : include/gdk/gdk.h. As far as I know there must be something like that: include/gtk-2.0/gdk/gdk.h Please, post content of your makefile and output string of pkg-config.exe --libs --cflags gtkmm-2.0 -- Best regards, Denis |
|
From: Alain P. <ala...@ge...> - 2004-04-20 06:16:37
|
Hi all,
I have to read a file that contains binary data, including some 0xff, 0x00 and 0x1A. I tried fread and fgetc. But when the 0x1A is read, this doesn't work. For example, if you write a loop to read a file containing
0x41 0x1A 0x42 0x43 ....
The loop is like :
while (!EOF) {
fread(&mycharbuffer, 1, 1, myfile);
}
First read character is 0x41
Second read character is 0x41 ! Because the 0x1A can't be read by fread, mycharbuffer contains the previous value !!
How can I read a file so that every byte can be any value between 0x00 and 0xFF in this file ???
Thank you for any advice.
|
|
From: Peter K. <pw...@st...> - 2004-04-20 06:00:54
|
Dear Per, Thank you for taking the time to respond. I appreciate it. I actually have included a whole bunch of -lxxx commands in the linker options already. I am not sure why it is not showing up in the compiler output - perhaps because it does not get to linking stage?? I chased down the first warning message and it appears to relate to (in my opinion incorrect) usage of text immediately after an #endif directive, but I would have thought this code had been checked and correct??. The 2nd error message relates to a member defined in gdktypes.h, which is located in \dev-cpp\include\gtk-2.0\gdk directory. I cannot help thinking I need to have PATH statements in my Autoexec.bat file?? I am also quite confused about when to use "\" and when to use"/" for directory separator. The former is Windows and the latter Linux(?). The compiler output actually uses both! Thanks in advance for your help...... Peter Key -----Original Message----- From: Per Westermark [mailto:pw...@ia...] Sent: Monday, 19 April 2004 5:45 PM To: Peter Key Cc: dev...@li... Subject: Re: [Dev-C++] QUESTION ON ERROR LOG FROM A NEWBIE If you read your linkin line, you'l notice that it contains a lot of -Ixx - include path for header files and not needed during link. It also contains one -Lxx - library path, i.e. where the linker should pick up any needed libraries. However, there is not a single: -lxx - i.e. a specification _which_ library should be used. If you open your project options, select the 'Parameters' tab and look at the Linker options, you should specify which libraries the project needs. Most probably, you should specify something like -lgtk or whatever the gtk libraries might be named. You don't have to specify the starting lib and the ending .a. /Per W On Mon, 19 Apr 2004, Peter Key wrote: > Dear All, > > > > I have launched into the steep learning curve of C++ by attempting to > get GTKmm installed and running on Windows 98SE machine. Installation is > straightforward (based on the excellent GTKmm Win 32 port site > www.pcpm.ucl.ac.be/~gustin/win32_ports/ and the instructions in the > docs) but in attempting my first program on Dev C++ I get the (linker?) > error list (only partial) as noted below: > > > > Compiler: Default compiler > > Building Makefile: "C:\Programming\TrialGTKmm#1\Makefile.win" > > Executing make clean > > rm -f Trial1.o gtkmm > > g++.exe -c Trial1.cpp -o Trial1.o -I"C:/DEV-CPP/include/c++" > -I"C:/DEV-CPP/include/c++/mingw32" -I"C:/DEV-CPP/include/c++/backward" > -I"C:/DEV-CPP/include" -Ic:/dev-cpp/gtkmm/include/gtkmm-2.0 > -Ic:/dev-cpp/gtkmm/lib/gtkmm-2.0/include > -Ic:/dev-cpp/gtkmm/lib/sigc++-1.2/include > -Ic:/dev-cpp/gtkmm/include/sigc++-1.2 -Ic:/dev-cpp/include/gtk-2.0 > -Ic:/dev-cpp/include/glib-2.0 -Ic:/dev-cpp/lib/glib-2.0/include > -Ic:/dev-cpp/lib/gtk-2.0/include -Ic:/dev-cpp/include/pango-1.0 > -Ic:/dev-cpp/include/atk-1.0 -Lc:/dev-cpp/gtkmm/lib -Lc:/dev-cpp/lib > > In file included from C:/DEV-CPP/include/gdk/gdk.h:33, > > from > c:/dev-cpp/gtkmm/include/gtkmm-2.0/gdkmm/types.h:28, > > from c:/dev-cpp/gtkmm/include/gtkmm-2.0/gdkmm.h:27, > > from c:/dev-cpp/gtkmm/include/gtkmm-2.0/gtkmm.h:30, > > from Trial1.cpp:1: > > C:/DEV-CPP/include/gdk/gdkdnd.h:99:8: warning: extra tokens at end of > #endif directive > > In file included from > c:/dev-cpp/gtkmm/include/gtkmm-2.0/gdkmm/drawable.h:36, > > from c:/dev-cpp/gtkmm/include/gtkmm-2.0/gdkmm/gc.h:30, > > from c:/dev-cpp/gtkmm/include/gtkmm-2.0/gdkmm.h:29, > > from c:/dev-cpp/gtkmm/include/gtkmm-2.0/gtkmm.h:30, > > from Trial1.cpp:1: > > c:/dev-cpp/gtkmm/include/gtkmm-2.0/gdkmm/region.h:189: `GdkSpan' was not > > > declared in this scope > > c:/dev-cpp/gtkmm/include/gtkmm-2.0/gdkmm/region.h:189: `spans' was not > declared > > in this scope > > c:/dev-cpp/gtkmm/include/gtkmm-2.0/gdkmm/region.h:189: parse error > before `,' > > token > > In file included from > c:/dev-cpp/gtkmm/include/gtkmm-2.0/gdkmm/bitmap.h:27, > > from > c:/dev-cpp/gtkmm/include/gtkmm-2.0/gdkmm/window.h:28, > > from c:/dev-cpp/gtkmm/include/gtkmm-2.0/gdkmm.h:31, > > from c:/dev-cpp/gtkmm/include/gtkmm-2.0/gtkmm.h:30, > > from Trial1.cpp:1: > > c:/dev-cpp/gtkmm/include/gtkmm-2.0/gdkmm/pixmap.h:64: ISO C++ forbids > > declaration of `GdkPixmapObjectClass' with no type > > c:/dev-cpp/gtkmm/include/gtkmm-2.0/gdkmm/pixmap.h:64: parse error before > `;' > > token > > c:/dev-cpp/gtkmm/include/gtkmm-2.0/gdkmm/pixmap.h:113: type specifier > omitted > > for parameter `GdkNativeWindow' > > c:/dev-cpp/gtkmm/include/gtkmm-2.0/gdkmm/pixmap.h:113: parse error > before `)' > > token > > > > Sorry for this, but can somebody point me in the right direction > please??? > > > > Peter Key > > > > > > __________ NOD32 1.724 (20040419) Information __________ This message was checked by NOD32 antivirus system. http://www.nod32.com |
|
From: Ray K. <ray...@my...> - 2004-04-20 01:43:06
|
> Lior Wehrli wrote: > Since I updated to 4.9.8.7, the "Compiler" tab of the Project options=20 > menu > has an entry "<ERR: 735>" in the C Compiler section, two entries "<ERR: > 3401>" and "<ERR: 3402>" in the Code Generation section and an entry=20 > "<ERR: 3400>" in the Linker section. > I guess that is a bug. I could be mistaken, but I believe those messages pop up if you download a more recent version without getting the matching language file. So try getting that, and see if the messages go away. > Also, the Makefile got currupted with lines of compiler error messages = a=20 > two or three times after I added new (invalid?) compile parameters.=20 > After removing the parameter and rebuilding the project the problem=20 > disappeared. > This is definetely a bug. I'll post more info if it turns up again. I don't know what might be causing this one, but if you post a copy of the command line and error messages in question, it might increase the odds of someone here finding a solution. |
|
From: Dee B. <db...@as...> - 2004-04-19 19:50:00
|
Norton AntiVirus found a virus in an attachment you = (dev...@li...) sent to Dee Berger. To ensure the recipient(s) are able to use the files you sent, perform a = virus scan on your computer, clean any infected files, then resend this = attachment. Attachment: id.zip Virus name: W32.Netsky.C@mm Action taken: Clean failed : Quarantine succeeded :=20 File status: Infected |
|
From: Lior W. <we...@st...> - 2004-04-19 16:55:53
|
Hi, Since I updated to 4.9.8.7, the "Compiler" tab of the Project options menu has an entry "<ERR: 735>" in the C Compiler section, two entries "<ERR: 3401>" and "<ERR: 3402>" in the Code Generation section and an entry "<ERR: 3400>" in the Linker section. I guess that is a bug. Also, the Makefile got currupted with lines of compiler error messages a two or three times after I added new (invalid?) compile parameters. After removing the parameter and rebuilding the project the problem disappeared. This is definetely a bug. I'll post more info if it turns up again. greetings, Lior |
|
From: Lior W. <we...@st...> - 2004-04-19 16:55:30
|
Hi,
I get the following error message when I try to use std vectors. this =
seems to be related to missing header file inclusion. What do i have to =
do? The related code section is at the end of this mail.
In file included from C:/Dev-Cpp/include/c++/cstring:49,
from C:/Dev-Cpp/include/c++/bits/stl_algobase.h:65,
from C:/Dev-Cpp/include/c++/vector:67,
from VNT/tissue.h:9,
from VNT/vnt.h:5,
from main.cpp:4:
C:/Dev-Cpp/include/c++/cstddef:52: `ptrdiff_t' not declared
In file included from C:/Dev-Cpp/include/c++/bits/stl_algobase.h:67,
from C:/Dev-Cpp/include/c++/vector:67,
from VNT/tissue.h:9,
from VNT/vnt.h:5,
from main.cpp:4:
C:/Dev-Cpp/include/c++/cstdlib:86: `div_t' not declared
C:/Dev-Cpp/include/c++/cstdlib:87: `ldiv_t' not declared
C:/Dev-Cpp/include/c++/cstdlib:89: `abort' not declared
C:/Dev-Cpp/include/c++/cstdlib:90: `abs' not declared
C:/Dev-Cpp/include/c++/cstdlib:91: `atexit' not declared
C:/Dev-Cpp/include/c++/cstdlib:92: `atof' not declared
C:/Dev-Cpp/include/c++/cstdlib:93: `atoi' not declared
C:/Dev-Cpp/include/c++/cstdlib:94: `atol' not declared
C:/Dev-Cpp/include/c++/cstdlib:95: `bsearch' not declared
C:/Dev-Cpp/include/c++/cstdlib:96: `calloc' not declared
C:/Dev-Cpp/include/c++/cstdlib:97: `div' not declared
C:/Dev-Cpp/include/c++/cstdlib:98: `exit' not declared
C:/Dev-Cpp/include/c++/cstdlib:99: `free' not declared
C:/Dev-Cpp/include/c++/cstdlib:100: `getenv' not declared
C:/Dev-Cpp/include/c++/cstdlib:101: `labs' not declared
C:/Dev-Cpp/include/c++/cstdlib:102: `ldiv' not declared
C:/Dev-Cpp/include/c++/cstdlib:103: `malloc' not declared
C:/Dev-Cpp/include/c++/cstdlib:104: `mblen' not declared
C:/Dev-Cpp/include/c++/cstdlib:105: `mbstowcs' not declared
C:/Dev-Cpp/include/c++/cstdlib:106: `mbtowc' not declared
C:/Dev-Cpp/include/c++/cstdlib:107: `qsort' not declared
C:/Dev-Cpp/include/c++/cstdlib:108: `rand' not declared
C:/Dev-Cpp/include/c++/cstdlib:109: `realloc' not declared
C:/Dev-Cpp/include/c++/cstdlib:110: `srand' not declared
C:/Dev-Cpp/include/c++/cstdlib:111: `strtod' not declared
C:/Dev-Cpp/include/c++/cstdlib:112: `strtol' not declared
C:/Dev-Cpp/include/c++/cstdlib:113: `strtoul' not declared
C:/Dev-Cpp/include/c++/cstdlib:114: `system' not declared
C:/Dev-Cpp/include/c++/cstdlib:115: `wcstombs' not declared
C:/Dev-Cpp/include/c++/cstdlib:116: `wctomb' not declared
In file included from C:/Dev-Cpp/include/c++/mingw32/bits/c++io.h:35,
from C:/Dev-Cpp/include/c++/bits/fpos.h:44,
from C:/Dev-Cpp/include/c++/iosfwd:46,
from C:/Dev-Cpp/include/c++/bits/stl_algobase.h:70,
from C:/Dev-Cpp/include/c++/vector:67,
from VNT/tissue.h:9,
from VNT/vnt.h:5,
from main.cpp:4:
C:/Dev-Cpp/include/c++/cstdio:99: `FILE' not declared
C:/Dev-Cpp/include/c++/cstdio:100: `fpos_t' not declared
C:/Dev-Cpp/include/c++/cstdio:102: `clearerr' not declared
C:/Dev-Cpp/include/c++/cstdio:103: `fclose' not declared
C:/Dev-Cpp/include/c++/cstdio:104: `feof' not declared
C:/Dev-Cpp/include/c++/cstdio:105: `ferror' not declared
C:/Dev-Cpp/include/c++/cstdio:106: `fflush' not declared
C:/Dev-Cpp/include/c++/cstdio:107: `fgetc' not declared
C:/Dev-Cpp/include/c++/cstdio:108: `fgetpos' not declared
C:/Dev-Cpp/include/c++/cstdio:109: `fgets' not declared
C:/Dev-Cpp/include/c++/cstdio:110: `fopen' not declared
C:/Dev-Cpp/include/c++/cstdio:111: `fprintf' not declared
C:/Dev-Cpp/include/c++/cstdio:112: `fputc' not declared
C:/Dev-Cpp/include/c++/cstdio:113: `fputs' not declared
C:/Dev-Cpp/include/c++/cstdio:114: `fread' not declared
C:/Dev-Cpp/include/c++/cstdio:115: `freopen' not declared
C:/Dev-Cpp/include/c++/cstdio:116: `fscanf' not declared
C:/Dev-Cpp/include/c++/cstdio:117: `fseek' not declared
C:/Dev-Cpp/include/c++/cstdio:118: `fsetpos' not declared
C:/Dev-Cpp/include/c++/cstdio:119: `ftell' not declared
C:/Dev-Cpp/include/c++/cstdio:120: `fwrite' not declared
C:/Dev-Cpp/include/c++/cstdio:121: `getc' not declared
C:/Dev-Cpp/include/c++/cstdio:122: `getchar' not declared
C:/Dev-Cpp/include/c++/cstdio:123: `gets' not declared
C:/Dev-Cpp/include/c++/cstdio:124: `perror' not declared
C:/Dev-Cpp/include/c++/cstdio:125: `printf' not declared
C:/Dev-Cpp/include/c++/cstdio:126: `putc' not declared
C:/Dev-Cpp/include/c++/cstdio:127: `putchar' not declared
C:/Dev-Cpp/include/c++/cstdio:128: `puts' not declared
C:/Dev-Cpp/include/c++/cstdio:129: `remove' not declared
C:/Dev-Cpp/include/c++/cstdio:130: `rename' not declared
C:/Dev-Cpp/include/c++/cstdio:131: `rewind' not declared
C:/Dev-Cpp/include/c++/cstdio:132: `scanf' not declared
C:/Dev-Cpp/include/c++/cstdio:133: `setbuf' not declared
C:/Dev-Cpp/include/c++/cstdio:134: `setvbuf' not declared
C:/Dev-Cpp/include/c++/cstdio:135: `sprintf' not declared
C:/Dev-Cpp/include/c++/cstdio:136: `sscanf' not declared
C:/Dev-Cpp/include/c++/cstdio:137: `tmpfile' not declared
C:/Dev-Cpp/include/c++/cstdio:138: `tmpnam' not declared
C:/Dev-Cpp/include/c++/cstdio:139: `ungetc' not declared
C:/Dev-Cpp/include/c++/cstdio:140: `vfprintf' not declared
C:/Dev-Cpp/include/c++/cstdio:141: `vprintf' not declared
C:/Dev-Cpp/include/c++/cstdio:142: `vsprintf' not declared
In file included from C:/Dev-Cpp/include/c++/cwchar:51,
from C:/Dev-Cpp/include/c++/bits/fpos.h:45,
from C:/Dev-Cpp/include/c++/iosfwd:46,
from C:/Dev-Cpp/include/c++/bits/stl_algobase.h:70,
from C:/Dev-Cpp/include/c++/vector:67,
from VNT/tissue.h:9,
from VNT/vnt.h:5,
from main.cpp:4:
C:/Dev-Cpp/include/c++/ctime:66: `clock_t' not declared
C:/Dev-Cpp/include/c++/ctime:67: `time_t' not declared
C:/Dev-Cpp/include/c++/ctime:68: `tm' not declared
C:/Dev-Cpp/include/c++/ctime:70: `clock' not declared
C:/Dev-Cpp/include/c++/ctime:71: `difftime' not declared
C:/Dev-Cpp/include/c++/ctime:72: `mktime' not declared
C:/Dev-Cpp/include/c++/ctime:73: `time' not declared
C:/Dev-Cpp/include/c++/ctime:74: `asctime' not declared
C:/Dev-Cpp/include/c++/ctime:75: `ctime' not declared
C:/Dev-Cpp/include/c++/ctime:76: `gmtime' not declared
C:/Dev-Cpp/include/c++/ctime:77: `localtime' not declared
C:/Dev-Cpp/include/c++/ctime:78: `strftime' not declared
In file included from C:/Dev-Cpp/include/c++/bits/fpos.h:45,
from C:/Dev-Cpp/include/c++/iosfwd:46,
from C:/Dev-Cpp/include/c++/bits/stl_algobase.h:70,
from C:/Dev-Cpp/include/c++/vector:67,
from VNT/tissue.h:9,
from VNT/vnt.h:5,
from main.cpp:4:
C:/Dev-Cpp/include/c++/cwchar:71: `mbstate_t' not declared
In file included from VNT/vnt.h:5,
from main.cpp:4:
VNT/tissue.h:14: parse error before `>' token
VNT/tissue.h:21: template declaration of `
VNT::std::vector<VNT::Neuron<VNT::Neurite, VNT::Synapse, VNT::Spike>, =
VNT::std::allocator<VNT::Neuron<VNT::Neurite, VNT::Synapse, =
VNT::Spike> > >=20
VNT::VNT::neuron'
VNT/tissue.h:21: confused by earlier errors, bailing out
The code section:
#include "neuron.h"
#include "time.h"
#include <stdio.h>
#include <stdlib.h>
#include <vector>
#include <GL/freeglut.h>
// program code starts here, but is not related to the error message. I =
think.
greetings
Lior
|
|
From: Per W. <pw...@ia...> - 2004-04-19 07:45:15
|
If you read your linkin line, you'l notice that it contains a lot of -Ixx - include path for header files and not needed during link. It also contains one -Lxx - library path, i.e. where the linker should pick up any needed libraries. However, there is not a single: -lxx - i.e. a specification _which_ library should be used. If you open your project options, select the 'Parameters' tab and look at the Linker options, you should specify which libraries the project needs. Most probably, you should specify something like -lgtk or whatever the gtk libraries might be named. You don't have to specify the starting lib and the ending .a. /Per W On Mon, 19 Apr 2004, Peter Key wrote: > Dear All, > > > > I have launched into the steep learning curve of C++ by attempting to > get GTKmm installed and running on Windows 98SE machine. Installation is > straightforward (based on the excellent GTKmm Win 32 port site > www.pcpm.ucl.ac.be/~gustin/win32_ports/ and the instructions in the > docs) but in attempting my first program on Dev C++ I get the (linker?) > error list (only partial) as noted below: > > > > Compiler: Default compiler > > Building Makefile: "C:\Programming\TrialGTKmm#1\Makefile.win" > > Executing make clean > > rm -f Trial1.o gtkmm > > g++.exe -c Trial1.cpp -o Trial1.o -I"C:/DEV-CPP/include/c++" > -I"C:/DEV-CPP/include/c++/mingw32" -I"C:/DEV-CPP/include/c++/backward" > -I"C:/DEV-CPP/include" -Ic:/dev-cpp/gtkmm/include/gtkmm-2.0 > -Ic:/dev-cpp/gtkmm/lib/gtkmm-2.0/include > -Ic:/dev-cpp/gtkmm/lib/sigc++-1.2/include > -Ic:/dev-cpp/gtkmm/include/sigc++-1.2 -Ic:/dev-cpp/include/gtk-2.0 > -Ic:/dev-cpp/include/glib-2.0 -Ic:/dev-cpp/lib/glib-2.0/include > -Ic:/dev-cpp/lib/gtk-2.0/include -Ic:/dev-cpp/include/pango-1.0 > -Ic:/dev-cpp/include/atk-1.0 -Lc:/dev-cpp/gtkmm/lib -Lc:/dev-cpp/lib > > In file included from C:/DEV-CPP/include/gdk/gdk.h:33, > > from > c:/dev-cpp/gtkmm/include/gtkmm-2.0/gdkmm/types.h:28, > > from c:/dev-cpp/gtkmm/include/gtkmm-2.0/gdkmm.h:27, > > from c:/dev-cpp/gtkmm/include/gtkmm-2.0/gtkmm.h:30, > > from Trial1.cpp:1: > > C:/DEV-CPP/include/gdk/gdkdnd.h:99:8: warning: extra tokens at end of > #endif directive > > In file included from > c:/dev-cpp/gtkmm/include/gtkmm-2.0/gdkmm/drawable.h:36, > > from c:/dev-cpp/gtkmm/include/gtkmm-2.0/gdkmm/gc.h:30, > > from c:/dev-cpp/gtkmm/include/gtkmm-2.0/gdkmm.h:29, > > from c:/dev-cpp/gtkmm/include/gtkmm-2.0/gtkmm.h:30, > > from Trial1.cpp:1: > > c:/dev-cpp/gtkmm/include/gtkmm-2.0/gdkmm/region.h:189: `GdkSpan' was not > > > declared in this scope > > c:/dev-cpp/gtkmm/include/gtkmm-2.0/gdkmm/region.h:189: `spans' was not > declared > > in this scope > > c:/dev-cpp/gtkmm/include/gtkmm-2.0/gdkmm/region.h:189: parse error > before `,' > > token > > In file included from > c:/dev-cpp/gtkmm/include/gtkmm-2.0/gdkmm/bitmap.h:27, > > from > c:/dev-cpp/gtkmm/include/gtkmm-2.0/gdkmm/window.h:28, > > from c:/dev-cpp/gtkmm/include/gtkmm-2.0/gdkmm.h:31, > > from c:/dev-cpp/gtkmm/include/gtkmm-2.0/gtkmm.h:30, > > from Trial1.cpp:1: > > c:/dev-cpp/gtkmm/include/gtkmm-2.0/gdkmm/pixmap.h:64: ISO C++ forbids > > declaration of `GdkPixmapObjectClass' with no type > > c:/dev-cpp/gtkmm/include/gtkmm-2.0/gdkmm/pixmap.h:64: parse error before > `;' > > token > > c:/dev-cpp/gtkmm/include/gtkmm-2.0/gdkmm/pixmap.h:113: type specifier > omitted > > for parameter `GdkNativeWindow' > > c:/dev-cpp/gtkmm/include/gtkmm-2.0/gdkmm/pixmap.h:113: parse error > before `)' > > token > > > > Sorry for this, but can somebody point me in the right direction > please??? > > > > Peter Key > > > > > > |
|
From: Siva C. <siv...@ya...> - 2004-04-19 06:41:33
|
hello, if you want to code your own matrix class then you might try creating a vector of vectors(if your vector class is a template class that is!). else I would suggest you use TNT which has real good Array1D, Array2D and Array3D classes. you can find it at: http://math.nist.gov/tnt/ hope this helps... Siva Chandra --- Nancy Alvarez <nai...@ho...> wrote: --------------------------------- Somebody could say me how dinamycal allocate a matrix. I have examples for vectors . Can I use the class vector for this. and how free memory for this cases. Thanks in advance __________________________________ Do you Yahoo!? Yahoo! Photos: High-quality 4x6 digital prints for 25¢ http://photos.yahoo.com/ph/print_splash |
|
From: Peter K. <pw...@st...> - 2004-04-19 01:27:49
|
Dear All, I have launched into the steep learning curve of C++ by attempting to get GTKmm installed and running on Windows 98SE machine. Installation is straightforward (based on the excellent GTKmm Win 32 port site www.pcpm.ucl.ac.be/~gustin/win32_ports/ and the instructions in the docs) but in attempting my first program on Dev C++ I get the (linker?) error list (only partial) as noted below: Compiler: Default compiler Building Makefile: "C:\Programming\TrialGTKmm#1\Makefile.win" Executing make clean rm -f Trial1.o gtkmm g++.exe -c Trial1.cpp -o Trial1.o -I"C:/DEV-CPP/include/c++" -I"C:/DEV-CPP/include/c++/mingw32" -I"C:/DEV-CPP/include/c++/backward" -I"C:/DEV-CPP/include" -Ic:/dev-cpp/gtkmm/include/gtkmm-2.0 -Ic:/dev-cpp/gtkmm/lib/gtkmm-2.0/include -Ic:/dev-cpp/gtkmm/lib/sigc++-1.2/include -Ic:/dev-cpp/gtkmm/include/sigc++-1.2 -Ic:/dev-cpp/include/gtk-2.0 -Ic:/dev-cpp/include/glib-2.0 -Ic:/dev-cpp/lib/glib-2.0/include -Ic:/dev-cpp/lib/gtk-2.0/include -Ic:/dev-cpp/include/pango-1.0 -Ic:/dev-cpp/include/atk-1.0 -Lc:/dev-cpp/gtkmm/lib -Lc:/dev-cpp/lib In file included from C:/DEV-CPP/include/gdk/gdk.h:33, from c:/dev-cpp/gtkmm/include/gtkmm-2.0/gdkmm/types.h:28, from c:/dev-cpp/gtkmm/include/gtkmm-2.0/gdkmm.h:27, from c:/dev-cpp/gtkmm/include/gtkmm-2.0/gtkmm.h:30, from Trial1.cpp:1: C:/DEV-CPP/include/gdk/gdkdnd.h:99:8: warning: extra tokens at end of #endif directive In file included from c:/dev-cpp/gtkmm/include/gtkmm-2.0/gdkmm/drawable.h:36, from c:/dev-cpp/gtkmm/include/gtkmm-2.0/gdkmm/gc.h:30, from c:/dev-cpp/gtkmm/include/gtkmm-2.0/gdkmm.h:29, from c:/dev-cpp/gtkmm/include/gtkmm-2.0/gtkmm.h:30, from Trial1.cpp:1: c:/dev-cpp/gtkmm/include/gtkmm-2.0/gdkmm/region.h:189: `GdkSpan' was not declared in this scope c:/dev-cpp/gtkmm/include/gtkmm-2.0/gdkmm/region.h:189: `spans' was not declared in this scope c:/dev-cpp/gtkmm/include/gtkmm-2.0/gdkmm/region.h:189: parse error before `,' token In file included from c:/dev-cpp/gtkmm/include/gtkmm-2.0/gdkmm/bitmap.h:27, from c:/dev-cpp/gtkmm/include/gtkmm-2.0/gdkmm/window.h:28, from c:/dev-cpp/gtkmm/include/gtkmm-2.0/gdkmm.h:31, from c:/dev-cpp/gtkmm/include/gtkmm-2.0/gtkmm.h:30, from Trial1.cpp:1: c:/dev-cpp/gtkmm/include/gtkmm-2.0/gdkmm/pixmap.h:64: ISO C++ forbids declaration of `GdkPixmapObjectClass' with no type c:/dev-cpp/gtkmm/include/gtkmm-2.0/gdkmm/pixmap.h:64: parse error before `;' token c:/dev-cpp/gtkmm/include/gtkmm-2.0/gdkmm/pixmap.h:113: type specifier omitted for parameter `GdkNativeWindow' c:/dev-cpp/gtkmm/include/gtkmm-2.0/gdkmm/pixmap.h:113: parse error before `)' token Sorry for this, but can somebody point me in the right direction please??? Peter Key |
|
From: <ric...@nt...> - 2004-04-18 18:42:20
|
I'm trying to encrypt a file and to be honest I don't have a clue how to do
it. SO I copied and pasted the example from the MSDN encryption example but
it keeps failing on this if statement:
// Get a handle to key exchange key.
if(!CryptGetUserKey(hProv, AT_KEYEXCHANGE, &hXchgKey)) {
printf("Error %x during CryptGetUserKey!\n", GetLastError());
goto done;
}
The error translates to key doesn't exist. OK but how do I create it? Or is
the example in the MSDN flawed somehow?
I've pasted my slightly modified code below. Any assitance would be
appreciated.
#include <windows.h>
#include <wincrypt.h>
#include <stdio.h>
#include "resource.h"
extern void OutputErrorMessage();
extern void OutputDistinctErrorMessage(char *msg);
#define BLOCK_SIZE 160
#define BUFFER_SIZE (BLOCK_SIZE+16) // Give buffer 16 bytes of extra
// room for padding, and so forth.
BOOL SaveEncryptedTextFileFromEdit(HWND hEdit, LPCTSTR pszFileName)
{
HANDLE hFile;
BOOL bSuccess = FALSE;
FILE *hDest = NULL;
int eof = 0;
HCRYPTPROV hProv = 0;
HCRYPTKEY hKey = 0;
HCRYPTKEY hXchgKey = 0;
BYTE pbBuffer[BUFFER_SIZE];
DWORD dwCount;
BYTE *pbKeyBlob = NULL;
DWORD dwBlobLen;
DWORD dwTextLength;
hFile = CreateFile(pszFileName, GENERIC_WRITE, 0, NULL,
CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
if(hDest != INVALID_HANDLE_VALUE)
{
// Get a handle to the default provider.
if(!CryptAcquireContext(&hProv, NULL, NULL, PROV_RSA_FULL, 0)) {
OutputErrorMessage();
goto done;
}
// Create a random block cipher session key.
if(!CryptGenKey(hProv, CALG_RC2, CRYPT_EXPORTABLE, &hKey)) {
OutputErrorMessage();
goto done;
}
// Get a handle to key exchange key.
if(!CryptGetUserKey(hProv, AT_KEYEXCHANGE, &hXchgKey)) {
OutputErrorMessage();
goto done;
}
// Determine the size of the key blob and allocate memory.
if(!CryptExportKey(hKey, hXchgKey, SIMPLEBLOB, 0, NULL, &dwBlobLen))
{
OutputErrorMessage();
goto done;
}
if((pbKeyBlob = (BYTE *) malloc(dwBlobLen)) == NULL) {
OutputErrorMessage();
goto done;
}
// Export the key into a simple key blob.
if(!CryptExportKey(hKey, hXchgKey, SIMPLEBLOB, 0, pbKeyBlob,
&dwBlobLen)) {
OutputErrorMessage();
free(pbKeyBlob);
goto done;
}
// Write the size of the key blob to the destination file.
fwrite(&dwBlobLen, sizeof(DWORD), 1, hDest);
if(ferror(hDest)) {
OutputErrorMessage();
free(pbKeyBlob);
goto done;
}
// Write the key blob to the destination file.
fwrite(pbKeyBlob, 1, dwBlobLen, hDest);
if(ferror(hDest)) {
OutputErrorMessage();
free(pbKeyBlob);
goto done;
}
// Free memory.
free(pbKeyBlob);
dwTextLength = GetWindowTextLength(hEdit);
// No need to bother if there's no text.
if(dwTextLength > 0)
{
char * pszText;
DWORD dwBufferSize = dwTextLength + 1;
pszText = (char *) GlobalAlloc(GPTR, dwBufferSize);
if(pszText != NULL)
{
if(GetWindowText(hEdit, pszText, dwBufferSize))
{
DWORD dwWritten;
// Encrypt the data.
if(!CryptEncrypt(hKey, 0, eof, 0, pbBuffer, (DWORD *)
pszText,
dwBufferSize))
{
char *nmsg = "Error during CryptEncrypt!\n";
OutputDistinctErrorMessage(nmsg);
goto done;
}
// Write the data to the destination file.
fwrite(pbBuffer, 1, dwCount, hDest);
if(ferror(hDest)) {
printf("Error writing data!\n");
goto done;
}
if(WriteFile(hFile, pszText, dwTextLength, &dwWritten, NULL))
bSuccess = TRUE;
}
GlobalFree(pszText);
}
}
CloseHandle(hFile);
}
done:
// Destroy the session key.
if(hKey != 0) CryptDestroyKey(hKey);
// Destroy the key exchange key.
if(hXchgKey != 0) CryptDestroyKey(hXchgKey);
// Release the provider handle.
if(hProv != 0) CryptReleaseContext(hProv, 0);
// Close the source file.
//if(hSource != NULL) fclose(hSource);
// Close destination file.
if(hDest != NULL) fclose(hDest);
return bSuccess;
}
-----------------------------------------
Email provided by http://www.ntlhome.com/
|
|
From: Rick D. <ric...@oc...> - 2004-04-18 18:41:28
|
I'm trying to encrypt a file and to be honest I don't have a clue how to do
it. SO I copied and pasted the example from the MSDN encryption example but
it keeps failing on this if statement:
// Get a handle to key exchange key.
if(!CryptGetUserKey(hProv, AT_KEYEXCHANGE, &hXchgKey)) {
printf("Error %x during CryptGetUserKey!\n", GetLastError());
goto done;
}
The error translates to key doesn't exist. OK but how do I create it? Or is
the example in the MSDN flawed somehow?
I've pasted my slightly modified code below. Any assitance would be
appreciated.
#include <windows.h>
#include <wincrypt.h>
#include <stdio.h>
#include "resource.h"
extern void OutputErrorMessage();
extern void OutputDistinctErrorMessage(char *msg);
#define BLOCK_SIZE 160
#define BUFFER_SIZE (BLOCK_SIZE+16) // Give buffer 16 bytes of extra
// room for padding, and so forth.
BOOL SaveEncryptedTextFileFromEdit(HWND hEdit, LPCTSTR pszFileName)
{
HANDLE hFile;
BOOL bSuccess = FALSE;
FILE *hDest = NULL;
int eof = 0;
HCRYPTPROV hProv = 0;
HCRYPTKEY hKey = 0;
HCRYPTKEY hXchgKey = 0;
BYTE pbBuffer[BUFFER_SIZE];
DWORD dwCount;
BYTE *pbKeyBlob = NULL;
DWORD dwBlobLen;
DWORD dwTextLength;
hFile = CreateFile(pszFileName, GENERIC_WRITE, 0, NULL,
CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
if(hDest != INVALID_HANDLE_VALUE)
{
// Get a handle to the default provider.
if(!CryptAcquireContext(&hProv, NULL, NULL, PROV_RSA_FULL, 0)) {
OutputErrorMessage();
goto done;
}
// Create a random block cipher session key.
if(!CryptGenKey(hProv, CALG_RC2, CRYPT_EXPORTABLE, &hKey)) {
OutputErrorMessage();
goto done;
}
// Get a handle to key exchange key.
if(!CryptGetUserKey(hProv, AT_KEYEXCHANGE, &hXchgKey)) {
OutputErrorMessage();
goto done;
}
// Determine the size of the key blob and allocate memory.
if(!CryptExportKey(hKey, hXchgKey, SIMPLEBLOB, 0, NULL, &dwBlobLen))
{
OutputErrorMessage();
goto done;
}
if((pbKeyBlob = (BYTE *) malloc(dwBlobLen)) == NULL) {
OutputErrorMessage();
goto done;
}
// Export the key into a simple key blob.
if(!CryptExportKey(hKey, hXchgKey, SIMPLEBLOB, 0, pbKeyBlob,
&dwBlobLen)) {
OutputErrorMessage();
free(pbKeyBlob);
goto done;
}
// Write the size of the key blob to the destination file.
fwrite(&dwBlobLen, sizeof(DWORD), 1, hDest);
if(ferror(hDest)) {
OutputErrorMessage();
free(pbKeyBlob);
goto done;
}
// Write the key blob to the destination file.
fwrite(pbKeyBlob, 1, dwBlobLen, hDest);
if(ferror(hDest)) {
OutputErrorMessage();
free(pbKeyBlob);
goto done;
}
// Free memory.
free(pbKeyBlob);
dwTextLength = GetWindowTextLength(hEdit);
// No need to bother if there's no text.
if(dwTextLength > 0)
{
char * pszText;
DWORD dwBufferSize = dwTextLength + 1;
pszText = (char *) GlobalAlloc(GPTR, dwBufferSize);
if(pszText != NULL)
{
if(GetWindowText(hEdit, pszText, dwBufferSize))
{
DWORD dwWritten;
// Encrypt the data.
if(!CryptEncrypt(hKey, 0, eof, 0, pbBuffer, (DWORD *)
pszText,
dwBufferSize))
{
char *nmsg = "Error during CryptEncrypt!\n";
OutputDistinctErrorMessage(nmsg);
goto done;
}
// Write the data to the destination file.
fwrite(pbBuffer, 1, dwCount, hDest);
if(ferror(hDest)) {
printf("Error writing data!\n");
goto done;
}
if(WriteFile(hFile, pszText, dwTextLength, &dwWritten, NULL))
bSuccess = TRUE;
}
GlobalFree(pszText);
}
}
CloseHandle(hFile);
}
done:
// Destroy the session key.
if(hKey != 0) CryptDestroyKey(hKey);
// Destroy the key exchange key.
if(hXchgKey != 0) CryptDestroyKey(hXchgKey);
// Release the provider handle.
if(hProv != 0) CryptReleaseContext(hProv, 0);
// Close the source file.
//if(hSource != NULL) fclose(hSource);
// Close destination file.
if(hDest != NULL) fclose(hDest);
return bSuccess;
}
|
|
From: Per W. <pw...@ia...> - 2004-04-18 18:14:09
|
Don't know if it is distributed now, but at least there have been a
conio.h/conio.c available
The conio.c does contain
clrscr(), clreol(), delline(), _conio_gettext(),
gotoxy(), puttext(), _setcursortype(), textattr(),
textbackground(), textcolor(), wherex(), wherey()
/Per W
On Sun, 18 Apr 2004, Mohammed Iqbal wrote:
> If you want your program to run, compile it with Borland C++ compilers.
> There're no libraries with gcc to link to conio.h.
>
> Mohamed
> ----- Original Message -----
> From: "faramarz yari" <far...@ho...>
> To: <Dev...@li...>
> Sent: Saturday, April 17, 2004 9:30 PM
> Subject: [Dev-C++] problem with conio.h
>
>
> > simply writing this :
> >
> > #include <stdio.h>
> > #include <conio.h>
> > #include <stdlib.h>
> > int main(int argc, char *argv[])
> > {
> > clrscr();
> > gotoxy(10,10);
> > system("PAUSE");
> > return 0;
> > }
> >
> > there is no compiler error but linker made this errors :
> >
> > :conio.cpp: undefined reference to `clrscr'
> > conio.cpp: undefined reference to `gotoxy'
> >
> > i have this problem only with conio.h.
> > i check conio.h & find the prototype of these functions in cinio is
> > availble.
> > what should i do to solve it?
> > thank u in advanced
> >
> > _________________________________________________________________
> > Add photos to your e-mail with MSN 8. Get 2 months FREE*.
> > http://join.msn.com/?page=features/featuredemail
> >
> >
> >
> > -------------------------------------------------------
> > This SF.Net email is sponsored by: IBM Linux Tutorials
> > Free Linux tutorial presented by Daniel Robbins, President and CEO of
> > GenToo technologies. Learn everything from fundamentals to system
> > administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
> > _______________________________________________
> > Dev-cpp-users mailing list
> > Dev...@li...
> > TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm
> > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
> >
>
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by: IBM Linux Tutorials
> Free Linux tutorial presented by Daniel Robbins, President and CEO of
> GenToo technologies. Learn everything from fundamentals to system
> administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
> _______________________________________________
> Dev-cpp-users mailing list
> Dev...@li...
> TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm
> https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
>
|