Re: Help needed regarding MySQL-C Libraries on Linux....
Hello. This is an output of diff user.c user.cpp. Which successfully compiles on my FC3 system using the following command: g++ user.cpp -I/usr/include/mysql -lmysqlclient I've changed the extension to 'cpp', so g++ could work with this file. Also #includeconio.h was commented, and main now returns int. [EMAIL PROTECTED] pgm]$ diff user.c user.cpp 2c2 #include conio.h --- //#include conio.h 17c17 void main() --- int main() 52a53 Ashok Kumar [EMAIL PROTECTED] wrote: [-- text/plain, encoding 8bit, charset: iso-8859-1, 29 lines --] Dear Friends, I'm Ashok here. first i'll tell my sys configuration. 1.Redhat-Linux 9 2.Intel Pentium chipset 3.MySQL 4.1 with Development Libraries For this i've downloaded the MySQL4.1 under the specification Linux x86 RPM downloads from the site. In my system, the MySQL Server is working well. I tried to run the C program that will make the connection to the MySQL database and create the user database and useracc table. It's finely working with Windows-VC++. But when i'm trying to run with Linux gcc, I'm getting lots of errors. I don't know what's the problem. I've attached the C-Pgm and the Error info. Pls, help me regarding this. Thanks and Regards, Ashok. Yahoo! Sports Rekindle the Rivalries. Sign up for Fantasy Football http://football.fantasysports.yahoo.com [-- application/zip, encoding base64, 97 lines, name: Pgm_Err.zip --] [-- Description: 3707653052-Pgm_Err.zip --] [-- text/plain, encoding 7bit, charset: us-ascii, 5 lines --] -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is sponsored by Ensita.NET http://www.ensita.net/ __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Gleb Paharenko / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.NET ___/ www.mysql.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Help needed regarding MySQL-C Libraries on Linux....
Dear Friends, I'm Ashok here. first i'll tell my sys configuration. 1.Redhat-Linux 9 2.Intel Pentium chipset 3.MySQL 4.1 with Development Libraries For this i've downloaded the MySQL4.1 under the specification Linux x86 RPM downloads from the site. In my system, the MySQL Server is working well. I tried to run the C program that will make the connection to the MySQL database and create the user database and useracc table. It's finely working with Windows-VC++. But when i'm trying to run with Linux gcc, I'm getting lots of errors. I don't know what's the problem. I've attached the C-Pgm and the Error info. Pls, help me regarding this. Thanks and Regards, Ashok. Yahoo! Sports Rekindle the Rivalries. Sign up for Fantasy Football http://football.fantasysports.yahoo.com[EMAIL PROTECTED] CGI]# gcc -c -I/usr/lib/bcc/include -I/usr/include/mysql user.c In file included from /usr/include/pthread.h:20, from /usr/include/mysql/my_global.h:149, from user.c:3: /usr/include/sched.h:41: parse error before __THROW /usr/include/sched.h:44: parse error before __THROW /usr/include/sched.h:48: parse error before __THROW /usr/include/sched.h:51: parse error before __THROW /usr/include/sched.h:54: parse error before __THROW /usr/include/sched.h:57: parse error before __THROW /usr/include/sched.h:60: parse error before __THROW /usr/include/sched.h:63: parse error before __THROW In file included from /usr/include/mysql/my_global.h:149, from user.c:3: /usr/include/pthread.h:166: parse error before __THROW /usr/include/pthread.h:169: parse error before __THROW /usr/include/pthread.h:172: parse error before __THROW /usr/include/pthread.h:176: parse error before __THROW /usr/include/pthread.h:181: parse error before __THROW /usr/include/pthread.h:187: parse error before __THROW /usr/include/pthread.h:195: parse error before __THROW /usr/include/pthread.h:198: parse error before __THROW /usr/include/pthread.h:202: parse error before __THROW /usr/include/pthread.h:206: parse error before __THROW /usr/include/pthread.h:211: parse error before __THROW /usr/include/pthread.h:217: parse error before __THROW /usr/include/pthread.h:221: parse error before __THROW /usr/include/pthread.h:226: parse error before __THROW /usr/include/pthread.h:230: parse error before __THROW /usr/include/pthread.h:235: parse error before __THROW /usr/include/pthread.h:239: parse error before __THROW /usr/include/pthread.h:243: parse error before __THROW /usr/include/pthread.h:261: parse error before __THROW /usr/include/pthread.h:266: parse error before __THROW /usr/include/pthread.h:285: parse error before __THROW /usr/include/pthread.h:290: parse error before __THROW /usr/include/pthread.h:303: parse error before __THROW /usr/include/pthread.h:309: parse error before __THROW /usr/include/pthread.h:333: parse error before __THROW /usr/include/pthread.h:336: parse error before __THROW /usr/include/pthread.h:339: parse error before __THROW /usr/include/pthread.h:342: parse error before __THROW /usr/include/pthread.h:352: parse error before __THROW /usr/include/pthread.h:359: parse error before __THROW /usr/include/pthread.h:362: parse error before __THROW /usr/include/pthread.h:367: parse error before __THROW /usr/include/pthread.h:371: parse error before __THROW /usr/include/pthread.h:392: parse error before __THROW /usr/include/pthread.h:395: parse error before __THROW /usr/include/pthread.h:398: parse error before __THROW /usr/include/pthread.h:401: parse error before __THROW /usr/include/pthread.h:406: parse error before __THROW /usr/include/pthread.h:415: parse error before __THROW /usr/include/pthread.h:420: parse error before __THROW /usr/include/pthread.h:423: parse error before __THROW /usr/include/pthread.h:428: parse error before __THROW /usr/include/pthread.h:432: parse error before __THROW /usr/include/pthread.h:557: parse error before __THROW /usr/include/pthread.h:560: parse error before __THROW /usr/include/pthread.h:564: parse error before __THROW /usr/include/pthread.h:567: parse error before __THROW /usr/include/pthread.h:577: parse error before __THROW /usr/include/pthread.h:584: parse error before __THROW /usr/include/pthread.h:588: parse error before __THROW /usr/include/pthread.h:591: parse error before __THROW /usr/include/pthread.h:596: parse error before __THROW /usr/include/pthread.h:612: parse error before __THROW /usr/include/pthread.h:621: parse error before __THROW In file included from /usr/include/pthread.h:655, from /usr/include/mysql/my_global.h:149, from user.c:3: /usr/include/bits/sigthread.h:32: parse error before '*' token /usr/include/bits/sigthread.h:36: parse error before __THROW In file included from /usr/include/mysql/my_global.h:149, from user.c:3: /usr/include/pthread.h:673: parse error before __THROW /usr/include/pthread.h:678:
Re: Help needed regarding MySQL-C Libraries on Linux....
The same source that you compiled under VC++ may not work at all under linux. Especially since the header files will be different. Make sure you have the proper header files for linux installed. Also I did not see any linking flags during compilation. On 7/3/05, Ashok Kumar [EMAIL PROTECTED] wrote: Dear Friends, I'm Ashok here. first i'll tell my sys configuration. 1.Redhat-Linux 9 2.Intel Pentium chipset 3.MySQL 4.1 with Development Libraries For this i've downloaded the MySQL4.1 under the specification Linux x86 RPM downloads from the site. In my system, the MySQL Server is working well. I tried to run the C program that will make the connection to the MySQL database and create the user database and useracc table. It's finely working with Windows-VC++. But when i'm trying to run with Linux gcc, I'm getting lots of errors. I don't know what's the problem. I've attached the C-Pgm and the Error info. Pls, help me regarding this. Thanks and Regards, Ashok. Yahoo! Sports Rekindle the Rivalries. Sign up for Fantasy Football http://football.fantasysports.yahoo.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Help needed regarding MySQL-C Libraries on Linux....
Dear Friends, I'm Ashok here. first i'll tell my sys configuration. 1.Redhat-Linux 9 2.Intel Pentium chipset 3.MySQL 4.1 with Development Libraries For this i've downloaded the MySQL4.1 under the specification Linux x86 RPM downloads from the site. In my system, the MySQL Server is working well. I tried to run the C program that will make the connection to the MySQL database and create the user database and useracc table. It's finely working with Windows-VC++. But when i'm trying to run with Linux gcc, I'm getting lots of errors. I don't know what's the problem. I've attached the C-Pgm and the Error info. Pls, help me regarding this. Thanks and Regards, Ashok. Yahoo! Sports Rekindle the Rivalries. Sign up for Fantasy Football http://football.fantasysports.yahoo.com[EMAIL PROTECTED] CGI]# gcc -c -I/usr/lib/bcc/include -I/usr/include/mysql user.c In file included from /usr/include/pthread.h:20, from /usr/include/mysql/my_global.h:149, from user.c:3: /usr/include/sched.h:41: parse error before __THROW /usr/include/sched.h:44: parse error before __THROW /usr/include/sched.h:48: parse error before __THROW /usr/include/sched.h:51: parse error before __THROW /usr/include/sched.h:54: parse error before __THROW /usr/include/sched.h:57: parse error before __THROW /usr/include/sched.h:60: parse error before __THROW /usr/include/sched.h:63: parse error before __THROW In file included from /usr/include/mysql/my_global.h:149, from user.c:3: /usr/include/pthread.h:166: parse error before __THROW /usr/include/pthread.h:169: parse error before __THROW /usr/include/pthread.h:172: parse error before __THROW /usr/include/pthread.h:176: parse error before __THROW /usr/include/pthread.h:181: parse error before __THROW /usr/include/pthread.h:187: parse error before __THROW /usr/include/pthread.h:195: parse error before __THROW /usr/include/pthread.h:198: parse error before __THROW /usr/include/pthread.h:202: parse error before __THROW /usr/include/pthread.h:206: parse error before __THROW /usr/include/pthread.h:211: parse error before __THROW /usr/include/pthread.h:217: parse error before __THROW /usr/include/pthread.h:221: parse error before __THROW /usr/include/pthread.h:226: parse error before __THROW /usr/include/pthread.h:230: parse error before __THROW /usr/include/pthread.h:235: parse error before __THROW /usr/include/pthread.h:239: parse error before __THROW /usr/include/pthread.h:243: parse error before __THROW /usr/include/pthread.h:261: parse error before __THROW /usr/include/pthread.h:266: parse error before __THROW /usr/include/pthread.h:285: parse error before __THROW /usr/include/pthread.h:290: parse error before __THROW /usr/include/pthread.h:303: parse error before __THROW /usr/include/pthread.h:309: parse error before __THROW /usr/include/pthread.h:333: parse error before __THROW /usr/include/pthread.h:336: parse error before __THROW /usr/include/pthread.h:339: parse error before __THROW /usr/include/pthread.h:342: parse error before __THROW /usr/include/pthread.h:352: parse error before __THROW /usr/include/pthread.h:359: parse error before __THROW /usr/include/pthread.h:362: parse error before __THROW /usr/include/pthread.h:367: parse error before __THROW /usr/include/pthread.h:371: parse error before __THROW /usr/include/pthread.h:392: parse error before __THROW /usr/include/pthread.h:395: parse error before __THROW /usr/include/pthread.h:398: parse error before __THROW /usr/include/pthread.h:401: parse error before __THROW /usr/include/pthread.h:406: parse error before __THROW /usr/include/pthread.h:415: parse error before __THROW /usr/include/pthread.h:420: parse error before __THROW /usr/include/pthread.h:423: parse error before __THROW /usr/include/pthread.h:428: parse error before __THROW /usr/include/pthread.h:432: parse error before __THROW /usr/include/pthread.h:557: parse error before __THROW /usr/include/pthread.h:560: parse error before __THROW /usr/include/pthread.h:564: parse error before __THROW /usr/include/pthread.h:567: parse error before __THROW /usr/include/pthread.h:577: parse error before __THROW /usr/include/pthread.h:584: parse error before __THROW /usr/include/pthread.h:588: parse error before __THROW /usr/include/pthread.h:591: parse error before __THROW /usr/include/pthread.h:596: parse error before __THROW /usr/include/pthread.h:612: parse error before __THROW /usr/include/pthread.h:621: parse error before __THROW In file included from /usr/include/pthread.h:655, from /usr/include/mysql/my_global.h:149, from user.c:3: /usr/include/bits/sigthread.h:32: parse error before '*' token /usr/include/bits/sigthread.h:36: parse error before __THROW In file included from /usr/include/mysql/my_global.h:149, from user.c:3: /usr/include/pthread.h:673: parse error before __THROW /usr/include/pthread.h:678:
RE: Help needed regarding MySQL-C Libraries on Linux....
Hi Prashanth, I'm happy to help u. i attached one 'C' code in the previous mail. just use that code for in vc++. Follow the procedure, 1.Create the new win32 Console App. as a empty project and add the attached 'C' file to the project. 2.goto Tools-options-Directories(tab) and in that add the corresponding MySQL Include path and as well as the lib-debug path. 3.goto Project-settings-Link(tab)-General Category-add the name 'libmysql.lib' in lib modules 4.Save the project. 5.Add the MySQL lib-debug path to the environment path variable, which is found in ctrl-panel-system-Advanced-env.var-path (for the dynamic linking of libmysql.dll file). 6.Restart the system (for effect of env path var). 7.Run the project. This c pgm will create one database called user and table named useracc under the db user. Note: Don't forget to change the username and password vars in the pgm if u set anything like that for ur MySQL. For further info on C-MySQL read the following page, some sample chapters are there, that will be useful. http://www.quepublishing.com/articles/article.asp?p=30494seqNum=2rl=1 If u have any doubts means, send that to the group, rather than sending to the seperate person and so that reply will be useful for others also. Thanks and Regards, Ashok. --- Prashanth H. Baragur [EMAIL PROTECTED] wrote: Ashok, Can u do me a favor. Am trying to update the mysql server in windows using VC++ and C code. Am very new to this domain. Can u please send the code u are using in VC++ to me? Your help would be greatly appreciate. Thanks prashanth -Original Message- From: Ashok Kumar [mailto:[EMAIL PROTECTED] Sent: Thursday, June 30, 2005 3:34 PM To: mysql mysql Subject: Help needed regarding MySQL-C Libraries on Linux Dear Friends, I'm Ashok here. first i'll tell my sys configuration. 1.Redhat-Linux 9 2.Intel Pentium chipset 3.MySQL 4.1 with Development Libraries For this i've downloaded the MySQL4.1 under the specification Linux x86 RPM downloads from the site. In my system, the MySQL Server is working well. I tried to run the C program that will make the connection to the MySQL database and create the user database and useracc table. It's finely working with Windows-VC++. But when i'm trying to run with Linux gcc, I'm getting lots of errors. I don't know what's the problem. I've attached the C-Pgm and the Error info. Pls, help me regarding this. Thanks and Regards, Ashok. Yahoo! Sports Rekindle the Rivalries. Sign up for Fantasy Football http://football.fantasysports.yahoo.com Yahoo! Sports Rekindle the Rivalries. Sign up for Fantasy Football http://football.fantasysports.yahoo.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Help needed regarding MySQL-C Libraries on Linux....
Ashok Kumar wrote: Dear Friends, I'm Ashok here. first i'll tell my sys configuration. 1.Redhat-Linux 9 2.Intel Pentium chipset 3.MySQL 4.1 with Development Libraries For this i've downloaded the MySQL4.1 under the specification Linux x86 RPM downloads from the site. In my system, the MySQL Server is working well. I tried to run the C program that will make the connection to the MySQL database and create the user database and useracc table. It's finely working with Windows-VC++. But when i'm trying to run with Linux gcc, I'm getting lots of errors. I don't know what's the problem. I've attached the C-Pgm and the Error info. [EMAIL PROTECTED] CGI]# gcc -c -I/usr/lib/bcc/include -I/usr/include/mysql user.c is BCC the 8086 compiler ? then I'm not sure gcc can deal with those includes. To get the proper flags, I'll advise you to use the mysql_config program like : /usr/local/mysql/bin/mysql_config --cflags (you didn't attach your program, so I can't see what is going on) -- Philippe Poelvoorde COS Trading Ltd. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]