dev-cpp-users Mailing List for Dev-C++ (Page 606)
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: Brian M. <str...@ho...> - 2002-04-06 14:50:04
|
>From: "Daniel Anderson" <bt...@ca...>
>To: <dev...@li...>
>Subject: [Dev-C++] Help me in deciphering complier error...
>Date: Thu, 4 Apr 2002 20:21:22 -0500
>
>Hello coders,
>I have run into a problem with a program I am writing. I have a parent
>class, DynArray, that StatArray is derived from. dynarray.cpp is in one
>file, statarray.cpp is in another. My main program has an #include
>"statarray.cpp" statement, and statarray.cpp in turn #include's
>"dynarray.cpp". When attempting to compile the program, I get the
>following
>errors. I am guessing this type of error indicates that I might be mixing
>types, but I can't figure out where and what I need to correct. Any help
>is
>appreciated. Thanks!
>Danny
>
>main.cpp: In function `int main()':
>main.cpp:38: conversion from `StatArray (*)()' to non-scalar type
>`StatArray' requested
>main.cpp:14: in passing argument 1 of `GetArray(StatArray &, ifstream &)'
>main.cpp:40: conversion from `StatArray (*)()' to non-scalar type
>`StatArray' requested
>main.cpp:15: in passing argument 1 of `PrintArray(const StatArray &,
>ofstream &)'
>
>
>/* code fragment here: */
>
>14 void GetArray(StatArray&, ifstream&);
>15 void PrintArray(const StatArray&, ofstream&);
>...
>36 StatArray myArray(); /* constructor */
your constructor should simply be StatArray(); identified by the same name
as your class and with no return type. What you have created is a function
called myArray with a return type StatArray.
>
>38 GetArray(myArray, inData);
>
>40 PrintArray(myArray, outData);
>
>/* func definitions empty */
>void GetArray(StatArray& targetArray, ifstream& inData)
> {}
>void PrintArray(const StatArray& sourceArray, ofstream& outData)
> { }
>
>
>
>
>
>
>
>_______________________________________________
>Dev-cpp-users mailing list
>Dev...@li...
>https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp.
|
|
From: carlos D. M. <cg...@wo...> - 2002-04-06 11:07:26
|
mingw32 uses libraries with the extension *.a. And regarding past messages, you must transform the *.lib to *.a. Some sites says you only have to change it by simply renaming the files, others that you must use a program to convert them. In cygwin, you use the command-line mv *.lib *.a, so pass it in the further compiler options field. Or you can try it running the mingw32.exe, because cygwin is a port of gcc for linux emulation in windows, and mingw32 is the port of gcc for windows in windows, so it shall work. Or just you don't need them, so remove them from the project options and see what happens. Chris Moore escribió: > When I compile my project, I am getting the errors shown below: > > I cannot figure out why the linking is not done. I have gone into project > options and specified "-lwsnmp32", etc. Do all libraries need to follow the > syntax lib*.a ? > > -------------------------------------- > > gcc: d:\chris\openview\testpmd\ov\lib\wsnmp32.lib: linker input file unused > since linking not done > gcc: d:\chris\openview\testpmd\ov\lib\ovsnmp.lib: linker input file unused > since linking not done > gcc: d:\chris\openview\testpmd\ov\lib\ovw.lib: linker input file unused > since linking not done > gcc: d:\chris\openview\testpmd\ov\lib\ovwww.lib: linker input file unused > since linking not done > gcc: d:\chris\openview\testpmd\ov\lib\ov.lib: linker input file unused since > linking not done > gcc: -lobjc: linker input file unused since linking not done > gcc: -lov: linker input file unused since linking not done > gcc: -lovsnmp: linker input file unused since linking not done > > _______________________________________________ > Dev-cpp-users mailing list > Dev...@li... > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users |
|
From: Daniel W. <d_w...@ho...> - 2002-04-06 01:37:00
|
Hi Chris! I think that is not a linker error, 'cause that happens to me a lot, = that problems happened to me when the compiler was not able to make the = object file (or it was "defectuous") and couldn't find the problem. You = should look carefully at your code. What happened to me was that i had been including a defectuous include = file, and when calling the compiler it arent able to find the error = cause the functions calls was OK in theory. But the compiler wasn't able = to bypass the same error. The functions i refer are the DOS specific = funcions in CONIO.H. Well, bay Daniel Wilches Maradei dwi...@ma... |
|
From: christiaan s. <ck...@ia...> - 2002-04-05 21:24:48
|
what does gtk do? is it like the winapi? |
|
From: carlos D. M. <cg...@wo...> - 2002-04-05 19:31:13
|
Well, http://www.winprog.org has updated its tutorial and now it has the MDI section built. I hope it will be useful for me. |
|
From: <ech...@ne...> - 2002-04-05 19:26:18
|
It looks like you need gtk+ and pw32 (a posix emulation layer) You can find them at: Pw32:http://pw32.sourceforge.net/ Gtk+:http://gtk.org (dev-c++ packages at http://www.bloodshed.net/dev/packages/gtk.html) I think that these 2 packages would remove most (all?) the errors. But, I haven't used either - just read some of their docs. Evan Hempel PS: I think that there also is a dev-c++ package for pw32 Original message follows: --------------------------------------------------- Hello again people Now I'm having problems with a small program, originally written for GNU/Linux. It uses some headers that are not present on Dev-C++, and I never used Linux here on my machine (lack of disk space); maybe the biggest problem is that I don't even know what's written on those headers, so I have no idea of what I need to substitute. (The questions are numbered) 1)) Then here goes my first question: there is a online database/port of linux's headers (with also some documentation or explanation, not just the source code)? And now some doubts: 2)) Look to this error: "144 callbacks.c warning: passing arg 2 of `create_dir_browser' discards qualifiers from pointer target type" Here is the code: /// /* Function prototype */ GtkWidget *create_dir_browser(gchar * title, gchar * current_path, GtkSelectionMode mode, void (*handler) (gchar *)); 124: void on_dir_select29(gchar * dir); ... 141: GtkWidget *win; 142: 143: win = create_dir_browser(_("Select Directory"), g_get_home_dir(), 144: GTK_SELECTION_SINGLE, on_dir_select29); /// I get this error in many other points too. I have no idea of what to do (what does the "void (*handler) (gchar *)" mean?). 3)) The following error: 3771 global.c `SIGPIPE' undeclared (first use in this function) /// 3771: signal(SIGPIPE, sigpipe_handler); /// I couldn't find this constant (should be in "signal.h"?). What do I use instead? 4)) Other error: 1252 commands.c storage size of `uts' isn't known /// 1252: struct utsname uts; /// I think that utsname is defined in sys/utsname.h, but where is utsname.h? There is an equivalent? (What is utsname.h for anyways?) Questions 5 and 6 are about these lines: /// 382: fcntl(sock, F_SETFL, O_NONBLOCK); 383: res = connect(sock, (struct sockaddr *) &server, sizeof(server)); 384: 385: if ((res == 0) || (errno == EINPROGRESS)) return 1; 386: else return 0; /// 5)) Two errors in the same line: 382 connection.c `F_SETFL' undeclared (first use in this function) and 382 connection.c `O_NONBLOCK' undeclared (first use in this function) I think O_NONBLOCK should be in fcntl.h. The F_SETFL I have no idea though. 6)) Two similar errors (from socket.h/winsock.h, I think): 385 connection.c `EINPROGRESS' undeclared (first use in this function) and 465 connection.c `EWOULDBLOCK' undeclared (first use in this function) /// 465: if (errno != EWOULDBLOCK) { /// Are EINPROGRESS and EWOULDBLOCK equivalent to WSAEINPROGRESS and WSAEWOULDBLOCK? Can I substitute them without problems? 7)) 96 exec.c `WNOHANG' undeclared (first use in this function) /// 96: waitpid(exec->pid, &status, WNOHANG); /// 8)) 220 exec.c `SIGKILL' undeclared (first use in this function) /// 217: client_message(NULL, _("Killing process..")); 218: kill(exec->pid, SIGTERM); 219: sleep(2); 220: kill(exec->pid, SIGKILL); /// Should SIGKILL be in signal.h like SIGTERM? Can I use something like SIGABRT instead? 9)) Those errors: 291 md5.c `PROT_READ' undeclared (first use in this function) 291 md5.c `MAP_PRIVATE' undeclared (first use in this function) 291 md5.c `MAP_FAILED' undeclared (first use in this function) /// 291: if ((m = mmap((void *) 0, size, PROT_READ, MAP_PRIVATE, fd, 0)) != MAP_FAILED) /// Probably the problem is this header, that doesn't exist in Dev-C++, right? #include <sys/mman.h> /* for mmap() */ What can I do? There's an equivalent header? 10)) This program uses also these headers: #include <sys/socket.h> #include <netinet/in.h> #include <arpa/inet.h> #include <netdb.h> What should I use in windows (besides winsock.h?)? Well, thanks for any help. If anyone interested, I can send the full source code (about 2MB). Daniel K. O. _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com __________________________________________________________________ Your favorite stores, helpful shopping tools and great gift ideas. Experience the convenience of buying online with Shop@Netscape! http://shopnow.netscape.com/ Get your own FREE, personal Netscape Mail account today at http://webmail.netscape.com/ |
|
From: Aleksei V. <vin...@ne...> - 2002-04-05 17:21:39
|
Hello, dev-cpp-users. A friend of mine who is not subscribed to the list asked me to send you this. Any help will be much appreciated. ------------ I tried to write the simplest program that uses WinSock interface. Here is a part of its source: //tcp.cpp #include <winsock.h> SOCKET S; word w; ... WSAStartup(w,&wsadata); S=Socket(AF_INET, SOCK_STREAM, 0); ... /////////////// After I compiled it, I got the following error messages: C:\WINDOWS\TEMP\cc9Rgigb.o(.text+0x1af):tcp.cpp: undefined reference to `WSAStartup@8' C:\WINDOWS\TEMP\cc9Rgigb.o(.text+0x1fa):tcp.cpp: undefined reference to `socket@12' ... OK, I changed #include <winsock.h> to #include <winsock2.h>, and got the following: Line7: c:\andrew\inet\#1\tcp.cpp C:\DEV-C_~1\INCLUDE\winsock2.h:46: unbalanced `#endif' What is it that may be causing the problem? ---- -- Best regards, Aleksei Vinidiktov Open Book - educational software for learning languages English: http://www.vinidiktov.com Russian: http://www.vinidiktov.com/rus vin...@ne... |
|
From: Graeme F. <gr...@dr...> - 2002-04-05 17:12:47
|
I think that you have a problem with line 36:
36 StatArray myArray(); /* constructor */
If you are intending to create an object called myArray of class StatArray
then that will not work. The compiler will in fact declare (but not define)
a function called myArray with no parameters but with a return type of
StatArray. The line should be changed to:
36 StatArray myArray; /* constructor */
No parenthesis. This is one of those strange cases, if the constructor
doesn't expect any parameters than omit the parenthesis.
To get the nested included to work you either need to include a
pre-processor directive or exclude the #include and declare the class
extern. The pre-processor directive is probably better here, and a good
habit to get into: so wrap each header file with the following type of code
#ifndef __STATARRAY_HPP
#define __STATARRAY_HPP
// put you class declaration
// and inline functions here
#endif
Essentially the first time in this creates a pre-processor variable called
__STATARRAY_HPP (use __DYNARRAY_HPP for your other file) the next time in
because the variable exists it doesn't declare the class (jumping directly
to the #endif directive) and thus it will avoid declaring the class a second
time.
I hope this helps.
--__--__--
Message: 2
From: "Daniel Anderson" <bt...@ca...>
To: <dev...@li...>
Date: Thu, 4 Apr 2002 20:21:22 -0500
Subject: [Dev-C++] Help me in deciphering complier error...
Hello coders,
I have run into a problem with a program I am writing. I have a parent
class, DynArray, that StatArray is derived from. dynarray.cpp is in one
file, statarray.cpp is in another. My main program has an #include
"statarray.cpp" statement, and statarray.cpp in turn #include's
"dynarray.cpp". When attempting to compile the program, I get the following
errors. I am guessing this type of error indicates that I might be mixing
types, but I can't figure out where and what I need to correct. Any help is
appreciated. Thanks!
Danny
main.cpp: In function `int main()':
main.cpp:38: conversion from `StatArray (*)()' to non-scalar type
`StatArray' requested
main.cpp:14: in passing argument 1 of `GetArray(StatArray &, ifstream &)'
main.cpp:40: conversion from `StatArray (*)()' to non-scalar type
`StatArray' requested
main.cpp:15: in passing argument 1 of `PrintArray(const StatArray &,
ofstream &)'
/* code fragment here: */
14 void GetArray(StatArray&, ifstream&);
15 void PrintArray(const StatArray&, ofstream&);
...
36 StatArray myArray(); /* constructor */
38 GetArray(myArray, inData);
40 PrintArray(myArray, outData);
/* func definitions empty */
void GetArray(StatArray& targetArray, ifstream& inData)
{}
void PrintArray(const StatArray& sourceArray, ofstream& outData)
{ }
|
|
From: Ricardo R. <ri...@po...> - 2002-04-05 16:58:30
|
I have installed the wxwindows version (2,64Mb) for Dev-C++ such as Laurence explained the last day. When I try to compile the 'hello_world' program some errors in the Linker appear: g++: c:\personal\ricardo\wx-windows\hello_world.o: No such file or directory g++: file path prefix `C:\DEV-CPP\BIN\' never used and some others in the Compiler section: 224 c:\dev-cpp\include\wx\defs.h from C:\DEV-CPP\INCLUDE\wx\wx.h:15, 6 hello_world.cpp C:\DEV-CPP\INCLUDE\wx\setup.h:15: #error No __WXxxx__ define set! Please define one of __WXBASE__,__WXGTK__,__WXMSW__,__WXMOTIF__,__WXMAC__,__WXQT__,__WXPM__,__WXSTUBS__ 17 c:\dev-cpp\include\wx\debug.h from C:\DEV-CPP\INCLUDE\wx\defs.h:462,.... and others. does somebody know the reason?. Any help is wellcome. Ricardo. |
|
From: Lorenzo <co...@in...> - 2002-04-05 14:53:55
|
I don't understand why you have to use a control. When you have the hdc of the windows you can use all gdi functions. I put an little example to explain the concept. I hope this help you. ---------------------------------------------------------------------------- --- If debugging is the process of removing bugs, then programming must be the process of putting them in. ---------------------------------------------------------------------------- --- |
|
From: <he...@na...> - 2002-04-05 14:29:01
|
Me again, Where I found documentation about the libraries come with Dev- C++? Thanks. Helano. |
|
From: <he...@na...> - 2002-04-05 14:10:55
|
Sorry for my bad english, I'm from Brazil. Recentely, I install "The Windows Millenium", and when I try to compile my programs, I had a problem on resources. The problems compile fine on W98, and Dev-C++4, but on WME... Help-me guys, please. Helano. |
|
From: Chris M. <ck...@di...> - 2002-04-05 13:42:40
|
When I compile my project, I am getting the errors shown below: I cannot figure out why the linking is not done. I have gone into project options and specified "-lwsnmp32", etc. Do all libraries need to follow the syntax lib*.a ? -------------------------------------- gcc: d:\chris\openview\testpmd\ov\lib\wsnmp32.lib: linker input file unused since linking not done gcc: d:\chris\openview\testpmd\ov\lib\ovsnmp.lib: linker input file unused since linking not done gcc: d:\chris\openview\testpmd\ov\lib\ovw.lib: linker input file unused since linking not done gcc: d:\chris\openview\testpmd\ov\lib\ovwww.lib: linker input file unused since linking not done gcc: d:\chris\openview\testpmd\ov\lib\ov.lib: linker input file unused since linking not done gcc: -lobjc: linker input file unused since linking not done gcc: -lov: linker input file unused since linking not done gcc: -lovsnmp: linker input file unused since linking not done |
|
From: Jason H. <jas...@bt...> - 2002-04-05 02:39:39
|
I'll answer the header question first and then use that to tell you what = an "undefined reference" means, or at least I'll try. :) The reason we use headers and cpp files seperately is due to the need to = modularise programs. This is done for several reasons, such as the = ability to add other code into yours, meaning to make use of a function = or library of functions you or someone else has written, i.e. the = standard library; or when projects become too big for it to be all in = one file, then you will want to break your code up into functional = units, each performing a seperate task, which is good on a variety of = levels, like making the code more managable and speeding up compilation = because only the modified sections need to be recompiled. In the header file you will put all the prototypes and definitions that = are used in it's related .cpp (or .c) file. The .cpp file itself = contains the code that performs the action of the functions, methods and = such. It will also contain a instantiation of memory used for static = members and such. Note that there is a difference between definition and = instantiation. I can be said that a header represents a definition, = while the cpp file represents the instantiation. The definition = describes what is within the cpp file. Back to modularisation, suppose we have two modules (or units, i.e. a = cpp file and library) one of which makes use of a function defined = within the other, how does the compiler know how to call that function? = It will look at the header of the other module and know that function = 'add' takes two parameters one string and one int and returns a bool, = for example. It will set up the call as appropriate in it's own code. It = doesn't need to know how the other function is implemented, or even if = it has been implemented, it can take that for granted. At the end of compilation you will be left with group of object file = (.o), one for each cpp file, which depend upon each other and maybe some = library or other. What you do next is 'link' them all together into an = executable with a linker. When the compiler made the object file it = didn't know where the function was, just how to make use of it. The = linkers responsibility is to take the call in one object and resolve it = to another module, directing the call to the right place within the = code. The compiler leaves little bits of information in the object file = to make the linker's job easier. Once all the 'references' have been = resolved to the correct places the linker can wrap it all up in the = information that forms a executable file, which depends upon the target = system. As you may have guessed your undefined references are where the linker = has looked for some function, but cannot find it in any of the modules = that it has been told to link. Your problem will be that the file = containing those functions needs to be made available to the linker. I = can see that you are dealing with some opengl stuff so I would reckon = that you need to link the libraries that go with the headers for the = opengl. Remember that the header only tells the compiler about the = function, it doesn't give it the code that does the things you need. There should be instructions with the library about how to link in the = correct library. Generally you will add the library files (.a) as = "further object files" in the project options and I believe you can do = it with "-l" based compiler options, although I could never get that to = work (dunno why). Someone else may explain it? You may be wondering why you don't get these undefined references for = the standard library functions and methods that you call. That is = because Dev-C++ does that bit for you, it knows where they and will link = them automatically, the same for when writing windows programs. When you = select to compile for a windows program (no console) in the options, = Dev-C++ will make sure the extra code needed is linked in with yours. Feel free to e-mail me to clarify any points I have made. Jason. ----- Original Message -----=20 From: Stein Nyg=E5rd=20 To: DevCpp=20 Sent: Thursday, April 04, 2002 8:23 PM Subject: [Dev-C++] $_70 wierdness! Hi guys! Anyone know what this means? f:\development\opengl\sengine v2.5\scenes.o(.text+0xcf):scenes.cpp: = undefined reference to `$_70::load(char *, char *)' f:\development\opengl\sengine v2.5\scenes.o(.text+0x1e0):scenes.cpp: = undefined reference to `$_70::draw(bool, bool)' f:\development\opengl\sengine v2.5\scenes.o(.text+0x277):scenes.cpp: = undefined reference to `$_70::free(void)' And can someone please explain me what it is with headers? Although = I've been programming for several years, I'm still confused about what = goes in a *.h-file and what goes into a *.cpp. To me it seems kinda like the only difference, is that it takes longer = to compile if stuff is saved as .cpp-files instead of header files, but = I can't believe that's it :/ Thanks!!! |
|
From: Ioannis V. <no...@ho...> - 2002-04-05 02:09:34
|
> -----Original Message-----
> From: dev...@li...
> [mailto:dev...@li...] On Behalf
> Of Daniel Anderson
> Sent: Friday, April 05, 2002 3:21 AM
> To: dev...@li...
> Subject: [Dev-C++] Help me in deciphering complier error...
>
>
> Hello coders,
> I have run into a problem with a program I am writing. I
> have a parent
> class, DynArray, that StatArray is derived from.
> dynarray.cpp is in one
> file, statarray.cpp is in another. My main program has an #include
> "statarray.cpp" statement, and statarray.cpp in turn #include's
> "dynarray.cpp". When attempting to compile the program, I
> get the following
> errors. I am guessing this type of error indicates that I
> might be mixing
> types, but I can't figure out where and what I need to
> correct. Any help is
> appreciated. Thanks!
> Danny
>
> main.cpp: In function `int main()':
> main.cpp:38: conversion from `StatArray (*)()' to non-scalar type
> `StatArray' requested
> main.cpp:14: in passing argument 1 of `GetArray(StatArray &,
> ifstream &)'
> main.cpp:40: conversion from `StatArray (*)()' to non-scalar type
> `StatArray' requested
> main.cpp:15: in passing argument 1 of `PrintArray(const StatArray &,
> ofstream &)'
>
>
> /* code fragment here: */
>
> 14 void GetArray(StatArray&, ifstream&);
> 15 void PrintArray(const StatArray&, ofstream&);
> ...
> 36 StatArray myArray(); /* constructor */
>
> 38 GetArray(myArray, inData);
>
> 40 PrintArray(myArray, outData);
>
> /* func definitions empty */
> void GetArray(StatArray& targetArray, ifstream& inData)
> {}
> void PrintArray(const StatArray& sourceArray, ofstream& outData)
> { }
#include places the contents of the file in its place, and it is as if
you wrote everything in that place and not in a separate file.
From this you can understand everything i guess.
Ioannis
* Ioannis Vranos
* Programming pages: http://www.noicys.cjb.net
* Alternative URL: http://run.to/noicys
|
|
From: Ioannis V. <no...@ho...> - 2002-04-05 02:07:25
|
From: dev...@li...
[mailto:dev...@li...] On Behalf Of Stein
Nyg=E5rd
Sent: Thursday, April 04, 2002 9:23 PM
To: DevCpp
Subject: [Dev-C++] $_70 wierdness!
Hi guys!
=20
Anyone know what this means?
=20
f:\development\opengl\sengine v2.5\scenes.o(.text+0xcf):scenes.cpp:
undefined reference to `$_70::load(char *, char *)'
f:\development\opengl\sengine v2.5\scenes.o(.text+0x1e0):scenes.cpp:
undefined reference to `$_70::draw(bool, bool)'
f:\development\opengl\sengine v2.5\scenes.o(.text+0x277):scenes.cpp:
undefined reference to `$_70::free(void)'=20
=20
=20
No definitions provided for these functions.
=20
=20
And can someone please explain me what it is with headers? Although I've
been programming for several years, I'm still confused about what goes
in a *.h-file and what goes into a *.cpp.=20
=20
In .cpps you place the definitions of your interfaces and in .h the
declarations.
=20
e.g. assume a function:
=20
void do_something()
=20
=20
You place in the header file: void do_something();
=20
and in .cpp file the implementation:
=20
void do_something()
{
// ...
}
=20
Type definitions (enums, classes, structs, etc) go to header files.
=20
=20
=20
Ioannis
* Ioannis Vranos
* Programming pages: http://www.noicys.cjb.net
<http://www.noicys.cjb.net/>=20
* Alternative URL: http://run.to/noicys
|
|
From: Daniel A. <bt...@ca...> - 2002-04-05 01:47:57
|
Hello coders,
I have run into a problem with a program I am writing. I have a parent
class, DynArray, that StatArray is derived from. dynarray.cpp is in one
file, statarray.cpp is in another. My main program has an #include
"statarray.cpp" statement, and statarray.cpp in turn #include's
"dynarray.cpp". When attempting to compile the program, I get the following
errors. I am guessing this type of error indicates that I might be mixing
types, but I can't figure out where and what I need to correct. Any help is
appreciated. Thanks!
Danny
main.cpp: In function `int main()':
main.cpp:38: conversion from `StatArray (*)()' to non-scalar type
`StatArray' requested
main.cpp:14: in passing argument 1 of `GetArray(StatArray &, ifstream &)'
main.cpp:40: conversion from `StatArray (*)()' to non-scalar type
`StatArray' requested
main.cpp:15: in passing argument 1 of `PrintArray(const StatArray &,
ofstream &)'
/* code fragment here: */
14 void GetArray(StatArray&, ifstream&);
15 void PrintArray(const StatArray&, ofstream&);
...
36 StatArray myArray(); /* constructor */
38 GetArray(myArray, inData);
40 PrintArray(myArray, outData);
/* func definitions empty */
void GetArray(StatArray& targetArray, ifstream& inData)
{}
void PrintArray(const StatArray& sourceArray, ofstream& outData)
{ }
|
|
From: <ste...@ge...> - 2002-04-04 19:24:35
|
Hi guys! Anyone know what this means? f:\development\opengl\sengine v2.5\scenes.o(.text+0xcf):scenes.cpp: = undefined reference to `$_70::load(char *, char *)' f:\development\opengl\sengine v2.5\scenes.o(.text+0x1e0):scenes.cpp: = undefined reference to `$_70::draw(bool, bool)' f:\development\opengl\sengine v2.5\scenes.o(.text+0x277):scenes.cpp: = undefined reference to `$_70::free(void)' And can someone please explain me what it is with headers? Although I've = been programming for several years, I'm still confused about what goes = in a *.h-file and what goes into a *.cpp. To me it seems kinda like the only difference, is that it takes longer = to compile if stuff is saved as .cpp-files instead of header files, but = I can't believe that's it :/ Thanks!!! |
|
From: Laurence <lau...@ip...> - 2002-04-04 05:00:18
|
Hi Bob. You sound like someone who knows more about compilers & building = libraries than me, so I hope I can be of assistance to you.=20 I downloaded the full wxWindows distribution from www.wxWindows.org, = and found I could not build the libraries with Dev-C++ - many errors, = mainly of the kind that appear to me to result from headers not being = included, macros not being defined. I didn't know really what to do with = them all. So, I downloaded (again) the full Mingw compiler suite from = www.mingw.org , and used the relevant wxWindows makefiles, following all = the wxWindows build instructions. It worked perfectly. =20 Still, I could not use it with Dev-C++. This may well have been because = I did not properly understand the required library and include paths to = add to the Dev-C++ environment/project options. I don't know - maybe = you've got to build it all a certain kind of way. I don't know enough = about it, and I was in a hurry. Finally, I found this page: http://steveperkins.net/development/platforms/cpp.php where you will find a Dev-C++ package for wxWindows (just 2.64MB, as = against 8+MB unbuilt) (wxWindows samples not included). Just install = into your Dev-C++ directory. It includes a template for GUI = applications, available from Dev's New Project menu, which has project = options preset with correct paths for wx2 includes and libraries, and = correct compiler command options. An official Dev-C++ packages page has a link for a wxWindows package, = but, as explained on that page, some problem caused it to be = unavailable. However, the wxWindows samples (without the rest of = wxWindows) are available from this page: http://devcpp.everfloyd.com/old/wxwindows.html The samples are useful for quick entry into the wxwindows world. In addition, I have got the wxWindows WinHelp, from www.wxwindows.org, = which I have added to the Dev-C++ tools menu with the tools = configuration option. I find this indispensibly useful. Cheers, Laurence.=20 ----- Original Message -----=20 From: Bob Wilson=20 To: dev...@li...=20 Sent: Tuesday, April 02, 2002 5:48 AM Subject: [Dev-C++] wxWindows I am not sure this is the place to seek this information, but I can = not find a specific site for Bloodshed.=20 =20 I have down loaded the wxWindows programs and source files, but I am = getting an consistant error in compilation which I assume is either = related to the Bloodsheed compiler which is: Bloodsheed Deve=3DC++ Ver 4.01 =20 mingw complier 2.95-1 MSVCRT + updated headers & libraries The compiler finds all of the various include files that are either = source or library, but during the preprocessor or precompile phase it = produces three fatal errors. They are: In file included from = F:\DEV-C++\Downloads\wxWindows\wx2\include\wx\debug.h:17, from = F:\DEV-C++\Downloads\wxWindows\wx2\include\wx\defs.h:468, from = F:\DEV-C++\Downloads\wxWindows\wx2\include\wx\wxprec.h:13, from = f:\dev-c_~1\downlo~1\wxwind~1\wx2\demos\life\life.cpp:21: F:\DEV-C++\Downloads\wxWindows\wx2\include\wx\wxchar.h:429: #error = "Please define string case-insensitive compare for your OS/compiler" In file included from = F:\DEV-C++\Downloads\wxWindows\wx2\include\wx\memory.h:20, from = F:\DEV-C++\Downloads\wxWindows\wx2\include\wx\object.h:20, from = F:\DEV-C++\Downloads\wxWindows\wx2\include\wx\wx.h:16, from = f:\dev-c_~1\downlo~1\wxwind~1\wx2\demos\life\life.cpp:28: F:\DEV-C++\Downloads\wxWindows\wx2\include\wx\string.h:170: #error = "Please define string case-insensitive compare for your OS/compiler" In file included from = F:\DEV-C++\Downloads\wxWindows\wx2\include\wx\cmndata.h:21, from = F:\DEV-C++\Downloads\wxWindows\wx2\include\wx\wx.h:48, from = f:\dev-c_~1\downlo~1\wxwind~1\wx2\demos\life\life.cpp:28: F:\DEV-C++\Downloads\wxWindows\wx2\include\wx\fontutil.h:65: #error = "Unsupported toolkit" It appears that either the compiler is not providing the proper = identification, is a mismatch despite of its mingw roots, or that I need = to modify the source code to specify the proper option for each of the = three unidentified definitions during the #if ( . . . ) #endif =20 #ifdef . . .=20 #endif option identification phases. I could flail around and eventually = either figures it out or arrive at a serendipitous solution (more = likely), but I am sure I am not the first to run into this problem. FYI = operating system is stock Windows98.=20 I love learning and becoming proficient in a new language. It always = makes you feel like a real mental midget.=20 Regards, Bob |
|
From: Daniel K. O. <dan...@ya...> - 2002-04-04 03:11:48
|
Hello again people
Now I'm having problems with a small program, originally written for
GNU/Linux. It uses some headers that are not present on Dev-C++, and I never
used Linux here on my machine (lack of disk space); maybe the biggest
problem is that I don't even know what's written on those headers, so I have
no idea of what I need to substitute.
(The questions are numbered)
1)) Then here goes my first question: there is a online database/port of
linux's headers (with also some documentation or explanation, not just the
source code)?
And now some doubts:
2)) Look to this error:
"144 callbacks.c
warning: passing arg 2 of `create_dir_browser' discards qualifiers from
pointer target type"
Here is the code:
///
/* Function prototype */
GtkWidget *create_dir_browser(gchar * title, gchar * current_path,
GtkSelectionMode mode, void (*handler) (gchar *));
124: void on_dir_select29(gchar * dir);
...
141: GtkWidget *win;
142:
143: win = create_dir_browser(_("Select Directory"), g_get_home_dir(),
144: GTK_SELECTION_SINGLE, on_dir_select29);
///
I get this error in many other points too. I have no idea of what to do
(what does the "void (*handler) (gchar *)" mean?).
3)) The following error:
3771 global.c
`SIGPIPE' undeclared (first use in this function)
///
3771: signal(SIGPIPE, sigpipe_handler);
///
I couldn't find this constant (should be in "signal.h"?). What do I use
instead?
4)) Other error:
1252 commands.c
storage size of `uts' isn't known
///
1252: struct utsname uts;
///
I think that utsname is defined in sys/utsname.h, but where is utsname.h?
There is an equivalent? (What is utsname.h for anyways?)
Questions 5 and 6 are about these lines:
///
382: fcntl(sock, F_SETFL, O_NONBLOCK);
383: res = connect(sock, (struct sockaddr *) &server, sizeof(server));
384:
385: if ((res == 0) || (errno == EINPROGRESS)) return 1;
386: else return 0;
///
5)) Two errors in the same line:
382 connection.c
`F_SETFL' undeclared (first use in this function)
and
382 connection.c
`O_NONBLOCK' undeclared (first use in this function)
I think O_NONBLOCK should be in fcntl.h. The F_SETFL I have no idea though.
6)) Two similar errors (from socket.h/winsock.h, I think):
385 connection.c
`EINPROGRESS' undeclared (first use in this function)
and
465 connection.c
`EWOULDBLOCK' undeclared (first use in this function)
///
465: if (errno != EWOULDBLOCK) {
///
Are EINPROGRESS and EWOULDBLOCK equivalent to WSAEINPROGRESS and
WSAEWOULDBLOCK? Can I substitute them without problems?
7))
96 exec.c
`WNOHANG' undeclared (first use in this function)
///
96: waitpid(exec->pid, &status, WNOHANG);
///
8))
220 exec.c
`SIGKILL' undeclared (first use in this function)
///
217: client_message(NULL, _("Killing process.."));
218: kill(exec->pid, SIGTERM);
219: sleep(2);
220: kill(exec->pid, SIGKILL);
///
Should SIGKILL be in signal.h like SIGTERM? Can I use something like SIGABRT
instead?
9)) Those errors:
291 md5.c
`PROT_READ' undeclared (first use in this function)
291 md5.c
`MAP_PRIVATE' undeclared (first use in this function)
291 md5.c
`MAP_FAILED' undeclared (first use in this function)
///
291: if ((m = mmap((void *) 0, size, PROT_READ, MAP_PRIVATE, fd, 0)) !=
MAP_FAILED)
///
Probably the problem is this header, that doesn't exist in Dev-C++, right?
#include <sys/mman.h> /* for mmap() */
What can I do? There's an equivalent header?
10)) This program uses also these headers:
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <netdb.h>
What should I use in windows (besides winsock.h?)?
Well, thanks for any help. If anyone interested, I can send the full source
code (about 2MB).
Daniel K. O.
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com
|
|
From: carlos D. M. <cg...@wo...> - 2002-04-03 18:56:52
|
Well, I don't find any tutorial about how to do MDI applications without using MFC neither other kind of classes. Do you know some site?. There are some site with a class library as MFC which I can use with Dev-C++?. Thank you. |
|
From: Zodiaq <zo...@ac...> - 2002-04-03 15:36:02
|
Hi to all WinAPI programmers, is there a good soul that could help me in my problem?? What it is than?? I wonder how to draw some lines, points inside a specified rectangle - well I know axact coordinates where I want to do this, but this is on a dialog... dialog has some controls, common controls and so on... Is there some control that I could place here (maybe METAFILE or smth) and then draw some points/line in it?? What are your ideas in this matter? What I could do to be able to do this drawings?? -- regards, Zodiaq... |
|
From: Ioannis V. <no...@ho...> - 2002-04-03 13:13:21
|
The 64-bit war is open. There are currently 2 separate paths. Intel's Itanium and AMD's 80x86-64 architecture. Intel says that although it strongly supports Itanium, it will produce a Pentium IV with 64-bit extensions if necesssary. Programmers will be able to use these extensions at will. This is Intel's backup plan. Also keep in mind that Itanium has not so much success as Intel expected. Ioannis * Ioannis Vranos * Programming pages: http://www.noicys.cjb.net <http://www.noicys.cjb.net/> * Alternative URL: http://run.to/noicys -----Original Message----- From: dev...@li... [mailto:dev...@li...] On Behalf Of Jason Hardman Sent: Wednesday, April 03, 2002 2:55 PM To: Dev-C++ Subject: Re: [Dev-C++] Windows Applications The Itanium is also not very compatible with old 32bit software, i.e. it can run it but at slower speeds than current 32 bit processors. I personally am more interested in the forthcoming Athlon 4s (SledgeHammer or whatever they're called), which will not only run 64 bit instructions but the will be fully backward compatible with 32 bit OS's and currently existing programs (running them faster too), which will be a much more attractive (cheaper) migration path for many companies. The new athlons will be released as desktop processors too, whereas I think that the Itanium is currently mainly for network servers so far? Saying that though intel has a vested interest in bringing current applications into the 64 bit world, so they will be doing a lot of work to that end. There are 64 bit versions of Linux and Windows out there along with other OS's (I imagine). BTW, it is RISC and not Risk. It means Reduced Instruction Set Computer, as opposed to CISC - Complex Instruction Set Computer, which is the current PC norm. Both types have benefits and costs. In modern CISC chips the interal architecture is often based around a set of RISC cores which are more easily optimised. Jason. |
|
From: Ioannis V. <no...@ho...> - 2002-04-03 13:07:17
|
There is already .NET SP1. It supposedly would be available through microsoft update. You can download it from here: http://msdn.microsoft.com/netframework/downloads/sp1/default.asp A .NET application needs it to run. Ioannis * Ioannis Vranos * Programming pages: http://www.noicys.cjb.net * Alternative URL: http://run.to/noicys > -----Original Message----- > From: dev...@li... > [mailto:dev...@li...] On Behalf > Of John Pallas > Sent: Wednesday, April 03, 2002 3:33 PM > To: dev...@li... > Subject: [Dev-C++] .NET > > > Would anyone know where I can get a clone of .NET for free. I > heard that > Envelop was an exact clone. I don't want to spend the money > if I am not > going to like it. Would I also be able to use it on my > current OS (Win 98) > or do I have to upgrade my OS also to 2000. If I use it on 98 > will I be able > to make applications for 2000? > > > _______________________________________________ > Dev-cpp-users mailing list > Dev...@li... > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > |
|
From: Ioannis V. <no...@ho...> - 2002-04-03 13:01:19
|
There is already a 64-bit version of Windows XP for Itanium. Now your favorite 64-bit processor will keep crawling. :P Naturally there is already a 64-bit version of GNU/LINUX for Itanium too. .NET will be for Windows XP/64 too (and all the upcoming 64-bit Microsoft servers). .NET is here to stay for Microsoft. Ioannis * Ioannis Vranos * Programming pages: http://www.noicys.cjb.net <http://www.noicys.cjb.net/> * Alternative URL: http://run.to/noicys -----Original Message----- From: dev...@li... [mailto:dev...@li...] On Behalf Of Dan...@ao... Sent: Wednesday, April 03, 2002 2:43 AM To: Dev-C++ Subject: Re: [Dev-C++] Windows Applications In a message dated 4/2/2002 1:19:51 PM Central Standard Time, jas...@bt... writes: I would suggest that there is still value in learning Win32 and the related extensions to it. The reason I say this is because .NET is currently only supported by Windows XP and 2000 AFAICT. Many people today still prefer to stick with the older OS's. I have to say I'm more interested in what Sun will come up with to rival .NET, as Java is supported on many OS's and Sun, unlike Microsoft, doesn't have a vested interest in any particular OS and system. My best advise would be wait and see what the future has to offer and hedge your bets, i.e. learn as much as you can in any language/environment This summer Intel is planing to release it's new Itanium platform which is going to turn the world of networking around. According to them, Intel, their new platform architecture will be six times as fast as Risk. This means that there will be a whole new market for software including an OS which I feel Microsoft has covered already. If things go the way as they have in the past eventually there will be a new platform for the desktop users. Itanium is a 64 bit platform. For more info about Itanium goto www.intel.com were you can get the information concerning this new platform better than I can provide. Good Luck from, Danny |