473,657 Members | 2,473 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

`mysql_config --...` does not work

Hello list

For some strange reason `mysql_config --...` does not work. If try something
like

gcc -o progname `mysql_config --cflags` progname.c `mysql_config --libs`

(NOTE: "/usr/local/mysql/bin" is in the PATH var, mysql_config works when
invoked)

the compiler does not find the header files and the libraries... if I execute
the command by hand and paste the output to the gcc/g++ command line it
works, but not with the quotes `mysql...`

I can't run by hand mysql_config and paste the output to the gcc statement
since it will be invoked from a Makefile, and don't want to paste the output
directly into the Makefile since linked libs could vary from one version of
mysql to another... what can I do? generated Makefile should work with any
linux system without changes

I need to have a distribution Makefile working for ANY possible version of
mysql and mysql_config `quoted` does not give the compiler the right
parameters (don't know why).

Is there some way to let the system (linux x86) find the libraries (.a)
*without moving* them to a standard lib path? /etc/ld.so.conf does not work
since libraries are static, not shared...

Am using qmake (Qt) to generate the Makefile and need to make something like

-------------------------------------
TEMPLATE = app
TARGET = myapp

SOURCES = app.cpp
HEADERS = app.h

INCLUDEPATH += `mysql_config --cflags`

CONFIG += qt thread warn_on release
LIBS += `mysql_config --libs` lpthread -ldl -lvoodoo2
-------------------------------------

I've created a library that manages all mysql stuff I need, so can't use mysql
stuff included with Qt 'cos should change all my sources from my applications
already working... necesarily have to use my lib and generate the right
makefiles with qmake...

HELP!!!
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/my***********...ie.nctu.edu.tw

Jul 19 '05 #1
0 1684

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
4845
by: Jonas | last post by:
This works fine in Win XP but does not work at all in Win 98. Private WithEvents objIExplorer As InternetExplorer I have to do it like this to get it to work in Win 98 Dim objIExplorer As InternetExplorer But then I cant see when a user exit my objIExplorer and than an error will show up when I try to open a link in the IE window that does not exist... What can I do about this and way does it not work in win 98?
0
678
by: Miguel Cardenas | last post by:
Hello list For some strange reason `mysql_config --...` does not work. If try something like gcc -o progname `mysql_config --cflags` progname.c `mysql_config --libs` (NOTE: "/usr/local/mysql/bin" is in the PATH var, mysql_config works when invoked)
5
3622
by: me | last post by:
I have a Class Library that contains a Form and several helper classes. A thread gets created that performs processing of data behind the scenes and the Form never gets displayed (it is for debug puposes only and is not normally visable to the user.) The Thread function is actually in the Form class. Now.. What I am seeing is that when I create an instance of this Class Library's Form, which starts the worker thread, it seems to hose up...
22
2606
by: Robert Bralic | last post by:
CAN anybody tell me any address where I can download some small(1000-2000) lines C++ proghram source. Or send me ,a small(1000-2000) lines C++ program source that I can compille with gpp under Linux Suse 7.1. I can't belive that C++ exists. Thanks in advance ! robert.bralic@si.htnet.hr
12
2937
by: Frank Hauptlorenz | last post by:
Hello Out there! I have a DB2 V7.2 Database (Fix11) on Win 2000 Professional. It was before a NT 4 based Domain - now it is a Win 2000 Domain. The database server is a domain member. Now sometimes Win 2000 Clients can't connect to the database. They connect over TCP/IP. The db2log says that the function getHostByName failed. It seems to be only on new installed win 2000 Workstations. Already installed WS have NOT this problem.
0
1368
by: Dave Hammond | last post by:
I recently upgraded to mysql version 4.1.13 (server is SuSE linux 9.3) and attempted to re-install the Perl DBD::mysql module, which kept failing because it couldn't open /tmp/mysql.sock. After spending way too much time trying to figure out why it was trying to find that socket (my.cnf specifies /var/lib/mysql/mysql.sock), I finally realized that mysql_config was pointing it there. IMO, this makes no sense, since during the mysql...
14
4840
by: Anoop | last post by:
Hi, I am new to this newsgroup and need help in the following questions. 1. I am workin' on a GUI application. Does C# provides Layout Managers the way Java does to design GUI? I know that it can be done using the designer but I intentionally don't want to use that. The one reason is that you cannot change the code generated by the designer. The other could be that you have more free hand and control to design your GUI. 2....
89
6035
by: Cuthbert | last post by:
After compiling the source code with gcc v.4.1.1, I got a warning message: "/tmp/ccixzSIL.o: In function 'main';ex.c: (.text+0x9a): warning: the 'gets' function is dangerous and should not be used." Could anybody tell me why gets() function is dangerous?? Thank you very much. Cuthbert
1
3854
by: Eric West | last post by:
Hello gurus of the internet- I'm trying to install PHP on a system with MySQL I've had success using MySQL which was installed via "yum install mysql" on my CentOS 4.3 system. My problem is that I'd really like to use Mysql5, but when I install it via MySQL-client-standard-5.0.26-0.rhel4.i386.rpm and MySQL-server-standard-5.0.26-0.rhel4.i386.rpm, there doesn't appear to be a "mysql_config" file installed anywhere on the system. This...
14
3471
by: webEater | last post by:
I have a problem, it's not browser specific, and I don't get a solution. I have an (X)HTML document, I show you a part of it: .... <!--<div class="pad">--> <div id="eventImages"><img src="" id="eventImage0" class="eventImage"><img src="" id="eventImage1" class="eventImage"></div>
0
8397
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8827
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8732
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8503
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8605
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
4158
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4315
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1957
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1620
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.