libodbc++ linking problems
Bug #159991 reported by
Jefim
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
libodbc++ (Baltix) |
New
|
Undecided
|
Unassigned | ||
libodbc++ (Ubuntu) |
Confirmed
|
Low
|
Unassigned | ||
Bug Description
The following code fails to link on ubuntu 7.04/7.10
#include <odbc++
#include <odbc++
#include <odbc++
#include <odbc++
using namespace odbc;
#include <stdio.h>
int main(){
}
g++ test.cpp -lodbc++
/tmp/ccS5xAyl.o: In function `main':
test.cpp:
The code does not have any problem to link against the library that is build from the libodbc++ sources.
Changed in libodbc++ (Ubuntu): | |
status: | Incomplete → New |
Changed in libodbc++ (Ubuntu): | |
status: | New → Confirmed |
To post a comment you must log in.
The ubuntu package has been compiled with an additional set of EXTRA_FLAGS += --with-unicode --enable-threads
DEB_CONFIGURE_
The "--with-unicode" will effectivly define -DODBCXX_UNICODE STRING= std::wstring !! libodcbc+ +.pc traits< wchar_t> . libodbc+ +-mt.so
which in turn will compile with ODBCXX_
However neighter odbc++/config.h nor pkgconfig/
will list the define such that ALL programs depending on the
libodbc++ package can not possibly link - the libodbc++-mt.so
does really contain symbol definitions with std_char_
You can check that by running
objdump -TC /usr/lib/
All this is completely wrong - a normal Ubuntu user will
not want to compile with wchar_t anyway but using utf8-char
instead. Possibly the Ubuntu package maintainer was mistaken
by the --with-unicode option to enable utf8 but it does really
invoke utf16. The Ubuntu libodbc++ DOES NOT PROVIDE any variant
for common utf8 at all and it is hence improbable to be useful.
A small patch would be to add -DODBCXX_UNICODE into the pkgconfig
file and/or appending "#define ODBCXXX_UNICODE" to the installed
odbc++/config.h such that you would get compile errors instead of
linking errors. That would leave the binary *.so as is. - A better
approach would be to assume that the package is broken beyond all
repair so that bogues --with-unicode should be removed and a working
(but binary incompatible) libodbc++.so to be shipped.
Note that this is Ubuntu-only - the Debian package probably works.