Overview
Features
Download
Documentation
Community
Add-Ons & Services

Linking problems in Xcode

Please post support and help requests here.

Linking problems in Xcode

Postby poksi592 » 05 Nov 2012, 22:36

Hi,

I keep getting following errors trying to run test C++ application:

Undefined symbols for architecture x86_64:
"Poco::Data::ODBC::Connector::unregisterConnector()", referenced from:
CMDCDatabaseFactory::~CMDCDatabaseFactory() in MDCDatabaseFactory.o
"Poco::Data::MySQL::Connector::unregisterConnector()", referenced from:
CMDCDatabaseFactory::~CMDCDatabaseFactory() in MDCDatabaseFactory.o
"Poco::Data::ODBC::Connector::registerConnector()", referenced from:
CMDCDatabaseFactory::createDatabase(std::string, std::string, EDatabaseType, std::string) in MDCDatabaseFactory.o
"Poco::Data::MySQL::Connector::registerConnector()", referenced from:
CMDCDatabaseFactory::createDatabase(std::string, std::string, EDatabaseType, std::string) in MDCDatabaseFactory.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

I have included correctly all the files and all the paths seem to be correct. I don't have any error message indicating that something isn't declared...

I'm running this on Xcode 4.3.2 and Mac OS X Lion. I have installed MySql from MySQL.org on /usr/local/ and included it's libs in Link Binaries with Libraries. I did the same for standard iODBC libraries from App package...

What can be wrong? Can anybody help me, please?
poksi592
 
Posts: 16
Joined: 01 Feb 2012, 12:12

Re: Linking problems in Xcode

Postby alex » 05 Nov 2012, 22:59

poksi592 wrote:What can be wrong? Can anybody help me, please?

Mixing 32 and 64 bit builds? Not linking with Poco::Data::ODBC and Poco::Data::MySQL?
alex
 
Posts: 1145
Joined: 11 Jul 2006, 16:27
Location: United_States

Re: Linking problems in Xcode

Postby poksi592 » 06 Nov 2012, 13:54

Mixing 32 and 64 bit builds? Not linking with Poco::Data::ODBC and Poco::Data::MySQL?[/quote]

Hi, Alex,

Thanks for the hint! What do you mean exactly? That I am using 32- bit poco library? I have built everything locally on this machine...Downloded and foloowed instructions...
poksi592
 
Posts: 16
Joined: 01 Feb 2012, 12:12

Re: Linking problems in Xcode

Postby irit » 07 Nov 2012, 00:11

What does it say when you issue the ./configure command? "Configured for Darwin"? "Configured for Darwin32"?
irit
 
Posts: 9
Joined: 18 Sep 2012, 03:23

Re: Linking problems in Xcode

Postby kinkadius » 08 Nov 2012, 18:30

I am having the same issue here but with:

XCode 4.5
Poco-1.4.4-all

./configure --omit=Data/ODBC,Data/MySQL

lipo system command confirms the .dylibs are build for x86_64.

I'm wondering if the issue is linking to a dylib or something.
kinkadius
 
Posts: 2
Joined: 08 Nov 2012, 18:02

Re: Linking problems in Xcode

Postby rakesh » 09 Nov 2012, 00:21

I have built 1.4.4 using Xcode 4.5.x for darwin and ios versions without issues.

./configure --prefix=/usr/local/poco \
--config=Darwin64-clang \
--no-tests --no-samples \
--omit=Data/MySQL \
--static --shared
make -s -j8
make install
find . -type f -name "*.o" | xargs rm

./configure --prefix=/usr/local/poco \
--config=iPhone \
--no-tests --no-samples --omit=Data/MySQL,Data/ODBC,PageCompiler
make IPHONE_SDK_VERSION_MIN=3.0 POCO_TARGET_OSARCH=armv6 -s -j8
find . -type f -name "*.o" | xargs rm

make IPHONE_SDK_VERSION_MIN=3.2 POCO_TARGET_OSARCH=armv7 -s -j8
rakesh
 
Posts: 78
Joined: 13 Apr 2011, 17:43
Location: Chicago

Re: Linking problems in Xcode

Postby poksi592 » 12 Nov 2012, 22:08

@Irit. it says "Configured for Darwin"
poksi592
 
Posts: 16
Joined: 01 Feb 2012, 12:12

Re: Linking problems in Xcode

Postby poksi592 » 12 Nov 2012, 22:24

Building without ODBC and MySQL was successful for me as well. Nothing was actually wrong when omitting those 2 Classes.

More important is that I have found the reason for it:

There were some errors in Poco build because of the errors previously with MySQL C++ Connector that had problem with C Connector because of some not accurate paths. It seems it was problems with files from MySQL.org all alone.

When I took care of correctly compiling C++ Connector, problem with Poco was solved as well! :D
poksi592
 
Posts: 16
Joined: 01 Feb 2012, 12:12


Return to Support

Who is online

Users browsing this forum: No registered users and 3 guests

cron