dev-cpp-users Mailing List for Dev-C++ (Page 214)
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: <gen...@ya...> - 2004-05-28 07:51:25
|
the kernel32 and user32 libraries aren't for GDI. they're for basic Windows services. kernel32 handles OS interfacing, and user32 handles the UI. there are some function calls that one might think belong to the GDI set, but actually are UI functions. example is DrawText(), which iirc uses a device context, which is GDI-related. for Win32 programs generally, just link with all 3, that is libkernel32.a, libuser32.a, and libgdi32.a, so you don't miss anything. ____________________________________________________________ Yahoo! Messenger - Communicate instantly..."Ping" your friends today! Download Messenger Now http://uk.messenger.yahoo.com/download/index.html |
|
From: Per W. <pw...@ia...> - 2004-05-28 04:17:02
|
Yes, you get the address of the array. But cout etc always assumes that a pointer to a char is not just a pointer to a single character but actually a pointer to the first character of a zero-terminated string. cout will then emit the string. /Per W On Thu, 27 May 2004, Noorez Kassam wrote: > Question with arrays. > > When you do something like this > > char string[] = "Hello"; > cout << string; > you get the result Hello. > I thought that if you used the name of the array with out the reference you > would get the address of the array? > > _________________________________________________________________ > Tired of spam? Get advanced junk mail protection with MSN Premium > http://join.msn.com/?pgmarket=en-ca&page=byoa/prem&xAPID=1994&DI=1034&SU=http://hotmail.com/enca&HL=Market_MSNIS_Taglines > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: Oracle 10g > Get certified on the hottest thing ever to hit the market... Oracle 10g. > Take an Oracle 10g class now, and we'll give you the exam FREE. > http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click > _______________________________________________ > Dev-cpp-users mailing list > Dev...@li... > TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > |
|
From: Noorez K. <coo...@ho...> - 2004-05-28 03:54:58
|
Question with arrays. When you do something like this char string[] = "Hello"; cout << string; you get the result Hello. I thought that if you used the name of the array with out the reference you would get the address of the array? _________________________________________________________________ Tired of spam? Get advanced junk mail protection with MSN Premium http://join.msn.com/?pgmarket=en-ca&page=byoa/prem&xAPID=1994&DI=1034&SU=http://hotmail.com/enca&HL=Market_MSNIS_Taglines |
|
From: Per W. <pw...@ia...> - 2004-05-28 03:10:59
|
A character pointer is a pointer to a character. A string is a sequence of
characters. Because of that, it is possible for a character pointer to
point at the first character of the string.
See more below.
/Per W
On Thu, 27 May 2004, Noorez Kassam wrote:
> Need some help understanding pointers.
>
> I can understand this
>
> int main()
> {
> char charArray[10];
> char* pArray = charArray;
> for(int i =0; i <10; i++)
> {
> *pArray ='\0';
> pArray++;
> }
> }
>
> I don't inderstand this. It came from a book I am reading
>
> char* pszMonth;
> pszMonth = "January";
Will point to the 'J' character of January. A printout using pszMonth will
then print out all characters until the terminating zero that ends the
string "January". The psz prefix means Pointer to Zero-terminated String.
The assign is of course without a '*' since the assign is of one pointer
(address of string "January" to another pointer pszMonth. Had a star been
used on pszMonth, you might have written:
char ch;
char* pszChar = &ch; // Make pointer point at some available space.
*pszChar = 'J'; // Assign a character to *pszChar position, i.e. ch.
ch will now be 'J', since pszChar pointed to ch - thereby making the above
assignment the same as ch = 'J'.
>
> this is just a bit of code. But I don't see how this can be. First how can
> you make the assignment without the * and how can you put a string in a char
> pointer. A char like that should only hold one character.
>
> _________________________________________________________________
> Add photos to your e-mail with MSN Premium. Get 2 months FREE*
> http://join.msn.com/?pgmarket=en-ca&page=byoa/prem&xAPID=1994&DI=1034&SU=http://hotmail.com/enca&HL=Market_MSNIS_Taglines
>
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by: Oracle 10g
> Get certified on the hottest thing ever to hit the market... Oracle 10g.
> Take an Oracle 10g class now, and we'll give you the exam FREE.
> http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click
> _______________________________________________
> Dev-cpp-users mailing list
> Dev...@li...
> TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm
> https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
>
|
|
From: Nicolas R. <ni...@bo...> - 2004-05-28 03:05:26
|
> I don't inderstand this. It came from a book I am reading
>
> char* pszMonth;
> pszMonth = "January";
>
> how can you put a string in a char pointer. A char like that should
> only hold one character
Your book is using C string conventions. C has no special data type for
character strings; instead they are stored as arrays of characters.
(Indeed, arrays and pointers have lots in common -- hint: the char
pointer is pointing to the 1st char of the array). C provides special
support for character arrays that do not extend to other kinds of
arrays. For example, C provides ways to print them (in printf and other
output statements) and to read them (in scanf and other input
statements). C also provides a number of library routines that compute
the lengths of strings, append two strings, and the like. It also
provides special syntax to "assign" strings to char pointers, which is
where that strange assignment comes to life.
C++ provides higher level abstractions, such as a proper 'string' class
and a 'vector' container class.
I'd advise you to
a) google for: c string pointer array char
(e.g. see http://www.sepsis.za.net/programming_c07.html)
b) google for: c++ string class
(e.g. see http://www.bgsu.edu/departments/compsci/docs/string.html)
c) google for: c++ faq "arrays are evil"
(e.g. see
http://www.parashift.com/c++-faq-lite/containers-and-templates.html)
Good luck!
N.
|
|
From: Noorez K. <coo...@ho...> - 2004-05-28 02:34:45
|
Need some help understanding pointers.
I can understand this
int main()
{
char charArray[10];
char* pArray = charArray;
for(int i =0; i <10; i++)
{
*pArray ='\0';
pArray++;
}
}
I don't inderstand this. It came from a book I am reading
char* pszMonth;
pszMonth = "January";
this is just a bit of code. But I don't see how this can be. First how can
you make the assignment without the * and how can you put a string in a char
pointer. A char like that should only hold one character.
_________________________________________________________________
Add photos to your e-mail with MSN Premium. Get 2 months FREE*
http://join.msn.com/?pgmarket=en-ca&page=byoa/prem&xAPID=1994&DI=1034&SU=http://hotmail.com/enca&HL=Market_MSNIS_Taglines
|
|
From: Noorez K. <coo...@ho...> - 2004-05-28 02:26:58
|
something is wrong with the both the switch statements.
#include <iostream>
#include <cstdlib>
#include <string>
using namespace std;
int main(int args, char* pszArgs[])//there needs to be args for this to work
{
if(strcmp(pszArgs[1],"-nt")== 0)
{
system("cls");//start with a clear screen
//explain what the heck all this does
cout << "Welcome to the easy program opener!\n";
cout << "Hear is a list of programs that can be easy opened\n\n";
cout << "To quit enter 0 or nothing for a program choice\n";
cout << "1. Microsoft Office\n";
cout << "2. Microsoft Paint\n";
cout << "3. Calculator\n";
cout << "4. Internet Explorer\n";
int choice;
while(1)
{//while
choice = 0;
cout << "\nEnter the number of your choice: ";
cin >> choice;
switch(choice)
{//switch
case 0:
cout << "Exiting easy opener...\n";
//Sleep(1000);
return 0;
break;
case 1:
system("start winword");
break;
case 2:
system("mspaint");
break;
case 3:
system("calc");
break;
case 4:
char site[123];
char intern[] ="start iexplore ";
cout << "Enter site: ";
cin >> site;
strcat(intern,site);
system(intern);
break;
default://the choice wasn't a valid one if we are at default
cout << "Not a valid choice\n";
}//switch
}//end while
}//done defining nt operating system
if(strcmp(pszArgs[1],"-me")==0)
{
system("cls");
cout << "Welcome to the easy program opener!\n";
cout << "Hear is a list of programs that can be easy opened\n\n";
cout << "To quit enter 0 or nothing for a program choice\n";
cout << "1. Microsoft Office\n";
cout << "2. Microsoft Paint\n";
cout << "3. Calculator\n";
cout << "4. Internet Explorer\n";
int choice;
while(1)
{
cout << endl << "Enter choice: ";
cin >> choice;
switch(choice)
{
case 0:
cout << "Exiting easy opener...\n";
//Sleep(1000);
return 0;
break;
case 1:
system("start winword");
break;
case 2:
system("pbrush");
break;
case 3:
system("calc");
break;
case 4:
char site[123];
char intern[] ="start iexplore ";
cout << "Enter site: ";
cin >> site;
strcat(intern,site);
system(intern);
break;
default:
cout << "Not a valid choice\n";
}//end switch
}//end while
}//end defining me operating system
if(strcmp(pszArgs[1],NULL)==0 )//opps! nothing found!
{
cout << "This program requries the use of Args\n"
<< "Use the name of your operating system\n"
<< "eg... -me for Millenium Edition\n\n";
cout << "Open a command prompt window and type pszArgs[0] -<short name
of system>";
cout << "Just don't use the << ";
system("pause");
return 1;
}
return 0;//exit program
}
_________________________________________________________________
MSN Premium with Virus Guard and Firewall* from McAfee® Security : 2 months
FREE*
http://join.msn.com/?pgmarket=en-ca&page=byoa/prem&xAPID=1994&DI=1034&SU=http://hotmail.com/enca&HL=Market_MSNIS_Taglines
|
|
From: Per W. <pw...@ia...> - 2004-05-27 21:31:06
|
First of all, A variable type Employee should be a single employee and not a container object. The nameing is confusing. Secind - why a vector? Are empoloyees a numbered, continuous sequence? I would more think of a map, which maps from an employee identifier (employment sequence number or whatever) and the employee data. Then you might write an DeleteEmployee() fnctions that takes the key value of an employee and locates the employee in the map. You might also remove an employee directly by iterating through the map and using the iterator to specify which employee to delete. If you can have only a single map of employees (you were planning on declaring your vector in the implementation file) you don't need any reference to the container in your deleteEmployee() and addEmployee() calls. If addEmployee() and deleteEmployee() are ordinary functions they might access the employees container as a static global variable inside the implementation file. However, you should think about your need to write specific functions for add and remove of employees. If you want to perform special actions it might be an idea to create an Employees class owning the container and having add()/remove() as methods. If no extra work is needed, you don't need addEmployee(), deleteEmployee() since you may operate directly on the container. /Per W On Thu, 27 May 2004, Dane Ensign wrote: > Hi, > > First, thank you in advance for any help you can offer. > > Im working on a very limited and elementary program and I need help > setting it up correctly. > I have made a basic Employee class. I want to make a vector of Employee > objects. I need > to be able to add, delete, and update Employee data, which is why I > think I need a vector of them. > > To begin with, I think that I would include the <vector> in my Employee > implementation file. > Then declare an Employee vector. When the user wanted to delete one, I > would pass an indexed Employee vector as a parameter into a > deleteEmployee() function. > Would the function headerline look like this? > > void deleteEmployee(Employee Emp ()) // Employee is the class, and Emp > is the name of the vector. > > Once I have successfully passed the Employee vector (i) into the > function I think I would use a vector class function > like: > vectorList.erase( i ); > > to delete the employee record. How does this look to you? > > Dane > > > > > > ---------------------------------------------------- |
|
From: Dane E. <DE...@pa...> - 2004-05-27 20:34:13
|
Hi, =20 First, thank you in advance for any help you can offer. =20 Im working on a very limited and elementary program and I need help setting it up correctly. I have made a basic Employee class. I want to make a vector of Employee objects. I need=20 to be able to add, delete, and update Employee data, which is why I think I need a vector of them. =20 To begin with, I think that I would include the <vector> in my Employee implementation file. Then declare an Employee vector. When the user wanted to delete one, I would pass an indexed Employee vector as a parameter into a deleteEmployee() function. Would the function headerline look like this? =20 void deleteEmployee(Employee Emp ()) // Employee is the class, and Emp is the name of the vector. =20 Once I have successfully passed the Employee vector (i) into the function I think I would use a vector class function like:=20 vectorList.erase( i ); =20 to delete the employee record. How does this look to you? Dane =20 =20 |
|
From: <wa...@wa...> - 2004-05-27 16:58:19
|
On 27 May 2004 at 12:00, Damien A wrote: > > "ld (and therefore gcc) is sensitive about the order in which > libraries and object > files are specied on the command line. If libfoo.so depends on > libbar.so, you > must specify libfoo.so first (as counterintuitive as this may be). The > reason is that ld keeps track only of unresolved symbols as it links. > If libfoo.so and libbar.so depend on each other, one of the libraries > will have to be specified twice (for example, -lfoo -lbar -lfoo)." > -Programming Linux Games , pg 33 Wow. Interesting. Thanks! Watson |
|
From: <wa...@wa...> - 2004-05-27 16:41:00
|
On 27 May 2004 at 8:47, Siva Chandra wrote: > > Hello all, > > I am trying to understand how the linker goes about > doing its work. Say I have two linker options -lx and > -ly. If I pass them in the order -lx -ly the linker > seems to be doing its job fine. But if I pass -ly -lx > the linker spits hell a lot of undefined references at > me!! Can someone throw light on how the linker goes > about doing its work under the hood. Specifically, > what has the order got to do with it? The order shouldn't have anything to do with it. Watson |
|
From: Damien A <g_...@ho...> - 2004-05-27 16:01:41
|
<html><div style='background-color:'><DIV class=RTE> <P><BR>"ld (and therefore gcc) is sensitive about the order in which libraries and object<BR>files are specied on the command line. If libfoo.so depends on libbar.so, you<BR>must specify libfoo.so first (as counterintuitive as this may be). The reason is<BR>that ld keeps track only of unresolved symbols as it links. If libfoo.so and<BR>libbar.so depend on each other, one of the libraries will have to be specified<BR>twice (for example, -lfoo -lbar -lfoo)." -Programming Linux Games , pg 33<BR></P></DIV> <DIV></DIV>----Original Message Follows---- <DIV></DIV>From: Siva Chandra <siv...@ya...> <DIV></DIV>To: dev...@li... <DIV></DIV>Subject: [Dev-C++] Linker :: Under the hood. <DIV></DIV>Date: Thu, 27 May 2004 08:47:17 -0700 (PDT) <DIV></DIV> <P>MIME-Version: 1.0 </P> <P> </P> <DIV></DIV> <DIV></DIV> <DIV></DIV> <DIV></DIV>Hello all, <DIV></DIV> <DIV></DIV>I am trying to understand how the linker goes about <DIV></DIV>doing its work. Say I have two linker options -lx and <DIV></DIV>-ly. If I pass them in the order -lx -ly the linker <DIV></DIV>seems to be doing its job fine. But if I pass -ly -lx <DIV></DIV>the linker spits hell a lot of undefined references at <DIV></DIV>me!! Can someone throw light on how the linker goes <DIV></DIV>about doing its work under the hood. Specifically, <DIV></DIV>what has the order got to do with it? <DIV></DIV> <DIV></DIV>Siva Chandra <DIV></DIV> <DIV></DIV> <DIV></DIV> <DIV></DIV> <DIV></DIV>__________________________________ <DIV></DIV>Do you Yahoo!? <DIV></DIV>Friends. Fun. Try the all-new Yahoo! Messenger. <DIV></DIV>http://messenger.yahoo.com/ <DIV></DIV> <DIV></DIV> <DIV></DIV>------------------------------------------------------- <DIV></DIV>This SF.Net email is sponsored by: Oracle 10g <DIV></DIV>Get certified on the hottest thing ever to hit the market... Oracle 10g. <DIV></DIV>Take an Oracle 10g class now, and we'll give you the exam FREE. <DIV></DIV>http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click <DIV></DIV>_______________________________________________ <DIV></DIV>Dev-cpp-users mailing list <DIV></DIV>Dev...@li... <DIV></DIV>TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm <DIV></DIV>https://lists.sourceforge.net/lists/listinfo/dev-cpp-users <DIV></DIV></div><br clear=all><hr>STOP MORE SPAM with <a href="http://g.msn.com/8HMAEN/2728??PS=47575">the new MSN 8</a> and get 2 months FREE*</html> |
|
From: Siva C. <siv...@ya...> - 2004-05-27 15:47:23
|
Hello all, I am trying to understand how the linker goes about doing its work. Say I have two linker options -lx and -ly. If I pass them in the order -lx -ly the linker seems to be doing its job fine. But if I pass -ly -lx the linker spits hell a lot of undefined references at me!! Can someone throw light on how the linker goes about doing its work under the hood. Specifically, what has the order got to do with it? Siva Chandra __________________________________ Do you Yahoo!? Friends. Fun. Try the all-new Yahoo! Messenger. http://messenger.yahoo.com/ |
|
From: Jay B. <jay...@ni...> - 2004-05-27 15:39:25
|
[snip] C:\> sqlite test.db SQLite> CREATE TABLE TTEST (CODE INTEGER, NAME = VARCHAR2(50)); SQLite> INSERT INTO TTEST VALUES (1,'ACAYMO'); SQLite> INSERT INTO TTEST VALUES(2,'OTRO'); SQLite> .quit=20 [/snip] =20 It is right there in your create table statement. You named the table = TTEST (two T's). You are trying to connect to TEST (one T) =20 =09 =20 |
|
From: <wa...@wa...> - 2004-05-27 14:51:07
|
On 27 May 2004 at 9:21, Oladipo Odumosu wrote: > okay, besides, you have to use -lkernel32 -luser32 in > your linker options. it might be better to use the > Windows application template for your program (make it > a project). or go to project options and make sure > you're using 'Win32 GUI' on the 'General' tab. I've never had to link in kernel32 or user32 in my GDI applications. Watson |
|
From: <gen...@ya...> - 2004-05-27 08:21:47
|
okay, besides, you have to use -lkernel32 -luser32 in your linker options. it might be better to use the Windows application template for your program (make it a project). or go to project options and make sure you're using 'Win32 GUI' on the 'General' tab. --- wa...@wa... wrote: > On 26 May 2004 at 20:26, Brian Downing wrote: > > > I'm new to programming windows, so bear with me! > I am using the > > Dev-C++ compiler and have what I hope is a simple > problem. I am > > going over code in a game programming text and the > functions that > are > > related to GDI (MovetoEx, LineTo, > CreateSolidBrush, etc) are > showing > > as linker errors (undefined references). The > files are all open > > under the same project. I'm including windows.h. > Any suggestions? > > > You have to link the GDI library in. If it's a > standalone/non- > project file, then go to Compiler Options and add > -lgdi32 to the link > command line. If it's a project, go to Project > Options->Parameters > and add -lgdi32 to the Linker. > > In general, if you have a function or functions that > aren't getting > linked in, you can search for the function names in > the lib > directory. The file will be named something like > libgdi32.a. You > include that into the linker by adding -l and then > stripping of the > lib and the '.a'. > > BTW, if you have Windows XP, then your search > function is "broken". > Read this: > http://www.pcmag.com/article2/0,4149,1202777,00.asp > > HTH. > > Watson Davis > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: Oracle 10g > Get certified on the hottest thing ever to hit the > market... Oracle 10g. > Take an Oracle 10g class now, and we'll give you the > exam FREE. > http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click > _______________________________________________ > Dev-cpp-users mailing list > Dev...@li... > TO UNSUBSCRIBE: > http://www23.brinkster.com/noicys/devcpp/ub.htm > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users ____________________________________________________________ Yahoo! Messenger - Communicate instantly..."Ping" your friends today! Download Messenger Now http://uk.messenger.yahoo.com/download/index.html |
|
From: <wa...@wa...> - 2004-05-27 05:48:12
|
On 26 May 2004 at 20:26, Brian Downing wrote: > I'm new to programming windows, so bear with me! I am using the > Dev-C++ compiler and have what I hope is a simple problem. I am > going over code in a game programming text and the functions that are > related to GDI (MovetoEx, LineTo, CreateSolidBrush, etc) are showing > as linker errors (undefined references). The files are all open > under the same project. I'm including windows.h. Any suggestions? You have to link the GDI library in. If it's a standalone/non- project file, then go to Compiler Options and add -lgdi32 to the link command line. If it's a project, go to Project Options->Parameters and add -lgdi32 to the Linker. In general, if you have a function or functions that aren't getting linked in, you can search for the function names in the lib directory. The file will be named something like libgdi32.a. You include that into the linker by adding -l and then stripping of the lib and the '.a'. BTW, if you have Windows XP, then your search function is "broken". Read this: http://www.pcmag.com/article2/0,4149,1202777,00.asp HTH. Watson Davis |
|
From: Brian D. <Bri...@ms...> - 2004-05-27 03:26:25
|
I'm new to programming windows, so bear with me! I am using the = Dev-C++ compiler and have what I hope is a simple problem. I am going = over code in a game programming text and the functions that are related = to GDI (MovetoEx, LineTo, CreateSolidBrush, etc) are showing as linker = errors (undefined references). The files are all open under the same = project. I'm including windows.h. Any suggestions? Brian |
|
From: <A_B...@gm...> - 2004-05-26 17:57:53
|
Thanks to all who replied !!! :-) I had a look on SQLite and it seems that this will be my choice !!! It's pretty easy to implement and doesn't need any dlls !!! thx, Acki |
|
From: Alf C S. <al...@st...> - 2004-05-26 09:32:01
|
On Tue, 25 May 2004, Clive Levinson wrote:
> Hi Alf,
> I have had no trouble building GTK+ apps using cygwin under Windows.
> A partial extract from my make file may help you solve your problem.
>
> GTK_CFLAGS=-c -Wall -mno-cygwin -mms-bitfields -O2 `pkg-config --cflags
> gtk+-2.0`
> GTK_LIBS=`pkg-config --libs gtk+-2.0`
> GTK_LFLAGS=-Wall -mno-cygwin -mms-bitfields -s -mwindows
>
> gcc $(GTK_CFLAGS) app.cpp -o app.o
> windres -i resource.rc -o resource.o
> g++ $(GTK_LFLAGS) -o app.exe app.o resource.o $(GTK_LIBS)
>
> Note that I am using the -mno-cygwin which instructs gcc not to link with
> the cygwin
> libraries (effectively makes cygwin gcc act like MinGW). This flag is only
> probably
> required for linking, not for compiling, but it doesn't seem to do any harm.
>
Thank you for that. Interesting that I did not find a GTK_LFLAGS in the
Makefile.
For reference my Makefile.win is as follows
# Project: BoBReprint
# Makefile created by Dev-C++ 4.9.8.0
CPP = \Dev-Cpp\bin\g++.exe
CC = \Dev-Cpp\bin\gcc.exe
WINDRES = \Dev-Cpp\bin\windres.exe
RES =
OBJ = callbacks.o interface.o main.o support.o $(RES)
LINKOBJ = callbacks.o interface.o main.o support.o $(RES)
LIBS = -L"C:/Dev-C++/lib" -L"C:/Program Files/Common Files/GTK/2.0/lib"
-L"C:/Dev-C++/lib" -mwindows c:/Dev-C++/lib/gtk-win32-2.0.lib
c:/Dev-C++/lib/gobject-2.0.lib c:/Dev-C++/lib/glib-2.0.lib
c:/Dev-C++/lib/gdk_pixbuf-2.0.lib c:/Dev-C++/lib/atk-1.0.lib
INCS = -I"C:/Dev-C++/include" -I"C:/Dev-C++/include/gtk-2.0/gtk"
-I"C:/Dev-C++/include/gtk-2.0/gdk" -I"C:/Dev-C++/include/gtk-2.0/gdk"
-I"C:/Dev-C++/include/gtk-2.0/gdk-pixbuf" -I"C:/Dev-C++/include/gtk-2.0/gtk"
-I"C:/Dev-C++/include/glib-2.0" -I"C:/Dev-C++/include/pango-1.0/pango"
-I"C:/Dev-C++/lib/glib-2.0/include" -I"C:/Dev-C++/include/glib-2.0/glib"
-I"C:/Dev-C++/lib/gtk-2.0/include" -I"C:/Dev-C++/include/gtk-2.0/gdk-pixbuf"
-I"C:/Dev-C++/include/atk-1.0/atk"
CXXINCS = -I"C:/Dev-C++/include/c++" -I"C:/Dev-C++/include/c++/mingw32"
-I"C:/Dev-C++/include/c++/backward" -I"C:/Dev-C++/include"
-I"C:/Dev-C++/include/gtk-2.0/gdk" -I"C:/Dev-C++/include/gtk-2.0/gdk-pixbuf"
-I"C:/Dev-C++/include/gtk-2.0/gtk" -I"C:/Dev-C++/include/glib-2.0"
-I"C:/Dev-C++/include/pango-1.0/pango" -I"C:/Dev-C++/lib/glib-2.0/include"
-I"C:/Dev-C++/include/glib-2.0/glib" -I"C:/Dev-C++/lib/gtk-2.0/include"
-I"C:/Dev-C++/include/gtk-2.0/gdk-pixbuf" -I"C:/Dev-C++/include/atk-1.0/atk"
BIN = BoBReprint.exe
CXXFLAGS = $(CXXINCS)
CFLAGS = $(INCS)-m ms-bitfields
.PHONY: all all-before all-after clean clean-custom
all: all-before BoBReprint.exe all-after
clean: clean-custom
rm -f $(OBJ) $(BIN)
$(BIN): $(LINKOBJ)
$(CC) $(LINKOBJ) -o "BoBReprint.exe" $(LIBS)
callbacks.o: callbacks.c
$(CC) -c callbacks.c -o callbacks.o $(CFLAGS)
interface.o: interface.c
$(CC) -c interface.c -o interface.o $(CFLAGS)
main.o: main.c
$(CC) -c main.c -o main.o $(CFLAGS)
support.o: support.c
$(CC) -c support.c -o support.o $(CFLAGS)
and under CFLAGS I find "$(INCS)-m ms-bitfields" does this make sense? and
CFLAGS is not in the link at "$(CC) $(LINKOBJ) -o "BoBReprint.exe" $(LIBS)"
which I believe prooves that I have placed the "-m ms-bitfields" in the wrong
place in the IDE?
---
Regards,
Alf Stockton www.stockton.co.za
VYARZERZOMANIMORORSEZASSEZANSERAREORSES?
|
|
From: Alf C S. <al...@st...> - 2004-05-26 09:31:48
|
I am now getting "Could not open language file English.lng" when starting Dev-C++ 4.9.8.0. This despite the fact that the file exists in /Dev-Cpp/Lang/English.lng. This was not happening previously. So please let me know what I have done wrong. --- Regards, Alf Stockton www.stockton.co.za A copy of the universe is not what is required of art; one of the damned things is ample. -- Rebecca West |
|
From: <wa...@wa...> - 2004-05-26 05:38:11
|
According to your compile log, you should be looking for g++.exe.
On 25 May 2004 at 22:12, fa...@uc... wrote:
> My code is below
>
>
> #include <iostream>
>
> using namespace std;
>
> int main (int argc, char *argv[])
> {
> cout << "Hello World!" << endl;
> cout << "Press ENTER to continue..." << endl;
> cin.get();
> return 0;
> }
>
> it is actually theone that came with the program as examples
>
>
> the compiler log says:
>
> g++.exe "C:\Dev-Cpp\hellow.cpp" -o "C:\Dev-Cpp\hellow.exe"
> -I"C:\Dev- Cpp\include\c++" -I"C:\Dev-Cpp\include\c++\mingw32"
> -I"C:\Dev- Cpp\include\c++\backward"
> -I"C:\Dev-Cpp\lib\gcc-lib\mingw32\3.2\include" -
> I"C:\Dev-Cpp\include" -L"C:\Dev-Cpp\lib"-lobjc Execution terminated
>
>
> I searched for gcc it wasn't found anywhere on my computer.
>
>
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by: Oracle 10g
> Get certified on the hottest thing ever to hit the market... Oracle
> 10g. Take an Oracle 10g class now, and we'll give you the exam FREE.
> http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click
> _______________________________________________ Dev-cpp-users mailing
> list Dev...@li... TO UNSUBSCRIBE:
> http://www23.brinkster.com/noicys/devcpp/ub.htm
> https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
|
|
From: Alf C S. <al...@st...> - 2004-05-26 04:56:54
|
I am getting the following error message when attempting to run a program
compiled under Dev-C++.
g_error ("Incompatible build!\n"
"The code using GTK+ thinks GtkWindow is of different\n"
"size than it actually is in this build of GTK+.\n"
"On Windows, this probably means that you have compiled\n"
"your code with gcc without the -fnative-struct\n"
"(or -mms-bitfields) switch, or that you are using\n"
"an unsupported compiler.");
Where do I need to add the -mms-bitfields gcc switch.
---
Regards,
Alf Stockton www.stockton.co.za
There can be no twisted thought without a twisted molecule.
-- R. W. Gerard
|
|
From: Alf C S. <al...@st...> - 2004-05-26 04:53:02
|
I apparently need to add -mms-bitfields to my setup of Dev-C++ but I attempted this and I still don't get it correct. Please tell me where should this be added? --- Regards, Alf Stockton www.stockton.co.za God is not dead! He's alive and autographing bibles at Cody's |
|
From: <fa...@uc...> - 2004-05-26 04:12:59
|
My code is below
#include <iostream>
using namespace std;
int main (int argc, char *argv[])
{
cout << "Hello World!" << endl;
cout << "Press ENTER to continue..." << endl;
cin.get();
return 0;
}
it is actually theone that came with the program as examples
the compiler log says:
g++.exe "C:\Dev-Cpp\hellow.cpp" -o "C:\Dev-Cpp\hellow.exe" -I"C:\Dev-
Cpp\include\c++" -I"C:\Dev-Cpp\include\c++\mingw32" -I"C:\Dev-
Cpp\include\c++\backward" -I"C:\Dev-Cpp\lib\gcc-lib\mingw32\3.2\include" -
I"C:\Dev-Cpp\include" -L"C:\Dev-Cpp\lib"-lobjc
Execution terminated
I searched for gcc it wasn't found anywhere on my computer.
|