02-07-2002
compiling with include & libs
I like to compile a cxx file with g++ compiler.
I tried with option
g++ -I<include path> -L<library path> source-file
but ending with compilation error in /usr/local/bin/gcc-lib/.../crt1.o
I think the libraries are not taken from proper path
How to compile a cxx file with libraries & include files
Thanks
ls1429
10 More Discussions You Might Find Interesting
1. Programming
Hi
Where is the default location of libs to search, when we specify any lib in dlopen function.
And if we want to specify a custom location, how will we do it?
thanks. (1 Reply)
Discussion started by: sumsin
1 Replies
2. Shell Programming and Scripting
Hello all
my project is contains 2 directories, 2 directories are building library and one for the executable that using the libes from the other 2
Now what im doing is compiling first the 2 libs directories and then the main directory. But I will like to automate the process and to be able ... (0 Replies)
Discussion started by: umen
0 Replies
3. Shell Programming and Scripting
Hello All,
I am a newbie in Shell script programming, and maybe you can help me with my query.
I need to write a shell script (mntServer.ksh) that will start a background process and also to be able to run another script.
The mntServer.ksh script contains:
#!/bin/ksh... (1 Reply)
Discussion started by: racbern
1 Replies
4. Programming
hello everybody!
I m compiling some program with the g++ on AIX 5.3 and it needs some library that i didn't find them i am new with the AIX here is the compilation error :
g++ -Daix -fpic -o printps -lxercesc1_1 -L/oracle/OraHome/lib32/ -L/epost2/blitz/lib -lhmltods -lhmltops -lgeneric... (0 Replies)
Discussion started by: eternalflame
0 Replies
5. AIX
I think the default extension on AIX is .a
so for dynamic lib "libabc.a", we can simply link against it by specifying "-labc"
but here I have a dylib which been built by some one else called "libxyz.so" on AIX. once I say "-lxyz" the linker is only looking for libxzy.a but not .so after that.... (2 Replies)
Discussion started by: acerlinux
2 Replies
6. Programming
The gcc version is different on my computer than on the remote computer. An ldd on my program says:
Is there any way I can tell gcc to compile my program against my version of libc-2.7.so and ld-2.7.so (which I would provide along with the program) instead of the remote computer's libs ? (I do... (5 Replies)
Discussion started by: cyler
5 Replies
7. SuSE
Hi All,
I wanted to install an rpm package on two suse 10 systems. It installed successfully on one system but on the other it throws an error like
error: Failed dependencies:
rpmlib(PayloadIsLzma) <= 4.4.2-1 is needed by linuxProj-1-1.noarch
Now this means that rpnm... (4 Replies)
Discussion started by: dirshah
4 Replies
8. Shell Programming and Scripting
hi
I have a few folders and a few files , for example
Directory A B C D E
Files 1 2 3 4 5
I want B directory and "2" File that does not sync
But other directories and file sync
What is the solution ?
Is there a way to sync time is under one minute?
os centos 6.8
thanks... (5 Replies)
Discussion started by: mnnn
5 Replies
9. AIX
I want to create a shared lib with certain libs statically linked to it. I can generate a fully shared lib as follows:
gcc -maix64 -DHAVE_CONFIG_H -I. -I./src -DHAVE_OPENSSL -I/usr/include/openssl -I/usr/include -I/usr/include/apr-1 -D_LARGEFILE64_SOURCE -I/usr/java8_64/include -shared -o... (0 Replies)
Discussion started by: amandeepgautam
0 Replies
10. UNIX for Advanced & Expert Users
Hello. I am looking for all the necessary packages required to be able to compile libXft.
I tried to compile libXft-2.1.8.2$ and the error message was:
checking for XRENDER... checking for XRENDER... checking for X... no
checking X11/extensions/Xrender.h usability... no
checking... (1 Reply)
Discussion started by: colt
1 Replies
LEARN ABOUT LINUX
mysql_config
MYSQL_CONFIG(1) MySQL Database System MYSQL_CONFIG(1)
NAME
mysql_config - display options for compiling clients
SYNOPSIS
mysql_config options
DESCRIPTION
mysql_config provides you with useful information for compiling your MySQL client and connecting it to MySQL. It is a shell script, so it
is available only on Unix and Unix-like systems.
mysql_config supports the following options.
o --cflags
Compiler flags to find include files and critical compiler flags and defines used when compiling the libmysqlclient library. The
options returned are tied to the specific compiler that was used when the library was created and might clash with the settings for
your own compiler. Use --include for more portable options that contain only include paths.
o --include
Compiler options to find MySQL include files.
o --libmysqld-libs, --embedded
Libraries and options required to link with the MySQL embedded server.
o --libs
Libraries and options required to link with the MySQL client library.
o --libs_r
Libraries and options required to link with the thread-safe MySQL client library. In MySQL 5.5, all client libraries are thread-safe,
so this option need not be used. The --libs option can be used in all cases.
o --plugindir
The default plugin directory path name, defined when configuring MySQL.
o --port
The default TCP/IP port number, defined when configuring MySQL.
o --socket
The default Unix socket file, defined when configuring MySQL.
o --version
Version number for the MySQL distribution.
If you invoke mysql_config with no options, it displays a list of all options that it supports, and their values:
shell> mysql_config
Usage: /usr/local/mysql/bin/mysql_config [options]
Options:
--cflags [-I/usr/local/mysql/include/mysql -mcpu=pentiumpro]
--include [-I/usr/local/mysql/include/mysql]
--libs [-L/usr/local/mysql/lib/mysql -lmysqlclient
-lpthread -lm -lrt -lssl -lcrypto -ldl]
--libs_r [-L/usr/local/mysql/lib/mysql -lmysqlclient_r
-lpthread -lm -lrt -lssl -lcrypto -ldl]
--socket [/tmp/mysql.sock]
--port [3306]
--version [5.5.31]
--libmysqld-libs [-L/usr/local/mysql/lib/mysql -lmysqld
-lpthread -lm -lrt -lssl -lcrypto -ldl -lcrypt]
You can use mysql_config within a command line using backticks to include the output that it produces for a particular option. For example,
to compile and link a MySQL client program, use mysql_config as follows:
shell> gcc -c `mysql_config --cflags` progname.c
shell> gcc -o progname progname.o `mysql_config --libs`
COPYRIGHT
Copyright (C) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as
published by the Free Software Foundation; version 2 of the License.
This documentation is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/.
SEE ALSO
For more information, please refer to the MySQL Reference Manual, which may already be installed locally and which is also available online
at http://dev.mysql.com/doc/.
AUTHOR
Oracle Corporation (http://dev.mysql.com/).
MySQL 5.5 01/30/2014 MYSQL_CONFIG(1)