List:MySQL++« Previous MessageNext Message »
From:Jonathan Wakely Date:January 10 2011 10:38am
Subject:Re: Errors while compiling under cygwin
View as plain text  
On 10 January 2011 07:14, Chris Langlois wrote:
> I'm compiling on a 64 bit windows machine running cygwin with the 3.1.0
> source code.
>
> I receive the following errors when I run a make, any ideas?
...
> g++ -o ssqlsxlat.exe ssqlsxlat_genv2.o ssqlsxlat_main.o    -L.
> -lmysqlclient   -
> L/usr/local/mysql/lib -Wl,--enable-auto-import  -lmysqlpp
> -lmysqlpp_ssqls2parse
> -lintl
> ./libmysqlpp_ssqls2parse.a(ssqls2parse_parsev2.o): In function
> `_ZN7ParseV26Opti
> on10parse_boolERKSs':
> /home/tas/mysql++-3.1.0/./ssx/parsev2.cpp:579: undefined reference to
> `mysqlpp::
> internal::str_to_lwr(std::basic_string<char, std::char_traits<char>,
> std::alloca
> tor<char> >&)'

Something in libmysqlpp_ssqls2parse.a depends on something in
libmysqlpp.so, but -lmysqlpp comes earlier on the linker command line
so the symbols can't be found.

Try running that last command manually with -lmysqlpp and
-lmysqlpp_ssqls2parse swapped round i.e.

g++ -o ssqlsxlat.exe ssqlsxlat_genv2.o ssqlsxlat_main.o    -L.
-lmysqlclient   -L/usr/local/mysql/lib -Wl,--enable-auto-import
-lmysqlpp_ssqls2parse  -lmysqlpp -lintl

(and I would have thought -lmysqlclient should come last, since
libmysqlpp depends on that, and it depends on nothing else)
Thread
Errors while compiling under cygwinChris Langlois10 Jan
  • Re: Errors while compiling under cygwinJonathan Wakely10 Jan
    • Re: Errors while compiling under cygwinChris Langlois10 Jan
    • Re: Errors while compiling under cygwinWarren Young10 Jan