Chris Blodgett wrote:
>
> Hello,
> I am working on a C program to access our mysql server. I'm using the C
> function real_connect. I can connect to the server from a shell but when
> I try to connect with real_connect my program gets the error
> usr/lib/dld.sl; Unresolved symbol: floor (code) from
> /usr/local/mysql/lib/mysql/libmysqlclien.sl.6 and then it core dumps.
> When I take out the password from the user table in the database and then
> do a real_connect without a password it doesn't error. I would appreciate
> any help on this problem. Thank You,
> Chris Blodgett
> akira@stripped
What is this? I've just seen the exact same problem posted on another
list (uug-discuss@stripped), but from a different person, also from
BYU, though. Are you guys taking a database class and you instructor is
making you write mysql programs on an HP, or what? :-)
Here is the problem:
when you use the password, mysql client uses a function from the math
library ( floor). The dynamic linker tries to resolve it at run-time and
fails. Try either linking with -lm or linking statically. Josh ( this
other guy who posted the problem) says that HP cc bombs when you give it
-static, so you would have to read the manuals to see how you tell it to
link statically, or maybe someone knows right off the bat what the flag
should be.
--
Sasha Pachev
http://www.sashanet.com/ (home)
http://www.direct1.com/ (work)