Please take our Survey
logo       

Choosing A Webhost:
A web hosting service is a type of Internet hosting service that allows individuals and organizations to provide their own website accessible via the World Wide Web. Web hosts are companies that provide space on a server they own for use by their clients as well as providing Internet connectivity, typically in a data center. Web hosts can also provide data center space and connectivity to the Internet for servers they do not own to be located in their data center, called colocation. more...

How to compile SQLDBC program: msg#00219

db.maxdb

Subject: How to compile SQLDBC program

hi all,

I am not an export in c/c++ and linking.

I want to compile a program which uses SQLDBC on Linux (SuSE 7.3).
The programs name is "test.cpp".

Dynamic linking works without any problems:
$ g++ test.cpp -I sqldbc/sdk/sqldbc/incl/ -L sqldbc/lib/ -lSQLDBC


-------------------------------------------------------------
THE QUESTION:
Why doesn't this work?

$ g++ sqldbc/sdk/sqldbc/lib/libSQLDBC.a test.cpp -I sqldbc/sdk/sqldbc/incl/ /tmp/ccz3Rkm0.o: In function `main':
/tmp/ccz3Rkm0.o(.text+0x30): undefined reference to
`SQLDBC::GetClientRuntime(char *, int)'
/tmp/ccz3Rkm0.o(.text+0x82): undefined reference to
`SQLDBC::SQLDBC_Environment::SQLDBC_Environment(SQLDBC_IRuntime *)'
/tmp/ccz3Rkm0.o(.text+0x94): undefined reference to
`SQLDBC::SQLDBC_Environment::createConnection(void) const'
/tmp/ccz3Rkm0.o(.text+0xbe): undefined reference to
`SQLDBC::SQLDBC_Connection::connect(char const *, char const *, char const *,
char const *)'
/tmp/ccz3Rkm0.o(.text+0xe7): undefined reference to
`SQLDBC::SQLDBC_ConnectionItem::error(void)'
/tmp/ccz3Rkm0.o(.text+0xf2): undefined reference to
`SQLDBC::SQLDBC_ErrorHndl::getErrorText(void) const'
/tmp/ccz3Rkm0.o(.text+0x11c): undefined reference to
`SQLDBC::SQLDBC_Environment::~SQLDBC_Environment(void)'
/tmp/ccz3Rkm0.o(.text+0x13b): undefined reference to
`SQLDBC::SQLDBC_Connection::createStatement(void)'
/tmp/ccz3Rkm0.o(.text+0x15a): undefined reference to
`SQLDBC::SQLDBC_Statement::execute(char const *)'
/tmp/ccz3Rkm0.o(.text+0x183): undefined reference to
`SQLDBC::SQLDBC_ConnectionItem::error(void)'
/tmp/ccz3Rkm0.o(.text+0x18e): undefined reference to
`SQLDBC::SQLDBC_ErrorHndl::getErrorText(void) const'
/tmp/ccz3Rkm0.o(.text+0x1b8): undefined reference to
`SQLDBC::SQLDBC_Environment::~SQLDBC_Environment(void)'
/tmp/ccz3Rkm0.o(.text+0x1db): undefined reference to
`SQLDBC::SQLDBC_Statement::getResultSet(void)'
/tmp/ccz3Rkm0.o(.text+0x204): undefined reference to
`SQLDBC::SQLDBC_ConnectionItem::error(void)'
/tmp/ccz3Rkm0.o(.text+0x20f): undefined reference to
`SQLDBC::SQLDBC_ErrorHndl::getErrorText(void) const'
/tmp/ccz3Rkm0.o(.text+0x239): undefined reference to
`SQLDBC::SQLDBC_Environment::~SQLDBC_Environment(void)'
/tmp/ccz3Rkm0.o(.text+0x25b): undefined reference to
`SQLDBC::SQLDBC_ResultSet::next(void)'
/tmp/ccz3Rkm0.o(.text+0x284): undefined reference to
`SQLDBC::SQLDBC_ConnectionItem::error(void)'
/tmp/ccz3Rkm0.o(.text+0x28f): undefined reference to
`SQLDBC::SQLDBC_ErrorHndl::getErrorText(void) const'
/tmp/ccz3Rkm0.o(.text+0x2b9): undefined reference to
`SQLDBC::SQLDBC_Environment::~SQLDBC_Environment(void)'
/tmp/ccz3Rkm0.o(.text+0x2f5): undefined reference to
`SQLDBC::SQLDBC_ResultSet::getObject(int, SQLDBC_HostType, void *, int *, int,
bool)'
/tmp/ccz3Rkm0.o(.text+0x31e): undefined reference to
`SQLDBC::SQLDBC_ConnectionItem::error(void)'
/tmp/ccz3Rkm0.o(.text+0x329): undefined reference to
`SQLDBC::SQLDBC_ErrorHndl::getErrorText(void) const'
/tmp/ccz3Rkm0.o(.text+0x353): undefined reference to
`SQLDBC::SQLDBC_Environment::~SQLDBC_Environment(void)'
/tmp/ccz3Rkm0.o(.text+0x388): undefined reference to
`SQLDBC::SQLDBC_Environment::~SQLDBC_Environment(void)'
/tmp/ccz3Rkm0.o(.text+0x3b3): undefined reference to
`SQLDBC::SQLDBC_Environment::~SQLDBC_Environment(void)'
collect2: ld returned 1 exit status

I thought that libSQLDBC.a should be for static linking.
Am I doing something wrong?

Greetings, and thank you very much in advance,
Andre'



--
__________________________________________________________________________

Als Technologieunternehmen konzipieren und entwickeln wir maßgeschneiderte
Feedback- und
Monitoring-Systeme - wie beispielsweise Lösungen für Beschwerde- und
Ideenmanagement.
Mit dem Inquery® Survey Server bieten wir eine der leistungsfähigsten
Standardlösungen für
Online-Umfragen mit dem Schwerpunkt auf der Messung von Kundenzufriedenheit an.
__________________________________________________________________________


Inworks GmbH
Andre Reitz, Leiter Entwicklung
Hörvelsinger Weg 39, 89081 Ulm, Germany
Tel +49 (0) 731 / 93807-21
Fax +49(0)731/93807-18
Internet: http://www.inworks.de



--
MaxDB Discussion Mailing List
For list archives: http://lists.mysql.com/maxdb
To unsubscribe: http://lists.mysql.com/maxdb?unsub=gcdm-maxdb@xxxxxxxxxxx




<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe

Navigation

Home | advertise | OSDir is an inevitable website. super tiny logo