Programming :: Adding Source To C Project To Include Mysql.h = New Errors?
Jul 14, 2009
I am trying to modify the source code of a C application (quagga) in order to insert data into a mysql table. I have added 2 new source files to the source (neto_mysql, neto_trend) which in turn use mysql.h. I have also modified the Makefile.am file to include the /usr/include/mysql directory.
When trying to compile, i get the following error. What am I missing? I have minimal experience with formal C applications like this. I feel like I may also have to include the mysql.h file in the libbgp? I dont understand why it cant find the mysql functions...
I'm starting a open source project which involves web based Java, JBoss application server and JBoss Seam framework. I'm a student and I work on the project in my free time for training. Every one who want to take a part in this hobby project in his free time is invited. Send me e-mail.
There is a module A which is compiled with the kernel. I wrote an external module B which exported a symbol using EXPORT_SYMBOL.The module A now needs to talk with that exported symbol (function call). For that i modified A so that it includes the function call from B. However i now get unidentified symbol errors during 'make' operation as symbols of B are not present during kernel compile and A now kind of depends on B.
One solution is that make B part of the kernel as well. However, it would mean that whenever now i try to compile a kernel with a different source, i have to modify the config files and everything to accommodate B.Hence i am seeking a solution which does not include modifying the kernel.
I am reading Sams Teach Yourself SQL in one hour a day. In this book they work with both Oracle and MySQL to teach you SQL. So I installed mysql on my box and I am creating the empty database they use in this book so I can follow along as I read. I have noticed a few typos in the book and now I have noticed some code errors too. I just don't know enough to fix em. I am working on creating the empty database and I am getting syntax errors when I create certain tables. I have checked both the printed version of the book and the electronic version (which differ slightly) and both give me the same synatax errors. First is Creating the first table of the database. Here is the code given to me to enter. The Electronic version
[code]...
how I can correct this error and create these tables?
I'm trying to make a program for Windows Me and linux that will mimic/imitate Windows Security Center. Maybe put it in the cloud? WIndows Me is good, it doesn't matter that Windows Me is discontinued, and I'm not trolling. But my main focus is linux.
I don't have Linux yet but I'm almos ready to change from windows to Linux. I'm working on a web site that I built with Frontpage. I did a lot of works on it and I just want to know if they have an open source compatible with linux that could open and let me edit the projet I already beguin? I realy don't want to loose all my work! So I need to know if is possible before I change to Linux.
This is for the Linksys AE1000. This may work for other USB wireless network adapters, but I don't know for sure. Here is the original information ( Ubuntu's Forums ) about a very similar card. It clarifies that you need the 'rt3572sta', and some modifications are required to the source from ralink's website to include your Vendor and Product Id. Then modify a few files, and away you go. Step 1) Retrieve your Vendor and Product Id. Easiest way is doing 'sudo tail -f /var/log/messages' and then plugging in your USB device.
Code: Apr 22 15:35:12 localhost kernel: usb 1-3: new high speed USB device using ehci_hcd and address 20 Apr 22 15:35:12 localhost kernel: usb 1-3: New USB device found, idVendor=13b1, idProduct=002f Apr 22 15:35:12 localhost kernel: usb 1-3: New USB device strings: Mfr=1, Product=2, SerialNumber=3 Apr 22 15:35:12 localhost kernel: usb 1-3: Product: Linksys AE1000 Apr 22 15:35:12 localhost kernel: usb 1-3: Manufacturer: Linksys Apr 22 15:35:12 localhost kernel: usb 1-3: configuration #1 chosen from 1 choice
I vaguely remember that there is a way to store instructions for vim in my file (like tabstop width etc). I'm not speaking of settings in vimrc but of storing those settings with in the file to be edited. That way the tabstop has always the right width even if I transfer this file to another computer. However, I can't remember what the magic word is so that vim picks up those settings when loading the file.
Is there any reason why taskjuggler is not included in openSUSE? I can see a version available in openSUSE Factory but it is not built with latest libs. I have several of my friends asking for Project Management software under openSUSE and I don't know what to advise them.
How tp build a multi-touch table on Ubuntu 10.04. I've starting some research and I see there have been some folks out there have done this on a windows environment...i want to be able to get this going on a Linux environment. what I've found so far is there an open source multi touch project going on called tbeta...not sure if any of you are familiar with tbeta. Has anyone gotten tbeta to work on Ubuntu 10.04? If there are other multi-touch projects going on and working under Linux (hopefully Ubuntu 10.04)
make deb package with samll project of php and myysql database such as login.php, index.php controll.php etc and database_name.sql. when i install this deb package my php script folder should go in /var/www file and databse should create automatically. i edit the control file of deb package , in depends line i set apache2, php and mysql because these three thing are necessary to run my script till here it is ok .but i am not able to send my project in /var/www and configure database automatically . i think for this i have to write .sh file but i dont know bash scripting
I've been working in the real world for a year making some money to go back and finish my masters, and now I'm coming to the end of my contract and am realising how little i remember and how small my scope has become; i basically do shell scripts and perl these days, and its making me uneasy. So instead of bitching about it , I'm going to endevor to complete Project Euler Using randomly generated programming languages for each problem, selected from
And post the fruits of my attempts at my blog (shameless plug) aswell as opening up my svn repository when I'm done. (altho i need to ask in another thread about svn permissions....)To my shame i havent ever touched C#, JavaScript, Ruby or Python, so all in all its going to be very interesting how much i screw up.Anyone have any additional ideas, or languages I'm missing or such? I was considering TCL or Haskell or Erlang at a strech, but i dont know how useful these three would be.
I am running Valgrind on my program. It shows me two errors but mentions only addresses against them and not actual code even on a debug build.
The output is
==23002== Memcheck, a memory error detector. ==23002== Copyright (C) 2002-2005, and GNU GPL'd, by Julian Seward et al. ==23002== Using LibVEX rev 1575, a library for dynamic binary translation.
I'm running 64-bit 10.04, upgraded from 9.10. The problem I am experiencing is that any user accounts aside from my main account are problematic. This includes any accounts I add, as well as the GDM guest session.The specific problems that I have thus far experienced are as follows:
1. The desktop loads often improperly. In the latest instance of this the graphics on the right side top panel were randomly chopped-up, leaving parts of my clock on either side of the volume control, among other things. 2. If I make ANY customizations to the desktop at all, the desktop takes nearly a full minute to load on log-in. 3. Flash videos don't work properly on Firefox. Sometimes they only play after refreshing a page, often they will not load at all. Also, attempting to load or play a flash video will sometimes causes Gnome or Firefox to crash. 4. (And this is the one that REALLY has me stumped) Whenever I log into my main accountant after logging out of another account, the IBus control appears in my system tray.However, when I open the IBus preferences the associated check box is (and has always remained) unchecked.Not sure where to go with this one. More than anything, the IBus bug makes me unsure of where to even begin looking for the problem.
I have the following mysql query which works great.
Code: SELECT msg FROM `logs` WHERE ((`host` = 'aaa.bbb.ccc.ddd') OR (`host` = 'aaa.bbb.ccc.ddd')) AND `msg` REGEXP CONVERT( _utf8 'physical addresses' USING latin1 ) COLLATE latin1_swedish_ci I need to refine this query so that I can query the last # hours using the `datetime` field in the database. I have researched the DATE_SUB function and can query for example the last 1 hour like this:
I'm interested in finding out, specifically, what causes daemon's to be shutdown when I shutdown Ubuntu? I'm use Ubuntu which is why I'm posting here, but I suppose this knowledge could apply to other Disto's too. Perhaps I'm better off to explain with an example:
I wrote a C++ that queries a Mysql database. I want it to run every time the computer is shutdown. I've verified the program works fine, and I've verified that I can run a program on shutdown of the computer by putting it in /etc/rc0.d. The problem is that by the time rc0.d runs my program, mysql has already been shutoff, and it can't connect.
So what I'm wondering is, is there a script or something at a higher level that goes around turning things like daemons as the System shutdowns, but before any of the scripts in rc0.d are run? (It doesn't look like anything in here is shutting down mysql). Something that actually calls mysql shutdown? How I can add my program to be run before mysql shuts down.
Otherwise, I might end up having to get the source code compile by own /sbin/shutdown and tweak it from there. Granted I might end up doing this anyway because there's more stuff I want to customize during shutdown (e.g. abort it under certain conditions), but I'm hoping not to go that far just yet.
when changing /etc/network/interfaces and adding incorrect variables. next time you reboot the system it won't start. in the past with 9.10 & 9.04 ubuntu used to ignore these errors in the file and continue booting. allowing us to correct them later. is there anyway to skip these boot errors?
also some options in menues are disable..when i go to the terminal it shows this msge:<unknown program name>(5763)/ KDevelop::allocateRepository: picked duchain directory "/home/forensic/.kdevduchain/{61e2fad9-a888-45c7-91e7-c7098bc67b94}/0"maybe i made mistake in one step of compiling it..
I would like to ask your opinion for a new C++ project.I just finished writing a chess engine in a software engineering lecture.I don't see any way to continue with that project and I would like some new ideas.I would prefer to start something on my one but suggestions about small open source projects that are already out there are welcome.
I have project released under GPL. I have found an icon (.png) I want to use in it that also has a GPL license. What do I have to do, if anything, to use it legally? It's "just an icon", and while it represents a significant amount of work on someone's part, it doesn't come with any source code or embedded licenses that I can just copy and include with my project files. I'm sure I can use it because it's GPL and my project is GPL.
That's what GPL was designed for, but I don't want anyone to think I'm claiming I designed it or that I took it without giving proper credit. I just reread the GPL, and it looks like I can do anything I want with it as long as I don't restrict anyone else from doing the same and if I were to modify it, I'd have to put a notice "somewhere" (but where would that be for an icon?) acknowledging that modification. I don't see anything that would make me actually mention it at all in my documentation, etc. as long as I pass it along unmodified.
Some time ago mine logs start to show this message
Apr 23 11:03:01 xxxxx kernel: [38048596.800691] martian source 192.168.0.87 from 217.15.41.137, on dev eth1 Apr 23 11:03:01 xxxxx kernel: [38048596.800691] martian source 192.168.0.87 from 217.15.41.137, on dev eth1 Apr 23 11:15:02 xxxxx kernel: [38049523.750307] martian source 192.168.0.87 from 217.15.41.137, on dev eth1
I am working on a Linux embedded C++ project. When I do an install, all of the header files are copied into the target at /usr/include/.My question is, why would the target ever need the C++ header files? It seems to me all the target needs is the executables and the library *.so files.I want to remove the installation of header files into the target but I'm afraid I'm missing something.
I'm learning GTK , and would like to use Codeblocks, and/or KDEvelop, and compile my c files using that, but always get an error about gtk/gtk.h not found, but can't figure out how to add the commands... I normally type gcc -o Program1 main.c `pkg-config --libs --cflags gtk+-2.0` That's a lot to type every time to compile.. Isn't there an easier way, in KDevelop, Monodevelop, and/or Codeblocks to make this step quicker, by adding some sort of I-/usr/include commands, or something?? thanks in advance, =). I looked online for some results, but didn't come across anything handy..
Basically I have a dir that contains my makefile and another directory inside this called source this holds main source files. External to these I have a couple of dirs common and drives.
In my make file I use
To include the protoypes from the headers in the folders common and drivers used by source, this works fine. However in common and drivers I use a few variables that are set in the source dir. I set these with externs inside the common and driver files. However I'm sure I should be able to set the directory path for source inside my makefile. So say I have inside source hardware.h with prototypes, I set DINCDIR = -I/Source -I../Drivers -I../CommonFiles
Then from a c file inside my common folder I say #include "hardware.h" the file should be able to see hardware.h and it's protoypes. However I get:
Is there some way I can get the extern dirs to see the source dir?
What's the best way to include variables in a string using C,i.e if i want to do the following query in C, how would i do that.How do i build the string variable up in C?
I went away this weekend and everything with my mysql server was working great. I got home on sunday, and I found that my web pages couldn't be displayed because they were unable to gain access to the mysql database.
I am now not able to log into mysql using root or debian-sys-maint. I get error messages.
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
I have tried loading mysql in safe mode, and changing the passwords, but this does little to help me.
I am unable to retart my services without them failing, so after making the changes i have to manually kill the processes for mysql to get it to stop. After doing that i try to start mysql up, and it gives me a .sock error. I will post some of the errors in my next post, but if anyone has a general idea what i can try to manually override the passwords or reset them. I did read that i can reset the debian-sys-maint password using the msql/rm.conf , but i am unable to log on as root to change the password
My mysql server won't start on my machine. It simply fails with no errors. Code: sudo /etc/init.d/mysql restart * Stopping MySQL database server mysqld [ OK ] * Starting MySQL database server mysqld [fail]
When I run cat /var/log/mysql.err the file is empty, thinking this might be a permissions issue I tried chowning to a mysql user. Here's the current permissions. Code: ls -alh /var/log/mysql* -rw-r----- 1 mysql adm 0 2009-09-30 11:08 /var/log/mysql.err -rw-r----- 1 mysql adm 0 2010-01-15 09:07 /var/log/mysql.log -rw-r----- 1 mysql adm 20 2009-11-25 07:35 /var/log/mysql.log.1.gz -rw-r----- 1 mysql adm 20 2009-11-24 07:59 /var/log/mysql.log.2.gz -rw-r----- 1 mysql adm 20 2009-11-23 07:56 /var/log/mysql.log.3.gz -rw-r----- 1 mysql adm 20 2009-11-22 07:54 /var/log/mysql.log.4.gz -rw-r----- 1 mysql adm 20 2009-11-21 07:47 /var/log/mysql.log.5.gz -rw-r----- 1 mysql adm 20 2009-11-20 07:43 /var/log/mysql.log.6.gz -rw-r----- 1 mysql adm 20 2009-11-19 07:35 /var/log/mysql.log.7.gz
/var/log/mysql: total 8.0K drwxrwsrwx 2 mysql adm 4.0K 2009-09-30 11:08 . drwxr-xr-x 16 root root 4.0K 2010-01-15 10:24 .. Still having the same issue, mysql server is still failing and /var/log/mysql.err is still empty.
I am new to ubuntu. I want to start mysql but its not working! error occurs! " root@drazer-GA-MA785GM-US2H:/etc/init.d# mysql.server start mysql.server: command not found root@drazer-GA-MA785GM-US2H:/etc/init.d# mysql ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO) root@drazer-GA-MA785GM-US2H:/etc/init.d# mysql start ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO) root@drazer-GA-MA785GM-US2H:/etc/init.d# " I have installed mysql client and server packages.