dev-cpp-users Mailing List for Dev-C++ (Page 330)
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: yiwei l. <liy...@ho...> - 2003-08-15 16:50:54
|
<html><div style='background-color:'><DIV> <P><BR>hihi is there anyone here know how to change the background color of where you run the programme (not the text color). Thanks<BR></P></DIV></div><br clear=all><hr>Get <a href="http://g.msn.com/8HMNENSG/2731??PS=">free gift vouchers every week</a> with MSN Premium Vouchers</html> |
|
From: <or...@vp...> - 2003-08-15 13:57:38
|
David McKen wrote: > Well you hit the nail on the head. > > I have tried CrystalSpace and to say the least I was > confused out of my > skull. As for all those DLLs, from what I did understand > CrystalSpace uses a > plugin system (i.e. it only loads the sections of code it > needs). So I > probably won't need to worry about all the DLLs just those > that have what I > want. Exactly. Actually, as time passed, the plugin system became more and more complicated. Their plugin system is now called SCF, the Shared Class Facility. It is something like a simplified version of COM. In CS, everything is a plugin: the canvas, where the renderer draws, the engine, the map loader, everything. They are all (should be) independent - more or less. However, CS has some core static libraries: for math stuff, OS specific stuff, etc. And there is a huge design flaw in it: there are about 5-6 static libs, and some of them have cross-references. That is: libcssys needs libcsutil, and vice versa. That is a HUGE design flaw. And CS's too much modularity, and flexibility makes it a bit jelly-like: you can't easily get it to stand stable. CS is not the best if you look at it from a "3D engine" perspective. It is more like a "3D operating system". Or just an "operating layer - and some 3D" :) And I think this is why it goes too slow. There are always redesigns, rewrites, re... Even now, core things are redesigned, rewritten, etc. (Bad design) This takes a lot of time, and slows down the project a lot. You know, it was started in 1997!!!! That's 6 years already. SIX! And there's NeoEngine for example, which is only 1 and a half (maybe 2) years old, and it is already better than CS. If you need a look of CS, look at PlaneShift: http://www.planeshift.it Well, I ranted enough of CS. Now lets point some strenghts of it: 1. The new renderer As I said, if it is ready, it will be awesome. But when??? 2. Plugin design After all, this plugin design allows decent flexibility, and it is well documented, but not too easy to understand. 3. Portals and sectors Yes, CS has decent portal support, which allows you to do many tricks, like and endless stairway up, etc. Portals support space warping. Sectors and portals are hard to understand, but once you get it, you'll have a powerful tool in your hands. 4. Documentation The whole engine is very well documented, and there are many-many tutorials, which makes the complicated start somewhat easier. 5. Software renderer It has a software renderer, however it is nowhere near UT's software renderer, but it is good nevertheless - if you need it (I think you don't :) Well, I said what I learned so far in my CS career :) Good luck! -- Greetings, Balázs |
|
From: David M. <ci...@ya...> - 2003-08-15 08:46:38
|
Well you hit the nail on the head. I have tried CrystalSpace and to say the least I was confused out of my skull. As for all those DLLs, from what I did understand CrystalSpace uses a plugin system (i.e. it only loads the sections of code it needs). So I probably won't need to worry about all the DLLs just those that have what I want. I will check out the other libraries and get back to you with my decision. If anyone else has any suggestions, Please feel free to give it. Sincerly David Mcken ----- Original Message ----- From: "OROSZI Balázs" <or...@vp...> To: <dev...@li...> Sent: Thursday, August 14, 2003 11:48 AM Subject: Re: [Dev-C++] (no subject) > Hi! > > A few more things I left out: > PlaneShift in fact runs on Mac, but it is slow. That's why I said, > you'll likely have problems. However, when then new renderer is ready, > it WILL rock! The new renderer is really cool, but I'm afraid, that it > will get ready too late. Also, even if it is ready, the whole CS will > need to be ported to it, so that will take again some time. I was very > fond of CS, I watched it's progress for 3 years by now, and I liked it > very much. Until last month, when I accidentally found NeoEngine :) > > And one more thing about NeoEngine: it has a modern engine design, with > vertex buffer locking, and such. It is also not big (compared to CS or > OGRE) and compiles quickly. > > Well, that's all. > > -- > 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!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com |
|
From: David M. <ci...@ya...> - 2003-08-15 08:44:41
|
Hmm, it works fine for me.
I tried a few changes to your main() which follow:
int main(int argc, char* argv[])
{
argv[0] = "dc";
argv[1] = "rate = 2.5; distance = rate * 5;";
argc = 2;
switch (argc) {
case 1:
input = &cin ;
break;
case 2:
//Modified
input = new istringstream(argv[1]);
if(input == NULL) {
cout << "Error with new" << endl;
return 1;
}
if(!input->good()) {
cout << "Stringstream not created properly" <<
endl;
}
break;
default:
error("too many arguements");
return 1;
}
table ["pi"] = 3.1415926535897932385;
table ["e"] = 2.718281828459042354;
while (*input) {
get_token();
if (curr_tok == END) break;
if (curr_tok == PRINT) continue;
cout << expr(false) << '\n';
}
if (input != cin) {
//Modified
cout << "About to delete input" << endl;
delete input;
}
//Modified
system("PAUSE");
return no_of_errors;
}
My only other change is instead of including
#include <strstream>
I included
#include <sstream>
Your code should work fine though. All I did was do some
error checking to
see if something is going wrong before we reach the delete.
----- Original Message -----
From: "Dawood Vora" <da...@ku...>
To: "Dev C++" <dev...@li...>
Sent: Thursday, August 14, 2003 8:39 PM
Subject: [Dev-C++] delete statement gives segmentation
fault error
> Hello every body,
> below is a straight code from Stroustrup's classic. I am
running
> bloodshed DEV-C++. At the end, it is trying to delete the
object "input"
> using delete statement. It straightaway gives me invalid
memory or
> segmentation fault error. Also, if I comment the delete
statement, the
> code works fine as it should be. Actually it happens,
only when I try to
> pass the command line arguement. As u all know, it is the
famous
calculator
> example from the 6th chapter of the book. Right now, I
am in the 6th
> chapter, so I do not have a very good idea about new and
delete
> statements. According to me the code should work, as we
are trying to
> delete the object we explicitly created.
>
> #include <iostream>
> #include <string>
> #include <map>
> #include <cctype>
> #include <strstream>
>
> enum Token_value{
> NAME, NUMBER,END,
> PLUS = '+',MINUS = '-', MUL = '*', DIV = '/',
> PRINT = ';', ASSIGN = '=', LP = '(', RP = ')'
> };
>
> Token_value curr_tok = PRINT;
>
> double number_value;
> string string_value;
> istream* input;
>
>
> int no_of_errors;
> double error(const string& s) {
> no_of_errors++;
> cerr<<"error: "<<s<<'\n';
> return 1;
> }
>
> Token_value get_token() {
> char ch;
> do { // skip whitespace except \n
> if (!((*input).get(ch))) return curr_tok = END;
> } while (ch!= '\n' && isspace(ch));
>
> switch (ch) {
> case ';':
> case '\n':
> return curr_tok = PRINT;
> case '*':
> case '/':
> case '+':
> case '-':
> case '(':
> case ')':
> case '=':
> return curr_tok = Token_value(ch);
>
> case '0':
> case '1':
> case '2':
> case '3':
> case '4':
> case '5':
> case '6':
> case '7':
> case '8':
> case '9':
> case '.':
> (*input).putback(ch);
> (*input)>> number_value;
> return curr_tok = NUMBER;
> default:
> if (isalpha(ch)) {
> string_value = ch;
> while ((*input).get(ch) && isalnum(ch))
> string_value+=ch;
> (*input).putback(ch);
> return curr_tok = NAME;
> }
> error ("bad token");
> return curr_tok = PRINT;
> }
> }
>
> //------------------------------------------------
prim(bool get)
> double expr(bool);
> map<string,double>table;
>
> double prim(bool get) { // handle primaries
> if (get) get_token();
>
> switch(curr_tok){
> case NUMBER: //floating point constant
> {
> double v = number_value;
> get_token();
> return v;
> }
> case NAME:
> {
> double& v = table[string_value];
> if (get_token() == ASSIGN)
> v = expr(true);
> return v;
> }
> case MINUS: // unary minus
> cout<<"reading negative number\n";
> return -prim(true);
> case LP:
> {
> double e = expr(true);
> if (curr_tok != RP) return error("')' expected");
> get_token(); //eat ')'
> return e;
> }
> default:
> return error ("primary expected");
> }
> }
>
> //------------------------------------------------
term(bool get)
> double term(bool get){ // multiply and divide
> double left = prim(get);
>
> for (;;)
> switch (curr_tok) {
> case MUL:
> left *= prim(true);
> break;
> case DIV:
> if (double d = prim(true)) {
> left /= d;
> break;
> }
> return error("divide by zero");
> default:
> return left;
> }
> }
>
> //------------------------------------------------
expr(bool get)
> double expr(bool get) { // add and subtract
> double left = term(get);
>
> for(;;) //forever
> switch (curr_tok) {
> case PLUS:
> left += term(true);
> break;
> case MINUS:
> left -= term(true);
> break;
> default:
> return left;
> }
> }
>
>
> int main(int argc, char* argv[])
> {
> argv[0] = "dc";
> argv[1] = "rate = 2.5; distance = rate * 5;";
> argc = 2;
> switch (argc) {
> case 1:
> input = &cin ;
> break;
> case 2:
> input = new istrstream(argv[1]);
> break;
> default:
> error("too many arguements");
> return 1;
> }
> table ["pi"] = 3.1415926535897932385;
> table ["e"] = 2.718281828459042354;
>
> while (*input) {
> get_token();
> if (curr_tok == END) break;
> if (curr_tok == PRINT) continue;
> cout << expr(false) << '\n';
> }
>
> if (input != cin) delete input;
> return no_of_errors;
>
> system("PAUSE");
> return 0;
> }
>
>
>
> -------------------------------------------------------
> 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: Dawood V. <da...@ku...> - 2003-08-15 00:44:36
|
Hello every body,
below is a straight code from Stroustrup's classic. I am running
bloodshed DEV-C++. At the end, it is trying to delete the object "input"
using delete statement. It straightaway gives me invalid memory or
segmentation fault error. Also, if I comment the delete statement, the
code works fine as it should be. Actually it happens, only when I try to
pass the command line arguement. As u all know, it is the famous calculator
example from the 6th chapter of the book. Right now, I am in the 6th
chapter, so I do not have a very good idea about new and delete
statements. According to me the code should work, as we are trying to
delete the object we explicitly created.
#include <iostream>
#include <string>
#include <map>
#include <cctype>
#include <strstream>
enum Token_value{
NAME, NUMBER,END,
PLUS = '+',MINUS = '-', MUL = '*', DIV = '/',
PRINT = ';', ASSIGN = '=', LP = '(', RP = ')'
};
Token_value curr_tok = PRINT;
double number_value;
string string_value;
istream* input;
int no_of_errors;
double error(const string& s) {
no_of_errors++;
cerr<<"error: "<<s<<'\n';
return 1;
}
Token_value get_token() {
char ch;
do { // skip whitespace except \n
if (!((*input).get(ch))) return curr_tok = END;
} while (ch!= '\n' && isspace(ch));
switch (ch) {
case ';':
case '\n':
return curr_tok = PRINT;
case '*':
case '/':
case '+':
case '-':
case '(':
case ')':
case '=':
return curr_tok = Token_value(ch);
case '0':
case '1':
case '2':
case '3':
case '4':
case '5':
case '6':
case '7':
case '8':
case '9':
case '.':
(*input).putback(ch);
(*input)>> number_value;
return curr_tok = NUMBER;
default:
if (isalpha(ch)) {
string_value = ch;
while ((*input).get(ch) && isalnum(ch))
string_value+=ch;
(*input).putback(ch);
return curr_tok = NAME;
}
error ("bad token");
return curr_tok = PRINT;
}
}
//------------------------------------------------ prim(bool get)
double expr(bool);
map<string,double>table;
double prim(bool get) { // handle primaries
if (get) get_token();
switch(curr_tok){
case NUMBER: //floating point constant
{
double v = number_value;
get_token();
return v;
}
case NAME:
{
double& v = table[string_value];
if (get_token() == ASSIGN)
v = expr(true);
return v;
}
case MINUS: // unary minus
cout<<"reading negative number\n";
return -prim(true);
case LP:
{
double e = expr(true);
if (curr_tok != RP) return error("')' expected");
get_token(); //eat ')'
return e;
}
default:
return error ("primary expected");
}
}
//------------------------------------------------ term(bool get)
double term(bool get){ // multiply and divide
double left = prim(get);
for (;;)
switch (curr_tok) {
case MUL:
left *= prim(true);
break;
case DIV:
if (double d = prim(true)) {
left /= d;
break;
}
return error("divide by zero");
default:
return left;
}
}
//------------------------------------------------ expr(bool get)
double expr(bool get) { // add and subtract
double left = term(get);
for(;;) //forever
switch (curr_tok) {
case PLUS:
left += term(true);
break;
case MINUS:
left -= term(true);
break;
default:
return left;
}
}
int main(int argc, char* argv[])
{
argv[0] = "dc";
argv[1] = "rate = 2.5; distance = rate * 5;";
argc = 2;
switch (argc) {
case 1:
input = &cin ;
break;
case 2:
input = new istrstream(argv[1]);
break;
default:
error("too many arguements");
return 1;
}
table ["pi"] = 3.1415926535897932385;
table ["e"] = 2.718281828459042354;
while (*input) {
get_token();
if (curr_tok == END) break;
if (curr_tok == PRINT) continue;
cout << expr(false) << '\n';
}
if (input != cin) delete input;
return no_of_errors;
system("PAUSE");
return 0;
}
|
|
From: Jean-Eric C. <je...@rp...> - 2003-08-14 16:21:16
|
Hi, I'd like to pass params that contains commas to a macro. But the macro processor think that the passed param is 2 parts (separated by the inner macro). It's normal, but not what I want... Is there a way to do it differently? Thanks -jec #define MACRO_PARAM_1 <class First,class Second> #define MACRO_PARAM_2 Fn_Pair<First,Second> FN_DEFINE_TEMPLATE_CLASS_METHODS( MACRO_PARAM_1, MACRO_PARAM_2, Fn_Kind, Fn_Pair_CLASS_ID ); That doesn't work. gcc says that FN_DEFINE_TEMPLATE_CLASS_METHODS requires 4 parameters and that 6 are passed! -- Jean-Eric Cuendet Riskpro Technologies SA Av du 14 avril 1b, 1020 Renens Switzerland Principal: +41 21 637 0110 Fax: +41 21 637 01 11 Direct: +41 21 637 0123 E-mail: jea...@rp... http://www.rptec.ch -------------------------------------------------------- |
|
From: <or...@vp...> - 2003-08-14 15:51:18
|
Hi! A few more things I left out: PlaneShift in fact runs on Mac, but it is slow. That's why I said, you'll likely have problems. However, when then new renderer is ready, it WILL rock! The new renderer is really cool, but I'm afraid, that it will get ready too late. Also, even if it is ready, the whole CS will need to be ported to it, so that will take again some time. I was very fond of CS, I watched it's progress for 3 years by now, and I liked it very much. Until last month, when I accidentally found NeoEngine :) And one more thing about NeoEngine: it has a modern engine design, with vertex buffer locking, and such. It is also not big (compared to CS or OGRE) and compiles quickly. Well, that's all. -- Greetings, Balázs |
|
From: <or...@vp...> - 2003-08-14 09:47:30
|
David McKen wrote: > Does anyone have a suggestion for a good 3d library, > requirements are listed > below: > 1. Must be portable to at least Windows and X server (that > includes Mac OS > X). > 2. OpenGL support (well DirectX won't work on anything that > is not windows). > 3. TCP/UDP socket support. > > CrystalSpace seems to be my best choice. Any other > suggestions? Well, CS has problems with Mac OS, as far as I know, as PlaneShift (the largest CrystalSpace project) doesn't run on it. So you'll likely have problems there. Also, Crystal Space doesn't have any Dev-C++ project files, but it can be compiled with MinGW. However, the compilation process is not the simplest I've seen. And CS tends to have lots of bugs, and goes on very slowly. They say, that the "new renderer" will be ready in June. Well, it has already passed, and they are nowhere near ready with it. The current OpenGL renderer is slow, and doesn't support shaders at all. The engine's design is good, but there are LOTS of unimplemented things. It wants to be extensible, and flexible, but it actually isn't. It's plugin system makes it VERY bloated, as everything is a plugin. Even if you make a new mesh type, it will be a different plugin. There are currently 122 (!) DLLs in my root CS dir, and that is too much I think. Also, they are not regular DLLs. CS doesn't have a native editor, however there are many exporters. Has a map2cs converter, that converts .map files to CS maps. CS has network support. Another choice might be OGRE - http://ogre.sf.net Howevever, you can only develop with OGRE in MSVC for Windows, don't know about Mac. Dev-C++ is not supported (doesn't compile with MinGW). You might take a look at NeoEngine - http://neoengine.sf.net I currently prefer that, as it is simple, very easy to use, rapidly evolving, it is also extensible, has Dev-C++ support (has project files) and runs on Mac. It has a very efficient chunked file format. Physics support is currently added. NeoEngine also supports vertex and fragment programs. I like NeoEngine, because it is easy to use. I recommend this one. There is only one problem with it: documentation. There are almost none :) - just joking. There are 8 tutorials, a Wiki, and the forums. And doxygen of course. I don't know about network support, but I saw it has some. It is titled a game engine after all, so it surely has UDP. I hope this helps. Tell me your decision. -- Greetings, Balázs |
|
From: <or...@vp...> - 2003-08-14 09:37:09
|
Pavel Tomáško wrote: > Please, > How can I use common conrtols in Win GUI Application in Dev C++ ? When I add > '#include <commctrl.h>' to the begin of source file and try to call > 'InitCommonControls()', error code > > ' [Linker error] undefined reference to InitCommonControls@0 ' > > appears. I tried to add the 'libcomctl32.a' to the project (Prject/Project > Options/Parameters/Add Library or Object), but then linker said > > ' ../../lib/libcomctl32.a C:\DEV-CPP\mingw32\bin\ld.exe file format not > recognized; treating as linker script' > '1 C:\DEV-CPP\mingw32\bin\lib\libcomctl32.a parse error'. > > What should I do to correct this ? I thank for every response. In Dev-C++ (actually, in GCC, the compiler in Dev-C++), you have to add libraries in the form: -l<libname>, if a library is named like this: lib<libname>.a So add -lcomctl32 to your linker settings. However, it seems more likely that you have a corrupted library. Download the win32 runtime from http://www.mingw.org. You need the headers and the import libraries. -- Greetings, Balázs |
|
From: <ri...@te...> - 2003-08-14 08:38:23
|
Thanks both of you, i didn´t take care of the () :/
--
---------------------------------------------------
Ricardo Amores Hernández
ICQ: 19463735
MSN: zheo_ (at) hotmail (dot) es
---------------------------------------------------
|
|
From: David M. <ci...@ya...> - 2003-08-14 02:15:57
|
Does anyone have a suggestion for a good 3d library, requirements are listed below: 1. Must be portable to at least Windows and X server (that includes Mac OS X). 2. OpenGL support (well DirectX won't work on anything that is not windows). 3. TCP/UDP socket support. CrystalSpace seems to be my best choice. Any other suggestions? __________________________________ Do you Yahoo!? The New Yahoo! Search - Faster. Easier. Bingo. http://search.yahoo.com |
|
From: w.y. <yok...@ve...> - 2003-08-14 01:41:23
|
Thanks to all who replied. I understand now. :) |
|
From: w.y. <yok...@ve...> - 2003-08-14 00:32:54
|
Zheo wrote: > > ptr1 = (A*) std::malloc( sizeof (*ptr1) ); You don't need std:: for malloc. Also you should use sizeof(A) instead. ptr1 = (A*) malloc( sizeof (A) ); > > ptr1 = static_cast<A*> std::malloc( sizeof (*ptr1) ); > You are missing () around the thing to be casted. ptr1 = static_cast<A*> ( malloc(sizeof(A)) ); Your other example here has them: > int* p = static_cast<int*>(malloc(100)) ; // new allocation used as ints |
|
From: Ioannis V. <iv...@em...> - 2003-08-14 00:16:35
|
> -----Original Message----- > From: dev...@li... > [mailto:dev...@li...] On Behalf Of Zheo > Sent: Thursday, August 14, 2003 2:15 AM > To: Lista de correo de Dev-c++ > Subject: [Dev-C++] problem with static casting (C++) > > In the line: (where ptr1 is a pointer to datatype A) > > ptr1 = (A*) std::malloc( sizeof (*ptr1) ); > > I MUST use a C-style casting, and if I try > > ptr1 = static_cast<A*> std::malloc( sizeof (*ptr1) ); ptr1 = static_cast<A*> (std::malloc( sizeof (*ptr1) ) ); 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: Zheo <zh...@ho...> - 2003-08-13 23:15:26
|
I´have wrote an example to show the differences between malloc and new
(in fact, just to show that new calls constructors and malloc does not):
#include <iostream>
#include <string>
#include <cstdlib>
//Class definition
class A{
public:
A();
~A();
void setData(std::string s);
std::string getData() const;
private:
std::string data;
};
//Implementación de la clase
A::A():data("sin inicializar"){
std::cout << "Constructor de A!" << std::endl;
}
A::~A(){
std::cout << "Destructor de A!" << std::endl;
}
void A::setData(std::string s){
data = s;
}
std::string A::getData() const {
return data;
}
//Main program
int main(){
using std::cout;
using std::endl;
using std::cin;
A *ptr1, *prt2;
cout << "Creamos los objetos uno con free (prt1) y otro con delete
(ptr2)" << endl;
ptr1 = (A*) std::malloc( sizeof (*ptr1) );
prt2 = new A;
cout << "Que contiene prt1?" << endl;
//Ups!!
ptr1->setData("we");
cout << ptr1->getData() << endl;
cout << endl;
cout << "Y ptr2?" <<endl;
cout << prt2->getData() <<endl;
cout << "Ahora destruimos los objetos con free y delete" <<endl;
free(ptr1);
delete prt2;
cin.get();
}
In the line: (where ptr1 is a pointer to datatype A)
ptr1 = (A*) std::malloc( sizeof (*ptr1) );
I MUST use a C-style casting, and if I try
ptr1 = static_cast<A*> std::malloc( sizeof (*ptr1) );
The compiler gives me the following error:
example1.cpp: In function `int main()':
example1.cpp:49: parse error before `::' token
What I´m doing wrong ? According this example from The C++ Programming
Language it should work with a static casting, isn´t it?:
void f()
{
int* p = static_cast<int*>(malloc(100)) ; // new allocation used as ints
// ...
}
Thanks in advance
--
**************************************************
ICQ: 19463735
MSM: zheo_ (at) hotmail (dot) com
"Heart of men are easily corrupted"
Zheo 2003
**************************************************
|
|
From: <pav...@se...> - 2003-08-13 16:49:55
|
Please, How can I use common conrtols in Win GUI Application in Dev C++ ? When I add '#include <commctrl.h>' to the begin of source file and try to call 'InitCommonControls()', error code ' [Linker error] undefined reference to InitCommonControls@0 ' appears. I tried to add the 'libcomctl32.a' to the project (Prject/Project Options/Parameters/Add Library or Object), but then linker said ' ../../lib/libcomctl32.a C:\DEV-CPP\mingw32\bin\ld.exe file format not recognized; treating as linker script' '1 C:\DEV-CPP\mingw32\bin\lib\libcomctl32.a parse error'. What should I do to correct this ? I thank for every response. |
|
From: <and...@su...> - 2003-08-13 11:42:42
|
the bin path was missing. I made a new download and everything worked ok. Thank you anyway Andre >Message: 1 >From: =?iso-8859-1?Q?Andr=E9_Mac=E1rio_Barros?= <and...@su...> >To: "Dev-Cpp-Users" <dev...@li...> >Date: Tue, 12 Aug 2003 16:28:22 -0300 >Subject: [Dev-C++] New Dev-Cpp environment > >Dear Users, > > I am using the new 4.9.8.0 and I am trying to run >the hello world program in C. > An error message is appearing telling me "unable >to run the program". > Looking at Tools-->Compiler Options I saw some relevant >points that I suspect will solve the problem, but I will not >change them. > Somebody knwos what is happening? Somebody can point what >chages must I have to make? > >note 1: The directories path is correct; >note 2: I am using the Portuguese (Brazil) Idiom in the > Dev´s environment. > >Regards >Andre Barros |
|
From: Per W. <pw...@ia...> - 2003-08-13 10:48:54
|
Did you compile as c++? Make sure that you link with -lstdc++ /Per W On Wed, 13 Aug 2003, "TLVermA R=FCger, Hans-Herbert" wrote: > I'm using DEV-CC 4.9.8.0 > My questions are: > How can i find out, what "__gxx_personality_v0" is the alias for? There = is > no substring defining a variable or function or something else in that > string. The original message is: > =09=09=09=09=09[Linker error] undefined reference > to `__gxx_personality_v0' > I:\Sources\C\PARSER2\Makefile.win=09[Build Error] [DEVPAR.exe] Error 1 > Are there sections "compiler-"& "link-messages" within the documentation? > (Unfortunately(?) not found yet!) > hh.rueger > > > > > > > > > ------------------------------------------------------- > 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:
<HH....@TL...> - 2003-08-13 09:49:38
|
I'm using DEV-CC 4.9.8.0 My questions are: How can i find out, what "__gxx_personality_v0" is the alias for? There is no substring defining a variable or function or something else in that string. The original message is: [Linker error] undefined reference to `__gxx_personality_v0' I:\Sources\C\PARSER2\Makefile.win [Build Error] [DEVPAR.exe] Error 1 Are there sections "compiler-"& "link-messages" within the documentation? (Unfortunately(?) not found yet!) hh.rueger |
|
From: Luigi S. <gi...@li...> - 2003-08-13 03:20:23
|
On Mon, Aug 11, 2003 at 09:43:36PM -0300, Roberto Ricardi wrote: > Hi all, > > I upgrade my 4.9.8.0 IDE to 4.9.8.1. Im using old cgg2.95xx, it work > well with 4.9.8.0. At result from new compilations in 4.9.8.1 tell me > "Invalid option `-fmessage-length=0' ". > How can I put itt off ? I never declare it. > Hi, Roberto IMHO there is no way to turn off that option, it seems that 4.9.8.1 inserts it everytime it formats the command which will call the (Gcc) compiler. Probably one may modify the source code of the program and recompile it. Regards -- >> gisan >> You will be singled out for promotion in your work. |
|
From: <a_g...@ya...> - 2003-08-12 19:53:12
|
string p =ch; file://does not make much sense to me!!!
Ioannis Vranos <iv...@em...> wrote:> -----Original Message-----
> From: dev...@li...
> [mailto:dev...@li...] On Behalf
> Of Dawood Vora
> Sent: Tuesday, August 12, 2003 4:21 AM
> To: Dev C++
> Subject: [Dev-C++] RE : [c-prog] what's wrong with the code
>
>
> Subject: RE : [c-prog] what's wrong with the code
>
> I tried "using namespace std;" it still gives me error.
> #include
#include
But you do not use any facilities of in your code.
> #include
Better: #include
> #include
>
>
> int main()
> {
using namespace std;
> char ch = 'z';
> string p = ch;
> /* for the above line the following is the error it gives me :
> conversion from `char' to non-scalar type
> `basic_string,__default_alloc_te
> mplate
> >' requested
> */
The above line is wrong. There is no string constructor taking a char as an
argument.
So your code becomes:
#include
#include
int main()
{
using namespace std;
char ch = 'z';
string p;
p.push_back(ch);
system("PAUSE");
return 0;
}
Ioannis Vranos
* Programming pages: http://www.noicys.freeurl.com
* Alternative URL 1: http://run.to/noicys
* Alternative URL 2: http://www.noicys.cjb.net
-------------------------------------------------------
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
Thanx and Regards
Avik Ghose
Win TVs, Bikes, DVD players and more!Click onYahoo! India Promos |
|
From: <and...@su...> - 2003-08-12 19:38:41
|
Dear Users,
I am using the new 4.9.8.0 and I am trying to run
the hello world program in C.
An error message is appearing telling me "unable
to run the program".
Looking at Tools-->Compiler Options I saw some relevant
points that I suspect will solve the problem, but I will not
change them.
Somebody knwos what is happening? Somebody can point what
chages must I have to make?
note 1: The directories path is correct;
note 2: I am using the Portuguese (Brazil) Idiom in the
Dev´s environment.
Regards
Andre Barros
|
|
From: <ten...@ne...> - 2003-08-12 19:05:32
|
Thank you all. I did as it were reported. First I went to http://www.pandasoftware.es/virus_info/enciclopedia/verficha.aspx?lst=sol&idvirus=40369, as pointed by Javier Mateos, I downloaded pqremove and it did its work. However, just the work which appears in the details are just what I did (delete Registry key, delete file and kill process) but then it reappeared, then that was a re-infection. So that was enough for kicking it out from my computer. Then I downloaded the update pointed by a couple of you and downloaded the MS security update and installed it (well, I've not yet done it, but I'll do; I got the spanish and I should get the english) and as suggested I installed a firewall I had and blocked all those ports. It reported an access trial from 135, I set it so it will send them to a log and don't tell more, I'll see in a minute how many trials there were. And I hope now when I disconnect it won't have any problem. I see at task manager... and there is no msblast.exe. And I didn't had any error in svchost. Thank you all again. |
|
From: Stefan K. <ste...@ya...> - 2003-08-12 17:30:08
|
No, including the "windows.h" file will definitely NOT define a macro IDC_STATIC, sorry. ;-) ----- Original Message ----- From: "Carlos García del Monte" <ten...@ne...> To: "Dev-C++ mail list" <dev...@li...> Sent: Tuesday, August 12, 2003 6:18 PM Subject: Re: [Dev-C++] Resource file problem > #include <windows.h> |
|
From: Gary R. <ga...@fi...> - 2003-08-12 17:20:57
|
> Message: 9
> From: "Hossein Haeri" <ult...@em...>
> To: dev...@li...
> Date: Mon, 11 Aug 2003 12:30:08 -0500
> Subject: Re: [Dev-C++] Compiler error
>
> Dear Gary,
>
> > 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?
>
> My first suspection is that you are probabely getting that error because
of
> the following name:
>
> random_access_iterator_parent, that is here:
>
> > class iterator
> > : public random_access_iterator_parent(seqref<T>)
>
> It is not a portable name. (I know it's probabely a template!) If you are
> using a newer version of MSVC, it is likely that this new version doesn't
use
> that name as the parent of its iterators of type RandomAccess. Cehck it!
And
> if you are now trying to compile the code under a completely different C++
> implementation, say BCB or GCC, the error should be obvious knowing the
> portablity problem. To fix it, try to find the base type your current
> implemetation uses to implement RandomAccess iterators. Having that done,
if
> the code you'r trying to compile doesn't contain other VC-dependant stuff,
it
> should compile.
>
> Another suspection is to the name: seqref<>. Are you sure that it is in an
> OK state? Is it declared/defined? ...
>
> And the last one: It seems to that the following code
>
> > : public random_access_iterator_parent(seqref<T>)
>
> should be replace by either
>
> > : public random_access_iterator_parent(seqref<T>())
>
> or
>
> > : public random_access_iterator_parent<seqref<T> > //The space is
needed
>
> Regards,
> --Hossein
> --
> __________________________________________________________
Hossein,
Thanks for your reply. My apologies for providing such a cryptic description
of my problem and also for the misleading subject; I didn't mean to imply
that I thought the compiler was at fault.
I'm using Dev-C++ 4.9.8.0. A search on Google turned up a
number of references to this error but no solutions as far as I could tell.
I tried your suggestions of placing "()" or a blank after the code fragment
seqref<T> but that didn't change anything. My knowledge of C++ is minimal
and I don't know how to follow up on your suggestion regarding the
"name as the parent of its iterators of type RandomAccess". I checked the
on-line version of the GNU compiler manual but didn't find anything helpful.
Below I have included the output of the compiler log and a somewhat longer
fragment of the code. I hope this will provide a few more clues to you or
some other kind C++ guru.
Thanks,
Gary Richardson
----------------------------------------------------------------------------
Compiler: Default compiler
Building Makefile: "C:\My Documents\CPP\CXX\afftw_\Makefile.win"
Executing make...
make.exe -f "C:\My Documents\CPP\CXX\afftw_\Makefile.win" afftw.o
g++.exe -c afftw.cxx -o
fftw.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" -I"c:/Python22/inclu
de" -I"C:/PyCXX-V5.1-rc2" -D__GNUWIN32__ -W -DWIN32 -DNDEBUG -D_WINDOWS -DH
AVE_WIN32 -DUSE_FFTW_DLL -ansi -w
In file included from afftw.cxx:11:
C:/PyCXX-V5.1-rc2/CXX/Objects.hxx:1135: no class template named `
random_access_iterator' in `std'
C:/PyCXX-V5.1-rc2/CXX/Objects.hxx:1271: no class template named `
random_access_iterator' in `std'
Execution terminated
----------------------------------------------------------------------------
namespace Py
{
// Forward declarations
class Object;
template<class T> class SeqBase;
...
template<class T>
class SeqBase: public Object
{
typedef seqref<T> reference;
typedef seqref<T>* pointer;
...
class iterator
: public random_access_iterator_parent(seqref<T>)
{ <<<<<<<<<< Error detected here
protected:
friend class SeqBase<T>;
SeqBase<T>* seq;
int count;
public:
~iterator ()
{}
iterator ()
{
seq = 0;
count = 0;
}
...
}; // end of class SeqBase<T>::iterator
class const_iterator
: public random_access_iterator_parent(const Object)
{ <<<<<<<<<< Error detected here
protected:
friend class SeqBase<T>;
const SeqBase<T>* seq;
sequence_index_type count;
~const_iterator ()
{}
const_iterator ()
{
seq = 0;
count = 0;
}
...
}; // end of class SeqBase<T>::const_iterator
...
|