dev-cpp-users Mailing List for Dev-C++ (Page 333)
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: Gary R. <ga...@fi...> - 2003-08-06 18:55:28
|
I'm trying to compile some code that was originally developed under MSVS 6.0
and includes some C++ code that was written by someone else. The error I'm
getting occurs in an include file and is: "no class template named". A
portion of the code involved is shown below. The compiler flags the line
containing the first opening brace. What could I do to correct this?
Thanks,
Gary Richardson
class iterator
: public random_access_iterator_parent(seqref<T>)
{
protected:
friend class SeqBase<T>;
SeqBase<T>* seq;
int count;
public:
~iterator ()
{}
iterator ()
{
seq = 0;
count = 0;
}
.
.
.
}; // end of class SeqBase<T>::iterator
|
|
From: <ten...@ne...> - 2003-08-06 16:39:14
|
Yeah, I had -O2, I forgot that, well I turned off optimizations, but still the same. I'll do a try I've not done yet in this case: I'ill delete the block and rewrite it exactly as it is now. Abhijit Shylanath wrote: >>But this is not the only time I get this kind of error. >> >> > >Are you compiling with optimization (-O2 or greater?). If so, try disabling >optimizations and then see if it works. Optimization levels greater than 2 >are supposed to be risky. > >-- >Abhijit Shylanath >Homepage: http://mudeth.tripod.com/ > > > >------------------------------------------------------- >This SF.Net email sponsored by: Free pre-built ASP.NET sites including >Data Reports, E-commerce, Portals, and Forums are available now. >Download today and enter to win an XBOX or Visual Studio .NET. >http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01 >_______________________________________________ >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: <ten...@ne...> - 2003-08-06 16:30:08
|
And add the std:: prefix to all standard library functions or add the line using namespace std; beforeusing them. Take a look at namespaces in some C++ book or tutorial. Mathias Lühr wrote: > Possibly, you have to include <iosream>. > > Mathias > > -----Ursprüngliche Nachricht----- > Von: Frédéric JOLY [mailto:Fre...@fo...] > Gesendet: Mittwoch, 6. August 2003 09:03 > An: dev...@li... > Betreff: [Dev-C++] dev cpp functions > > hello, > > i have a problem with i try to compile an example (hello), in DEV-C++ > i have 4 errors cout ,endl and cin : "first use of these function" > why ? > could you help me ?? > > > fj > > > |
|
From: nsrob <ns...@td...> - 2003-08-06 15:12:18
|
Hi all, I'm new to Dev and trying to get it configured to XP..I have edited = the path in myComp..properties..advanced..environmental settings.. and when trying to run the example "Hello" to test it I get this error Compiler: Default compiler Building Makefile: "C:\Dev-Cpp\Projects\Makefile.win" Executing make... make.exe -f "C:\Dev-Cpp\Projects\Makefile.win" all g++.exe -c main.cpp -o main.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" =20 'C:\DOCUME~1\Bob' is not recognized as an internal or external command, operable program or batch file. The system cannot find the path specified. make.exe: *** [main.o] Error 1 Execution terminated Apparently it still trying to access C\Documents & Settings as XP = usually does I'm missing something here.........Any HELP would be greatly appreciated Thanks=20 |
|
From: Per W. <pw...@ia...> - 2003-08-06 12:17:37
|
As Ioannis already mentioned, the important factor is if the compiler
knows the implementation of the function.
If the compiler has access to the code and can check that it returns a
constant value and doesn't have any side effects, it may - depending on
optimization settings etc - retrieve the end value before intering the
loop.
Whenever the compiler is in doublt, it has to assume that the function has
side effects or returns a nonconstant value, requiring the function to be
called - or the contents of the function to be inlined - for every
iteration of the loop.
/Per W
On Wed, 6 Aug 2003, OROSZI Bal=E1zs wrote:
> David McKen wrote:
> > Ok here is a test I tried on a OLD comp I have lying
> > around.
> >
> > System specifications:
> > 25Mhz 486 (no math co-processor)
> > 4Mb Ram
> > Compiled using the Pacific C compiler (djgpp runs WAY too
> > slow) using full
> > optimization.
> >
> > Program:
> > #include <stdio.h>
> > #include <time.h>
> >
> > long getint(void);
> >
> > int main()
> > {
> > time_t begin,end;
> > long i, get_int;
> >
> > begin =3D time(NULL);
> > for(i =3D 0; i < getint(); ++i);
> > end =3D time(NULL);
> > printf("Function call time taken =3D %i\n", end - begin);
> >
> > get_int =3D getint();
> > begin =3D time(NULL);
> > for(i =3D 0; i < get_int; ++i);
> > end =3D time(NULL);
> > printf("Varible buffer time taken =3D %i\n", end - begin);
> >
> > return 0;
> > }
> >
> > long getint(void)
> > {
> > return 50000000;
> > }
> >
> > Output:
> > Function call time taken =3D 40
> > Varible buffer time taken =3D 16
> >
> > Hope this helps.
>
> Thank you very much. Actually, I was also doing some benchmarks, and got
> the same result as you. However, that getint() function is not that
> simple :) It does something more complicated.
>
> Anyway, thanks for it.
>
> --
> Greetings,
> Bal=E1zs
>
>
>
> -------------------------------------------------------
> This SF.Net email sponsored by: Free pre-built ASP.NET sites including
> Data Reports, E-commerce, Portals, and Forums are available now.
> Download today and enter to win an XBOX or Visual Studio .NET.
> http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/=
01
> _______________________________________________
> 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: <or...@vp...> - 2003-08-06 11:53:03
|
David McKen wrote:
> Ok here is a test I tried on a OLD comp I have lying
> around.
>
> System specifications:
> 25Mhz 486 (no math co-processor)
> 4Mb Ram
> Compiled using the Pacific C compiler (djgpp runs WAY too
> slow) using full
> optimization.
>
> Program:
> #include <stdio.h>
> #include <time.h>
>
> long getint(void);
>
> int main()
> {
> time_t begin,end;
> long i, get_int;
>
> begin = time(NULL);
> for(i = 0; i < getint(); ++i);
> end = time(NULL);
> printf("Function call time taken = %i\n", end - begin);
>
> get_int = getint();
> begin = time(NULL);
> for(i = 0; i < get_int; ++i);
> end = time(NULL);
> printf("Varible buffer time taken = %i\n", end - begin);
>
> return 0;
> }
>
> long getint(void)
> {
> return 50000000;
> }
>
> Output:
> Function call time taken = 40
> Varible buffer time taken = 16
>
> Hope this helps.
Thank you very much. Actually, I was also doing some benchmarks, and got
the same result as you. However, that getint() function is not that
simple :) It does something more complicated.
Anyway, thanks for it.
--
Greetings,
Balázs
|
|
From: Luís B. <lf...@ya...> - 2003-08-06 11:32:31
|
--- David McKen <ci...@ya...> wrote:
> I like dos. Anyway I don't use it for everyday tasks. Only
> for doing some
> long calculation that I don't want to give my main system.
>
> Someone had asked wether it would be better to constantly
> re-call a function
> in a for loop or t copy the value to a varible and use that
> instead.
>
> The idea was to show the code running on an extremly slow
> system (with
> absolutely no bells and whistles) so a relatively decent
> comparison could be
> made. Besides, if I did not have this system I would have
> to make getint()
> return a much bigger number (most comps today go through
> 50,000,000 too fast
> for time() to give a different time reading)
>
> Who messed with my output? It is supposed to be:
> Function call time taken = 40
> Varible buffer time taken = 16
>
>
>
> ----- Original Message -----
> From: "Scott Simontis SIMONTIS" <age...@co...>
> To: <ci...@ya...>
> Sent: Tuesday, August 05, 2003 7:57 PM
> Subject: Re: [Dev-C++] loop optimization
>
>
> That is way too slow to use. I use a laptop with a Pentium
> MMX 180 MHz
> CPU, 24MB RAM, 1.5GB HD, and dev-cpp for my old computer.
> Consider
> never using that again.
>
> ~~Scott Simontis~~
> Programmer
>
> ----- Original Message -----
> From: David McKen <ci...@ya...>
> Date: Tuesday, August 5, 2003 7:44 pm
> Subject: Re: [Dev-C++] loop optimization
>
> > Ok here is a test I tried on a OLD comp I have lying
> > around.
> >
> > System specifications:
> > 25Mhz 486 (no math co-processor)
> > 4Mb Ram
> > Compiled using the Pacific C compiler (djgpp runs WAY too
> > slow) using full
> > optimization.
> >
> > Program:
> > #include <stdio.h>
> > #include <time.h>
> >
> > long getint(void);
> >
> > int main()
> > {
> > time_t begin,end;
> > long i, get_int;
> >
> > begin =time(NULL);
> > for(i =; i < getint(); ++i);
> > end =time(NULL);
> > printf("Function call time taken =i\n", end - begin);
> >
> > get_int =getint();
> > begin = time(NULL);
> > for(i =; i < get_int; ++i);
> > end = time(NULL);
> > printf("Varible buffer time taken =i\n", end - begin);
> >
> > return 0;
> > }
> >
> > long getint(void)
> > {
> > return 50000000;
> > }
> >
> > Output:
> > Function call time taken =0
> > Varible buffer time taken =6
> >
> > Hope this helps.
> >
> > ----- Original Message -----
> > From: "OROSZI Balázs" <or...@vp...>
> > To: <dev...@li...>
> > Sent: Tuesday, August 05, 2003 3:17 PM
> > Subject: Re: [Dev-C++] loop optimization
> >
> >
> > > Graham Douglas wrote:
> > > > Run the profiler to find out where the inefficiencies
> > are. In my
> > > > experience, any attempt to prejudge optimisation will
> > be wrong. The
> > > > inefficiencies are _never_ where you expect.
> > > >
> > > > The two fundamental rules for optimising by hand are:
> > > >
> > > > rule 1: don't do it.
> > > > rule 2: don't do it - yet.
> > >
> > > Thanks. Advice taken :)
> > >
> > > --
> > > Greetings,
> > > Balázs
> > >
> > >
>
>
> __________________________________
> Do you Yahoo!?
> Yahoo! SiteBuilder - Free, easy-to-use web site design software
> http://sitebuilder.yahoo.com
>
>
> -------------------------------------------------------
> This SF.Net email sponsored by: Free pre-built ASP.NET sites including
> Data Reports, E-commerce, Portals, and Forums are available now.
> Download today and enter to win an XBOX or Visual Studio .NET.
> http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
> _______________________________________________
> 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
#include <stdio.h>
#include <time.h>
long get_int( void )
{
return 50000000;
}
int main(int argc, char *argv[])
{
// Time variables.
time_t start_time, end_time, split_time;
long i, getint;
// Initialize clock
start_time = clock();
for ( i =1; i < get_int(); ++i);
// end time
end_time = clock();
//calculate split time
split_time = end_time - start_time;
printf( "+-+-+ Function Call time +-+-+\n" );
// write the time to console
printf( "Time: %5.3f secs.\n", (double)(split_time)/CLOCKS_PER_SEC );
getint = get_int();
// Initialize clock
start_time = clock();
for ( i =1; i < getint; ++i);
// end time
end_time = clock();
//calculate split time
split_time = end_time - start_time;
// write the time to console
printf( "+-+-+ Variable Buffer time +-+-+\n" );
printf( "Time: %5.3f secs.\n", (double)(split_time)/CLOCKS_PER_SEC );
// ... press any key
printf( "Press ENTER to continue...\n" );
getchar();
return 0;
}
output:
+-+-+ Function Call time +-+-+
Time: 0.540 secs.
+-+-+ Variable Buffer time +-+-+
Time: 0.481 secs.
Press ENTER to continue...
compiler:
Mingw version 3.2
GUI:
Dev-C++
Computer:
Pentium III 863MHz 128MM RAM
OS:
Microsoft Windows XP
Profissional
Version 2002
Service Pack 1
=====
+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=
Luís Filipe Delgado Brás
Eng.º Civil
Porto - Portugal
email: lf...@ya...
http://www.fotopt.net/autor.asp?autor=2637
+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=
__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com
|
|
From: Per W. <pw...@ia...> - 2003-08-06 11:30:17
|
Are you compiling a c++ program? The jpeg library is in C. Did you
remember to specify
extern "C" {
#include xxx
}
when including the jpeg include files?
As you can see, the linker doesn't just complain about
missing symbol _jpeg_std_error, but actually knows about what parameter
types the function takes. This is because your source code is trying to
call the jpeg functions in C++ mode, i.e. with name-mangled external
references.
/Per W
> Thanks for your reply!
>
> Your Message: (Sunday, August 03, 2003, 10:51:28 AM)
>
> OB> Dennis M=F6hlmann wrote:
>
> >> Oops, didn't know the linker can any other error messages than this =
one (never
> >> received a different error so far...)
> >>
> >> (hope this doesn't get wrapped...)
> >>
> >> g++.exe ../_obj/BlackMagic3D.o ../_obj/world.o ../_obj/entity.o ../_ob=
j/engine.o ../_obj/model.o ../_obj/winmsg.o ../_obj/viewport.o ../_obj/keyb=
oard.o ../_obj/renderer.o ../_obj/image.o -o
> >> "..\_exe\BlackMagic3D.exe" -L"C:/Programme/Dev-Cpp/lib" -mwindows -lop=
engl32 -lglu32 -lglaux -lwinmm -ljpeg
> >>
> >> ../_obj/image.o(.text+0x68e):image.cpp: undefined reference to `jpeg_s=
td_error(jpeg_error_mgr*)'
> >> ../_obj/image.o(.text+0x6ad):image.cpp: undefined reference to `jpeg_C=
reateDecompress(jpeg_decompress_struct*, int, unsigned)'
> >> ../_obj/image.o(.text+0x6c2):image.cpp: undefined reference to `jpeg_s=
tdio_src(jpeg_decompress_struct*, _iobuf*)'
> >> ../_obj/image.o(.text+0x6d6):image.cpp: undefined reference to `jpeg_r=
ead_header(jpeg_decompress_struct*, int)'
> >> ../_obj/image.o(.text+0x6e8):image.cpp: undefined reference to `jpeg_s=
tart_decompress(jpeg_decompress_struct*)'
> >> ../_obj/image.o(.text+0x7f0):image.cpp: undefined reference to `jpeg_r=
ead_scanlines(jpeg_decompress_struct*, unsigned char**, unsigned)'
> >> ../_obj/image.o(.text+0x828):image.cpp: undefined reference to `jpeg_f=
inish_decompress(jpeg_decompress_struct*)'
> >> ../_obj/image.o(.text+0x83a):image.cpp: undefined reference to `jpeg_d=
estroy_decompress(jpeg_decompress_struct*)'
>
> OB> Well, it sais, it has undefined references of jpeg functions.
> OB> I have no idea though why it has them, as the jpeg library has these
> OB> functions.
> OB> Maybe you should try to recompile the jpeg library from the code.
>
> OB> --
> OB> Greetings,
> OB> Bal=E1zs
>
> --
> Best regards,
> Dennis mailto:lis...@da...
>
>
>
>
> -------------------------------------------------------
> This SF.Net email sponsored by: Free pre-built ASP.NET sites including
> Data Reports, E-commerce, Portals, and Forums are available now.
> Download today and enter to win an XBOX or Visual Studio .NET.
> http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/=
01
> _______________________________________________
> 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: Per W. <pw...@ia...> - 2003-08-06 10:50:55
|
And possibly you forgot to write: std::cout std::endl std::cin or using std::cout; or using std; /Per W On Wed, 6 Aug 2003, Mathias L=FChr wrote: > Possibly, you have to include <iosream>. > > Mathias > > -----Urspr=FCngliche Nachricht----- > Von: Fr=E9d=E9ric JOLY [mailto:Fre...@fo...] > Gesendet: Mittwoch, 6. August 2003 09:03 > An: dev...@li... > Betreff: [Dev-C++] dev cpp functions > > > hello, > > i have a problem with i try to compile an example (hello), in DEV-C++ > i have 4 errors cout ,endl and cin : "first use of these function" > why ? > could you help me ?? > > > fj > > > > > |
|
From: David M. <ci...@ya...> - 2003-08-06 10:06:54
|
I like dos. Anyway I don't use it for everyday tasks. Only
for doing some
long calculation that I don't want to give my main system.
Someone had asked wether it would be better to constantly
re-call a function
in a for loop or t copy the value to a varible and use that
instead.
The idea was to show the code running on an extremly slow
system (with
absolutely no bells and whistles) so a relatively decent
comparison could be
made. Besides, if I did not have this system I would have
to make getint()
return a much bigger number (most comps today go through
50,000,000 too fast
for time() to give a different time reading)
Who messed with my output? It is supposed to be:
Function call time taken = 40
Varible buffer time taken = 16
----- Original Message -----
From: "Scott Simontis SIMONTIS" <age...@co...>
To: <ci...@ya...>
Sent: Tuesday, August 05, 2003 7:57 PM
Subject: Re: [Dev-C++] loop optimization
That is way too slow to use. I use a laptop with a Pentium
MMX 180 MHz
CPU, 24MB RAM, 1.5GB HD, and dev-cpp for my old computer.
Consider
never using that again.
~~Scott Simontis~~
Programmer
----- Original Message -----
From: David McKen <ci...@ya...>
Date: Tuesday, August 5, 2003 7:44 pm
Subject: Re: [Dev-C++] loop optimization
> Ok here is a test I tried on a OLD comp I have lying
> around.
>
> System specifications:
> 25Mhz 486 (no math co-processor)
> 4Mb Ram
> Compiled using the Pacific C compiler (djgpp runs WAY too
> slow) using full
> optimization.
>
> Program:
> #include <stdio.h>
> #include <time.h>
>
> long getint(void);
>
> int main()
> {
> time_t begin,end;
> long i, get_int;
>
> begin =time(NULL);
> for(i =; i < getint(); ++i);
> end =time(NULL);
> printf("Function call time taken =i\n", end - begin);
>
> get_int =getint();
> begin = time(NULL);
> for(i =; i < get_int; ++i);
> end = time(NULL);
> printf("Varible buffer time taken =i\n", end - begin);
>
> return 0;
> }
>
> long getint(void)
> {
> return 50000000;
> }
>
> Output:
> Function call time taken =0
> Varible buffer time taken =6
>
> Hope this helps.
>
> ----- Original Message -----
> From: "OROSZI Balázs" <or...@vp...>
> To: <dev...@li...>
> Sent: Tuesday, August 05, 2003 3:17 PM
> Subject: Re: [Dev-C++] loop optimization
>
>
> > Graham Douglas wrote:
> > > Run the profiler to find out where the inefficiencies
> are. In my
> > > experience, any attempt to prejudge optimisation will
> be wrong. The
> > > inefficiencies are _never_ where you expect.
> > >
> > > The two fundamental rules for optimising by hand are:
> > >
> > > rule 1: don't do it.
> > > rule 2: don't do it - yet.
> >
> > Thanks. Advice taken :)
> >
> > --
> > Greetings,
> > Balázs
> >
> >
__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com
|
|
From: <ri...@te...> - 2003-08-06 08:33:44
|
Luigi Santillo escribió: > Hello Ricardo, > > you have not specified which version of Dev-C++ your are using, > neither you tell about which profiling program you wish to use; > I will assume Dev-C++ 4.9.8.1 and gprof shipped with MinGW Gcc 3.2. Good assumption ;) > I tried myself to profile an application (using 4.9.8.1) and have > come to the conclusion that there is a bug in the options Dev-C++ > adds to the linker when you enable profiling. In fact, while it > does correctly pass the "-pg" option to the compiler, it does not > do so when linking, instead it passes the option "-lmon" (which > should mean: link against "libmon.a"), that seems useless here. Ok, well, I´m so still wondering why didn´t I take a look at the Compiler log. :( Just installed Dev-cpp 4.9.8.0 -got some problems when making a SDL 1.2.5 devpack, although finally it works! Dev-Cpp v4.9.8.0 DOES paas the -pg option to the linker. Actually profiling works flawless. But as you state, in 4.9.8.1 does not, so I also think it´s a bug. > Until the bug is fixed, a way to achieve profiling could be: > - avoid enabling the linker flags for profiling (so you won't have > the "-lmon" added to the linker flags) > - go to "Project"->"Project Options": "Parameters" tab and manually > add "-pg" to the linker flags > then, as usual, compile your application, run it (just one is enough > to create "gmon.out") and finally use "Execute->profile analysis". That was the same workaround I used, but I wanted to know if I was doing something wrong :) > If you need more information about profiling (with gprof), I suggest > reading the material found at the link: > > www.delorie.com/gnu/docs/binutils/gprof_toc.html Thanks for the link and help. Regards. -- --------------------------------------------------- Ricardo Amores Hernández ICQ: 19463735 MSN: zheo_ (at) hotmail (dot) es --------------------------------------------------- |
|
From: <lu...@iv...> - 2003-08-06 07:26:56
|
Possibly, you have to include <iosream>. =20 Mathias -----Urspr=FCngliche Nachricht----- Von: Fr=E9d=E9ric JOLY [mailto:Fre...@fo...] Gesendet: Mittwoch, 6. August 2003 09:03 An: dev...@li... Betreff: [Dev-C++] dev cpp functions hello, =20 i have a problem with i try to compile an example (hello), in DEV-C++ i have 4 errors cout ,endl and cin : "first use of these function" why ? could you help me ?? =20 =20 fj =20 |
|
From: <Fre...@fo...> - 2003-08-06 07:05:18
|
hello, i have a problem with i try to compile an example (hello), in DEV-C++ i have 4 errors cout ,endl and cin : "first use of these function" why ? could you help me ?? fj |
|
From: Luigi S. <gi...@li...> - 2003-08-06 04:40:59
|
On Sat, Aug 02, 2003 at 05:31:44PM +0200, Ricardo Amores Hern?ndez wrote:
> Hi
> How can i use the profiler in Dev C++ ? I check the correct linker
> options ('generate debug information' and 'generate profiling
> information' too) both in the proyect options and compiler options (just
> to make sure ;)
> But after building successfully my app I get the following messege when
> I choose "Profiler Analysis" from Compile Menu:
> "Please run the proyect at least once so that profiling info is
> generated..."
>
> And yes, I´ve run my proyect not once but n-times and i still get the error.
> [...]
Hello Ricardo,
you have not specified which version of Dev-C++ your are using,
neither you tell about which profiling program you wish to use;
I will assume Dev-C++ 4.9.8.1 and gprof shipped with MinGW Gcc 3.2.
I tried myself to profile an application (using 4.9.8.1) and have
come to the conclusion that there is a bug in the options Dev-C++
adds to the linker when you enable profiling. In fact, while it
does correctly pass the "-pg" option to the compiler, it does not
do so when linking, instead it passes the option "-lmon" (which
should mean: link against "libmon.a"), that seems useless here.
Now, when you run the executable generated by Dev-C++, the call
graph profile file ("gmon.out") is not created. This, I think, is
the reason why Dev-C++ keeps asking you to run your application over
and over again, as you try to profile it.
Until the bug is fixed, a way to achieve profiling could be:
- avoid enabling the linker flags for profiling (so you won't have
the "-lmon" added to the linker flags)
- go to "Project"->"Project Options": "Parameters" tab and manually
add "-pg" to the linker flags
then, as usual, compile your application, run it (just one is enough
to create "gmon.out") and finally use "Execute->profile analysis".
If you need more information about profiling (with gprof), I suggest
reading the material found at the link:
www.delorie.com/gnu/docs/binutils/gprof_toc.html
Regards
--
>> gisan >>
P.S. I don't remember if there is a specif address for bug reports,
I hope the list will let me know it, so that I can forward this
message; in the meanwhile, I hope the authors of Dev-C++ monitor
this list.
|
|
From: Michael D. S. <for...@hi...> - 2003-08-06 03:52:55
|
I've been using Dev-C++ for a few days. I've written one program. I managed to translate an old PERL program after changing it considerably because of the stuff that's easy in PERL and almost impossible in C++ -- @array = <FH>; for instance. Now I know why Larry Wall sometimes calls it "magic" :) I used the GUI on DEV -- The Compile -- Execute buttons. The program is simple and (probably:) ANSI so it was suggested I use gcc to keep from having to compile a UNIX and Window's version. If it's ANSI what difference does the compiler make? Which compiler am I using when I use the GUI on DEV? (The Compile -- Execute buttons) Attempting to use gcc, I opened a DOS window (command line) and working from within the C:\Dev-C++\ bin directory for the moment to make things easier, I tried to compile the source using gcc. It can't find the header files fstream.h and string but it seemed to like stdlib OK. I copied them into the same directory. Still can't find them. I thought it always searched the current directory? Does gcc have a problem with some header files? Once again, any thoughts, discussions to clear the fog a little will be appreciated. ms Half the people you know are below average 99% of lawyers give the rest a bad name 42.7% of all statistics are made up on the spot |
|
From: David M. <ci...@ya...> - 2003-08-05 23:44:21
|
Ok here is a test I tried on a OLD comp I have lying
around.
System specifications:
25Mhz 486 (no math co-processor)
4Mb Ram
Compiled using the Pacific C compiler (djgpp runs WAY too
slow) using full
optimization.
Program:
#include <stdio.h>
#include <time.h>
long getint(void);
int main()
{
time_t begin,end;
long i, get_int;
begin = time(NULL);
for(i = 0; i < getint(); ++i);
end = time(NULL);
printf("Function call time taken = %i\n", end - begin);
get_int = getint();
begin = time(NULL);
for(i = 0; i < get_int; ++i);
end = time(NULL);
printf("Varible buffer time taken = %i\n", end - begin);
return 0;
}
long getint(void)
{
return 50000000;
}
Output:
Function call time taken = 40
Varible buffer time taken = 16
Hope this helps.
----- Original Message -----
From: "OROSZI Balázs" <or...@vp...>
To: <dev...@li...>
Sent: Tuesday, August 05, 2003 3:17 PM
Subject: Re: [Dev-C++] loop optimization
> Graham Douglas wrote:
> > Run the profiler to find out where the inefficiencies
are. In my
> > experience, any attempt to prejudge optimisation will
be wrong. The
> > inefficiencies are _never_ where you expect.
> >
> > The two fundamental rules for optimising by hand are:
> >
> > rule 1: don't do it.
> > rule 2: don't do it - yet.
>
> Thanks. Advice taken :)
>
> --
> Greetings,
> Balázs
>
>
>
> -------------------------------------------------------
> This SF.Net email sponsored by: Free pre-built ASP.NET
sites including
> Data Reports, E-commerce, Portals, and Forums are
available now.
> Download today and enter to win an XBOX or Visual Studio
.NET.
>
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
> _______________________________________________
> 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!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com
|
|
From: lamont n. <lam...@ve...> - 2003-08-05 23:16:40
|
I would also suggest picking up a book on the subject. The one that I have is: Win32 Multithreaded Programming, http://www.amazon.com/exec/obidos/tg/detail/-/1565922964/qid=1060125344/ sr=1-1/ref=sr_1_1/103-2948163-7295023?v=glance&s=books ------------------------- Hello Thank you again for answering my question even the strangest ones :) Anyway, I am almost giving up in this compilation thing and thinking of going back to my old linux machine with the nice g++. It seems that the system (ARIA) works only for visual C++ 6.0 if in windows. So I tried to cheat the compiler into making it think we were in linux to see what happens. Then it said that several files are missing. Is Multithread supported by Dev C++?? Where are the multithread libraries?? ------------------------- |
|
From: lamont n. <lam...@ve...> - 2003-08-05 23:11:46
|
The C++ standard does not address the issue of multi-threading. Therefore you would have to use an API which is most likely supplied by your operating system. If you are using windows try looking here to start: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dndllpr o/html/msdn_threads.asp Then find the API reference for the functions mentioned in that article. The same thing applies with UNIX except the API would be different. ------------------------- Hello Thank you again for answering my question even the strangest ones :) Anyway, I am almost giving up in this compilation thing and thinking of going back to my old linux machine with the nice g++. It seems that the system (ARIA) works only for visual C++ 6.0 if in windows. So I tried to cheat the compiler into making it think we were in linux to see what happens. Then it said that several files are missing. Is Multithread supported by Dev C++?? Where are the multithread libraries?? ------------------------- |
|
From: David M. <ci...@ya...> - 2003-08-05 23:04:52
|
Talking bigger than long int. I am doing some math processing and would like either some example code or a library. Together with a int (or some other data type for the exponent) it will also give me a very high precision floating point data type. ----- Original Message ----- From: "Scott Simontis SIMONTIS" <age...@co...> To: <ci...@ya...> Sent: Tuesday, August 05, 2003 1:46 PM Subject: Re: [Dev-C++] How do I store HUGE numbers. > long int is my way. > > ~~Scott Simontis~~ > Programmer > > ----- Original Message ----- > From: David McKen <ci...@ya...> > Date: Tuesday, August 5, 2003 1:06 pm > Subject: [Dev-C++] How do I store HUGE numbers. > > > OK boy and girls. > > > > Other than allocating a block of memory and interpreting > > each of the bits myself how can I store really big numbers > > (Let's stick with integers for now) in memory. > > > > Signed > > David Mcken > > > > P.S. Also for any of you looking for job security. > > http://mindprod.com/unmain.html - How To Write > > Unmaintainable Code > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site design software > > http://sitebuilder.yahoo.com > > > > > > ------------------------------------------------------- > > This SF.Net email sponsored by: Free pre-built ASP.NET sites > including > > Data Reports, E-commerce, Portals, and Forums are available now. > > Download today and enter to win an XBOX or Visual Studio .NET. > > http://aspnet.click- > > > url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01________________ > _______________________________ > > 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! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com |
|
From: David M. <ci...@ya...> - 2003-08-05 22:57:43
|
----- Original Message ----- From: "OROSZI Balázs" <or...@vp...> To: <dev...@li...> Sent: Tuesday, August 05, 2003 6:45 AM Subject: Re: [Dev-C++] Thanks and Another question (windows/linux) > Pukara Rob wrote: > > Anyway, I am almost giving up in this compilation thing and thinking of > > going back to my old linux machine with the nice g++. It seems that the > > system (ARIA) works only for visual C++ 6.0 if in windows. So I tried to > > cheat the compiler into making it think we were in linux to see what > > happens. Then it said that several files are missing. > > What exactly are the errors you get, if you use the system as intended > (I mean for Windows). Why do you think it only works with VC++? What are > the errors? > > > Is Multithread supported by Dev C++?? Where are the multithread libraries?? > > I don't know about this one. Compiler flag -mthread (if that one does not work try -mthreads) > > > > By the way what "import function of dev"? > > It is in File->Import, which allows you to import (convert) VC++ 6 > project files to Dev-C++ ones. Although, most of the time, you still > need to clean up the result, but it does most of the work for you. > > -- > Greetings, > Balázs __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com |
|
From: <or...@vp...> - 2003-08-05 19:17:19
|
Graham Douglas wrote: > Run the profiler to find out where the inefficiencies are. In my > experience, any attempt to prejudge optimisation will be wrong. The > inefficiencies are _never_ where you expect. > > The two fundamental rules for optimising by hand are: > > rule 1: don't do it. > rule 2: don't do it - yet. Thanks. Advice taken :) -- Greetings, Balázs |
|
From: <or...@vp...> - 2003-08-05 19:14:50
|
Avik Ghose wrote: > thanks a lot! You should read the second answer too, as it was more precise. -- Greetings, Balázs |
|
From: Ioannis V. <iv...@em...> - 2003-08-05 18:46:58
|
> -----Original Message----- > From: dev...@li... > [mailto:dev...@li...] On Behalf > Of David McKen > Sent: Tuesday, August 05, 2003 8:06 PM > To: Dev-C++ Users Mailing List > Subject: [Dev-C++] How do I store HUGE numbers. > > > OK boy and girls. > > Other than allocating a block of memory and interpreting > each of the bits myself how can I store really big numbers > (Let's stick with integers for now) in memory. In C++ it is easy, you can create a beautiful class, with defined operator<<(const ostream &, const yout_class &), operator int() etc. In C you will have to make a struct with accompanying access functions. > Signed > David Mcken > > P.S. Also for any of you looking for job security. > http://mindprod.com/unmain.html - How To Write > Unmaintainable Code Hehe, the above is cool. Ioannis Vranos * Programming pages: http://www.noicys.freeurl.com * Alternative URL 1: http://run.to/noicys * Alternative URL 2: http://www.noicys.cjb.net |
|
From: Graham D. <g.d...@nt...> - 2003-08-05 18:43:33
|
Run the profiler to find out where the inefficiencies are. In my
experience, any attempt to prejudge optimisation will be wrong. The
inefficiencies are _never_ where you expect.
The two fundamental rules for optimising by hand are:
rule 1: don't do it.
rule 2: don't do it - yet.
OROSZI Balázs wrote:
> Hi!
>
> Now, I have a question.
> I need to do heavy optimizations in the project I am working on, and I
> am asking you, whether will I gain any speedup by optimizing loops. I
> am interested in the for loop exactly. Let's take this example:
>
> for(i=0;i<getint();i++){
> /* ... */
> }
>
> Would it worth it to take that getint() into an outer variable, and
> only use that in the conditional, like this:
>
> int c = getint();
> for(i=0;i<c;i++){
> /* ... */
> }
>
> Will this give me any speedup? I am interested in particular, is for
> going to call getint() EVERY time in the first case (on top), or will
> it do it only once? I think the second case is better, am I right?
>
> Allright, that was my first question, here is the second:
> What is the case, if the conditional is a KNOWN value. Something, like
> a macro. Here is the example:
>
> #define GETINT (10*5)
>
> for(i=0;i<GETINT;i++){
> /* ... */
> }
>
> I suppose, this will be optimised by the compiler, and this can even
> be unrolled, am I right?
>
> Thanks in advance.
> --
> Greetings,
> Balázs
>
>
>
> -------------------------------------------------------
> This SF.Net email sponsored by: Free pre-built ASP.NET sites including
> Data Reports, E-commerce, Portals, and Forums are available now.
> Download today and enter to win an XBOX or Visual Studio .NET.
> http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
>
> _______________________________________________
> 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: Graham D. <g.d...@nt...> - 2003-08-05 18:36:46
|
From the standard, section 16.2
1. A #include directive shall identify a header or source file that
can be processed by the implementation.
2. A preprocessing directive of the form # include
<hcharsequence> newline searches a sequence of implementation
defined places for a header identified uniquely by the
specifiedsequence between the < and > delimiters, and causes the
replacement of that directive by the entire contentsof the header.
How the places are specified or the header identified is
implementation defined.
3. A preprocessing directive of the form # include
"qcharsequence" newline causes the replacement of that
directive by the entire contents of the source file identified by
the specified sequence between the " delimiters. The named source
file is searched for in an implementationdefined manner. If this
search is not supported, or if the search fails, the directive is
reprocessed as if it read # include <hcharsequence> newline
with the identical contained sequence (including > characters,
if any) from the original directive.
In other words, the <> form looks in system-specified places, whereas
the "" form looks in a (possibly) different set of system specified
places then, if that doesn't locate the file, it looks in the same
places as <> would have looked.
In practical terms, <> looks in the system include directory, whereas ""
looks in the directory containing the file being compiled, _then_ looks
in the system include directory.
Avik Ghose wrote:
> Hi all,
> I have this slight confusion regarding how the two are different.
> #include <foo.h>
> #include "foo.h"
> I mean how does GNU make and gcc differentiate while searching for the
> include file in both the cases.
> Thanks in advance.
> Have a nice day!
>
>
>
> Thanx and Regards
> Avik Ghose
>
> *SMS* <http://in.mobile.yahoo.com/new/pc/> using the Yahoo!
> *Messenger* <http://in.mobile.yahoo.com/new/pc/>*;* *Download
> <http://in.messenger.yahoo.com/>* latest version.
>
|