Sponsored Content
Full Discussion: gcc 3.4 Regex problem
Operating Systems Solaris gcc 3.4 Regex problem Post 71207 by manishs13 on Monday 9th of May 2005 03:58:23 AM
Old 05-09-2005
gcc 3.4 Regex problem

Hello All,

I have been using String.h with gcc 2.95. Now I have upgraded to gcc 3.4. The support for String.h has been removed and I believe Regex.h support is also not inbuilt. So I tried to build my own library for String.h. I had to use Regex.h and rx.h for a succesful library compilation. The name of library is libstring.a and is located in /usr/local/lib.
On linking it in the code and doing a make I get the unreferenced usage for few functions from rx.cc. I dont know why, Please help in this:

g++ -I./ -I../../../include -I/usr/local/include/g++-3 -I/usr/local/include/g+
+-3/std -I/usr/local/include/g++ -I/usr/local/include/g++/std -I../../../src/t
ools/qdbm -D_PTHREADS -O -g -DFWDEBUG -DNRESOURCE -w -o ../../../bin/nmBackdoo
r ./NmBackdoor.o NmCmdCenter.o NmResource.o -L./ -L../../../lib -lutil++ -lco
mm++ -laux++ -lsync++ -lgcc -lstring -lstdc++ -lxnet -liberty -lrx -lpthread
Undefined first referenced
symbol in file
re_compile_fastmap(re_pattern_buffer*) /usr/local/lib/gcc/sparc-sun-solari
s2.8/3.4.2/../../../libstring.a(Regex.o)
operator<<(std::basic_ostream<char, std::char_traits<char> >&, SubString const
&)NmCmdCenter.o
ostream:Smilieperator<<(char const*) /usr/local/lib/gcc/sparc-sun-solaris2.8/3.
4.2/../../../libstring.a(String.o)
re_match_2(re_pattern_buffer*, char const*, int, char const*, int, int, re_reg
isters*, int)/usr/local/lib/gcc/sparc-sun-solaris2.8/3.4.2/../../../libstring.
a(Regex.o)
re_compile_pattern(char const*, int, re_pattern_buffer*)/usr/local/lib/gcc/spa
rc-sun-solaris2.8/3.4.2/../../../libstring.a(Regex.o)
ws(istream&) /usr/local/lib/gcc/sparc-sun-solaris2.8/3.
4.2/../../../libstring.a(String.o)
readline(std::basic_istream<char, std::char_traits<char> >&, String&, char, in
t)NmCmdCenter.o
re_compile_pattern(char const*, int, re_pattern_buffer*)/usr/local/lib/gcc/sparc-sun-solaris2.8/3.4.2/../../../libstring.a(Regex.o)
ws(istream&) /usr/local/lib/gcc/sparc-sun-solaris2.8/3.4.2/../../../libstring.a(String.o)
readline(std::basic_istream<char, std::char_traits<char> >&, String&, char, int)NmCmdCenter.o
_IO_getc /usr/local/lib/gcc/sparc-sun-solaris2.8/3.4.2/../../../libstring.a(String.o)
_IO_putc /usr/local/lib/gcc/sparc-sun-solaris2.8/3.4.2/../../../libstring.a(String.o)
re_search_2(re_pattern_buffer*, char const*, int, char const*, int, int, int, re_registers*, int)/usr/local/lib/gcc/sparc-sun-solari
s2.8/3.4.2/../../../libstring.a(Regex.o)
ld: fatal: Symbol referencing errors. No output written to ../../../bin/nmBackdoor
collect2: ld returned 1 exit status
make: *** [../../../bin/nmBackdoor] Error 1

Regards,
manish
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Problem installing gcc

Hi! I have downloaded a precompiled gcc package but I'm having problems installing it. It is supposed to install in /usr/local and there is plenty of space left there but during the installation I get the following error message “No space left on device”. Is it some kind of temp folder that is out... (2 Replies)
Discussion started by: alfabetman
2 Replies

2. Programming

gcc Link problem

I have some crypting functions in object-file - for example,func.o Main file,from where crypting functions called, named as main.cpp . "gcc main.cpp -o main func.o" print "undefined reference to ... " But if I rename main.cpp to main.c and execute "gcc main.c -o main func.o" - ok. If anybody,... (3 Replies)
Discussion started by: Gigachel
3 Replies

3. Programming

A problem of GCC

Hi mates, I am a new comer of this forums. I have a problem while using function "fread(buffer, size, number, file-pointer)" to read a binary file. While I used the "fread()" to read the binary file under Solaris UNIX System, it worked very well. But it gets a incorrect result... (6 Replies)
Discussion started by: cquedugdylp
6 Replies

4. Red Hat

GCC version problem

I have a host PC and a target system . Host System -> gcc (3.2) Redhat linux kernel 2.4.20-8 , glibc 2.3 Target System -> gcc (4.1) Fedora linux kernel 2.6.18-1.2798.fc6, glibc 2.5 I would like to build test program that can be run on both systems --------------------------- ... (0 Replies)
Discussion started by: mugdha
0 Replies

5. Solaris

gcc problem on Solaris

I just installed gcc from the latest package at sunfreeware.com using pkgadd. I write a simple 'Hello World!' program to test it. I try to compile it and I get this error: rockstar# gcc hello.c -o hello ld.so.1: gcc: fatal: libiconv.so.2: open failed: No such file or directory Killed I... (0 Replies)
Discussion started by: Bradj47
0 Replies

6. Programming

Problem with static compiling - GCC

Hi guys. I want to compile three files: gcc -static main.c fib.c fib.h it is pure C i mean i use standard C library. but it gives me this error: /usr/bin/ld: cannot find -lc collect2: ld returned 1 exit status what should i do? (4 Replies)
Discussion started by: majid.merkava
4 Replies

7. Programming

gcc problem

Hi, I just try to solve the problem why one app failing on box1 and runs ok on box2, they have diff gcc version as I see from /proc/version: box1:: 3.4.1 box2:: 4.1.2 It's RedHat 64b boxes, so I can not run some <make all> command on box1, do you think I need to upgrade (if I'm using... (1 Reply)
Discussion started by: mario17
1 Replies

8. Programming

problem with realloc( i think is gcc :/ )

Hi everyone, i made this program. is a simple one for practising malloc, realloc and structs. I have a struct named shop as global variable in which i take the size of the matrix from the keyboard and after i malloc it. I insert the values with the fullarray() and after i print the matrix with... (7 Replies)
Discussion started by: giampoul
7 Replies

9. AIX

Gcc compilation problem on AIX 6.1

Hi, I have to compile a program on my server, runs on AIX 6.1. On my test server the compilation is ok (AIX 6.1); but when I try it on production server, I have this gcc prog.c -o prog_out In file included from resmon.c:111: /usr/include/unistd.h:924: error: expected ')' before ' I noticed... (1 Reply)
Discussion started by: tnjulius
1 Replies

10. Red Hat

Installatin problem in installing gcc-4.9.0

Hi to all, i'm installing gcc-4.9.0 into my RedHat 6.4 pc. I configure like this :- # mkdir objdir # ./../gcc-4.9.0/configure # make and now having this problem :- checking for x86_64-unknown-linux-gnu-gcc... /software/gcc/objdir/./gcc/xgcc -B/software/gcc/objdir/./gcc/... (0 Replies)
Discussion started by: rahulvishwa
0 Replies
MYSQL_CONFIG(1) 					       MySQL Database System						   MYSQL_CONFIG(1)

NAME
mysql_config - get compile 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. 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. o --plugindir The default plugin directory path name, defined when configuring MySQL. This option was added in MySQL 5.1.24. o --port The default TCP/IP port number, defined when configuring MySQL. o --socket The default Unix socket file, defined when configuring MySQL. o --variable=VAR Path to MySQL include, library and plugin directories. VAR is one of `pkgincludedir`, `pkglibdir` and `plugindir`, respectively. 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 -lz -lcrypt -lnsl -lm -L/usr/lib -lssl -lcrypto] --libs_r [-L/usr/local/mysql/lib/mysql -lmysqlclient_r -lpthread -lz -lcrypt -lnsl -lm -lpthread] --socket [/tmp/mysql.sock] --port [3306] --version [4.0.16] --libmysqld-libs [-L/usr/local/mysql/lib/mysql -lmysqld -lpthread -lz -lcrypt -lnsl -lm -lpthread -lrt] You can use mysql_config within a command line to include the value that it displays for a particular option. For example, to compile a MySQL client program, use mysql_config as follows: shell> CFG=/usr/local/mysql/bin/mysql_config shell> sh -c "gcc -o progname `$CFG --include` progname.c `$CFG --libs`" When you use mysql_config this way, be sure to invoke it within backtick ("`") characters. That tells the shell to execute it and substitute its output into the surrounding command. COPYRIGHT
Copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc. 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
Sun Microsystems, Inc. (http://www.mysql.com/). MySQL 5.1 04/06/2010 MYSQL_CONFIG(1)
All times are GMT -4. The time now is 02:21 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy