开发者

Compile Problem with MySQL C API on MAC OS X 10.6

i've a Problem with MySQL C API and Mac OS X 10.6. When i want to compil开发者_StackOverflowe a SQL Client Program, it aborts with this Error Message

ld: library not found for -lmysqlclient

collect2: ld returned 1 exit status

I compile with this command:

g++ -I /usr/local/mysql/include/ -L /usr/local/mysql/lib/ -lmysqlclient main.cpp

I've tried the Headers and Librarys in different locations - no effect I've downloaded the headers and the Library from an other Destination - Same effect as before

Any Ideas what i am doing wrong? If there is a thread allready i want to excuse (nothing found in search)!

Greeting, Dennis


So after many days, of not intensive work ;-) here's the fault: the compiler doesn't accept the library if it is in the standard install directory. I copied the include and lib files into /usr/local/include and /usr/local/lib . Now it compiles without errors :-)

I don't know why it only works in the standard paths but however now it works.

Dennis

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜