Results 1 to 4 of 4
Hi all
I searched throughout the web but cannot find the solution for the following problem.
I have an application that uses mysql C API and I need to compile ...
- 12-17-2010 #1Just Joined!
- Join Date
- Sep 2005
- Posts
- 3
Problem compiling 32bit app on 64 bit Ubuntu
Hi all
I searched throughout the web but cannot find the solution for the following problem.
I have an application that uses mysql C API and I need to compile it in 32 bit mode on 64bit Ubuntu 9.04 distribution.
I installed 32 bit libmysql library and numerous libraries that I found over internet but no luck.
Can anyone here help me out?
makefile content:
When I try to compile, the first part goes OK (ok few warnings but nothing major), but then it collapses with errors like this:Code:SQL_LIB := $(shell mysql_config --libs) SQL_HEADERS := $(shell mysql_config --include) progy: gcc -m32 progy.c -o progy `$(CFG) --cflags` `$(CFG) --libs`
and so on...Code:/usr/lib/gcc/x86_64-linux-gnu/4.3.3/../../../../lib32/libmysqlclient.a(libmysql.o): In function `fetch_float_with_conversion': (.text+0x27d9): undefined reference to `floor' ... /usr/lib/gcc/x86_64-linux-gnu/4.3.3/../../../../lib32/libmysqlclient.a(libtaocrypt_la-dh.o): In function `TaoCrypt::DH::GeneratePrivate(TaoCrypt::RandomNumberGenerator&, unsigned char*)': (.text+0x4f4): undefined reference to `pow'
Anyone has any idea on what I'm doing wrong here?
Any help greatly appreciated.
- 12-18-2010 #2Linux Engineer
- Join Date
- Feb 2005
- Posts
- 1,044
Looks like you're missing the math library (-lm). Does it compile okay in 64 bit mode?
- 12-23-2010 #3Just Joined!
- Join Date
- Sep 2005
- Posts
- 3
Yeap, as soon as I lose the 32 bit flag (-m32), it compiles just fine
- 12-23-2010 #4
do you have 32 bit math library installed?


Reply With Quote