List:MySQL++« Previous MessageNext Message »
From:Mike Enright Date:April 28 2010 12:56pm
Subject:32 bit mysqlpp.dylib on Snow Leopard
View as plain text  
Greetings list!

I am migrating to a new iMac with Snow Leopard and I have been unable to get
a 32 bit libmysqlpp.dylib built.

I have added the CFLAGS and CXXFLAGS environment variables and many other
projects are building as 32 bit.

When I make mysql++ however, it looks like the objects are 32 bit, but then
the transaction example fails because the are.  A make install seems to
work, but the resulting libmysqlpp.dylib is 64 bit.

Does anyone have any thoughts? I have included some output below.

Thanks in advance.

MikeBookPro:mysql++-3.0.9 Mike$ env | grep FLAG
CXXFLAGS=-m32
CFLAGS=-m32


/Users/Mike/Source/3rdParty/mysql++-3.0.9/bk-deps g++ -c -o
mysqlpp_beemutex.o -I. -dynamic -fPIC -DPIC  -I/usr/local/include/mysql -m32
-fno-common ./lib/beemutex.cpp
...
/Users/Mike/Source/3rdParty/mysql++-3.0.9/bk-deps g++ -c -o
test_array_index_array_index.o -Ilib  -I/usr/local/include/mysql -m32
-fno-common ./test/array_index.cpp
...
/Users/Mike/Source/3rdParty/mysql++-3.0.9/bk-deps g++ -c -o
transaction_transaction.o -Ilib  -I/usr/local/include/mysql -m32 -fno-common
./examples/transaction.cpp
g++ -dynamiclib -single_module -headerpad_max_install_names -o
libmysqlpp.3.0.9.dylib mysqlpp_beemutex.o mysqlpp_connection.o
mysqlpp_cpool.o mysqlpp_datetime.o mysqlpp_dbdriver.o mysqlpp_field_names.o
mysqlpp_field_types.o mysqlpp_manip.o mysqlpp_myset.o mysqlpp_mysql++.o
mysqlpp_mystring.o mysqlpp_null.o mysqlpp_options.o mysqlpp_qparms.o
mysqlpp_query.o mysqlpp_result.o mysqlpp_row.o mysqlpp_sql_buffer.o
mysqlpp_stadapter.o mysqlpp_tcp_connection.o mysqlpp_transaction.o
mysqlpp_type_info.o mysqlpp_uds_connection.o mysqlpp_vallist.o
mysqlpp_wnp_connection.o      -install_name
/usr/local/lib/libmysqlpp.3.dylib -lmysqlclient   -L/usr/local/lib
ld: warning: in mysqlpp_beemutex.o, file is not of required architecture
ld: warning: in mysqlpp_connection.o, file is not of required architecture
...
ld: warning: in /usr/local/lib/libmysqlclient.dylib, file is not of required
architecture
(cd .; rm -f libmysqlpp.dylib libmysqlpp.3.dylib; ln -s
libmysqlpp.3.0.9.dylib libmysqlpp.3.dylib; ln -s libmysqlpp.3.dylib
libmysqlpp.dylib)
g++ -o test_array_index test_array_index_array_index.o    -L. -lmysqlclient
-L/usr/local/lib  -lmysqlpp
ld: warning: in test_array_index_array_index.o, file is not of required
architecture
ld: warning: in /usr/local/lib/libmysqlclient.dylib, file is not of required
architecture
Undefined symbols:
  "_main", referenced from:
      start in crt1.10.6.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
make: *** [test_array_index] Error 1
make: *** Waiting for unfinished jobs....


MikeBookPro:mysql++-3.0.9 Mike$ sudo make install
Password:
/usr/bin/install -c -d /usr/local/lib
/usr/bin/install -c -m 644 libmysqlpp.dylib /usr/local/lib
/usr/bin/install -c libmysqlpp.3.0.9.dylib /usr/local/lib
(cd /usr/local/lib ; rm -f libmysqlpp.dylib libmysqlpp.3.dylib; ln -s
libmysqlpp.3.0.9.dylib libmysqlpp.3.dylib; ln -s libmysqlpp.3.dylib
libmysqlpp.dylib)
/usr/bin/install -c -d /usr/local/include/mysql++
(cd . ; /usr/bin/install -c -m 644  lib/*.h /usr/local/include/mysql++)


MikeBookPro:mysql++-3.0.9 Mike$ file mysqlpp_beemutex.o
mysqlpp_beemutex.o: Mach-O object i386
MikeBookPro:mysql++-3.0.9 Mike$ file mysqlpp_connection.o
mysqlpp_connection.o: Mach-O object i386
MikeBookPro:mysql++-3.0.9 Mike$ file /usr/local/lib/libmysqlclient.dylib
/usr/local/lib/libmysqlclient.dylib: Mach-O dynamically linked shared
library i386
MikeBookPro:mysql++-3.0.9 Mike$ file /usr/local/lib/libmysqlpp.dylib
/usr/local/lib/libmysqlpp.dylib: Mach-O 64-bit dynamically linked shared
library x86_64
-- 




Attachment: [text/html]
Attachment: [text/html]
Attachment: [text/html]
Thread
32 bit mysqlpp.dylib on Snow LeopardMike Enright28 Apr
  • Re: 32 bit mysqlpp.dylib on Snow LeopardJonathan Wakely28 Apr
    • Re: 32 bit mysqlpp.dylib on Snow LeopardMike Enright28 Apr