FAQ
I was able to compile and install the MySQL++ API on my Mac OS X system,
however, whenever I try to run a program linked against the library, I
get undefined symbol errors.

dyld: bin/wopsql Undefined symbols:
__t12basic_string3ZcZt18string_char_traits1ZcZt23__malloc_alloc_template1i0.
nilRep
___iomanip_setw__FR3iosi
__t23__malloc_alloc_template1i0.__malloc_alloc_oom_handler
__t24__default_alloc_template2b0i0._S_end_free
__t24__default_alloc_template2b0i0._S_free_list
__t24__default_alloc_template2b0i0._S_heap_size
__t24__default_alloc_template2b0i0._S_start_free
__t12basic_string3ZcZt18string_char_traits1ZcZt24__default_alloc_template2b0i0.
nilRep

Seems like a similar problem as described in the post:
http://www.geocrawler.com/archives/3/362/1999/5/50/1804413/
However, the solution in that post does not produce any different
results.

This even happens for the MySQL++ example programs.

Anyone have any suggestions? I'd really really like to be able to use
this in a project I'm working on, but MySQL++'s lack of portability
seems rather insane. Tons of patching required to just get it working
on minor gcc version increments. Is this inflexibility due to the
design of MySQL++, design of GNU's STL, or all both?

-Halim Chtourou

Search Discussions

  • Halim Chtourou at Aug 7, 2001 at 8:43 pm

    On Tuesday, August 7, 2001, at 07:43 AM, Sinisa Milivojevic wrote:

    Halim Chtourou writes:
    I was able to compile and install the MySQL++ API on my Mac OS X
    system,
    however, whenever I try to run a program linked against the library, I
    get undefined symbol errors.

    dyld: bin/wopsql Undefined symbols:
    __t12basic_string3ZcZt18string_char_traits1ZcZt23__malloc_alloc_template1i0.
    nilRep
    ___iomanip_setw__FR3iosi
    __t23__malloc_alloc_template1i0.__malloc_alloc_oom_handler
    __t24__default_alloc_template2b0i0._S_end_free
    __t24__default_alloc_template2b0i0._S_free_list
    __t24__default_alloc_template2b0i0._S_heap_size
    __t24__default_alloc_template2b0i0._S_start_free
    __t12basic_string3ZcZt18string_char_traits1ZcZt24__default_alloc_template2b0i0.
    nilRep

    Seems like a similar problem as described in the post:
    http://www.geocrawler.com/archives/3/362/1999/5/50/1804413/
    However, the solution in that post does not produce any different
    results.

    This even happens for the MySQL++ example programs.

    Anyone have any suggestions? I'd really really like to be able to use
    this in a project I'm working on, but MySQL++'s lack of portability
    seems rather insane. Tons of patching required to just get it working
    on minor gcc version increments. Is this inflexibility due to the
    design of MySQL++, design of GNU's STL, or all both?

    -Halim Chtourou
    Hi!

    First of all, every new version of GNU compiler has it's own STL
    library and it's own set of quirks !!

    MySQL++ can not do anything about it!

    You could try uisng GCC 3.0 , for which you will find patch on MySQL++
    page. May be 3.0 has lesser problems in porting.

    Regarding the above symbols they look to me like normal STL
    symbols. Check out which library you have to add to linker command.

    What GNU version did you use anyway ??

    --
    Regards,
    __ ___ ___ ____ __
    / |/ /_ __/ __/ __ \/ / Mr. Sinisa Milivojevic <sinisa@mysql.com>
    / /|_/ / // /\ \/ /_/ / /__ MySQL AB, FullTime Developer
    /_/ /_/\_, /___/\___\_\___/ Larnaca, Cyprus
    <___/ www.mysql.com

    ---------------------------------------------------------------------
    Before posting, please check:
    http://www.mysql.com/manual.php (the manual)
    http://lists.mysql.com/ (the list archive)

    To request this thread, e-mail <mysql-thread81795@lists.mysql.com>
    To unsubscribe, e-mail <mysql-unsubscribe-
    halim=onemain.com@lists.mysql.com>
    Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
    I'm using GCC 2.95.2 that comes with Apple's developer tools. I'm
    getting tempted to try compiling GCC 3.

    Doing a grep for the above symbols returns matches for both the static
    and dynamic libsqlplus libraries, as well as libstdc++.a, which is
    automatically linked in with C++ code. I even tried manually adding
    -lstdc++ but that didn't help. I've also tried defining various STL
    options related to templates and several different compiler options,
    without much success. Is this simply incompatible with GCC version
    2.95.2?


    -Halim
  • Sinisa Milivojevic at Aug 8, 2001 at 11:31 am

    Halim Chtourou writes:

    I'm using GCC 2.95.2 that comes with Apple's developer tools. I'm
    getting tempted to try compiling GCC 3.

    Doing a grep for the above symbols returns matches for both the static
    and dynamic libsqlplus libraries, as well as libstdc++.a, which is
    automatically linked in with C++ code. I even tried manually adding
    -lstdc++ but that didn't help. I've also tried defining various STL
    options related to templates and several different compiler options,
    without much success. Is this simply incompatible with GCC version
    2.95.2?


    -Halim
    You are using the right compiler.

    What you should check are symlinks to dynamic and static versions of
    libstdc++.

    They should point out to the stdc++ that came with gcc 2.95.2.

    If that does not help, add a full path to the correct libstdc++ in
    your linker command.

    --
    Regards,
    __ ___ ___ ____ __
    / |/ /_ __/ __/ __ \/ / Mr. Sinisa Milivojevic <sinisa@mysql.com>
    / /|_/ / // /\ \/ /_/ / /__ MySQL AB, FullTime Developer
    /_/ /_/\_, /___/\___\_\___/ Larnaca, Cyprus
    <___/ www.mysql.com
  • Halim Chtourou at Aug 8, 2001 at 11:05 pm

    On Wednesday, August 8, 2001, at 07:32 AM, Sinisa Milivojevic wrote:
    You are using the right compiler.

    What you should check are symlinks to dynamic and static versions of
    libstdc++.

    They should point out to the stdc++ that came with gcc 2.95.2.

    If that does not help, add a full path to the correct libstdc++ in
    your linker command.
    There is only a static version of libstdc++ with the default Mac OS X
    distribution. It is located in /usr/lib/gcc/darwin/default/libstdc++.a,
    and there is a symlink to that at /usr/lib/libstdc++.a.

    Adding /usr/lib/gcc/darwin/default/libstdc++.a directly into the link
    does not help.

    I've tried compiling with a bunch of different flag combinations, with
    no luck either. -Wno-uninitialized -fno-implicit-templates produces a
    TON of errors.

    -Halim

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupplusplus @
categoriesmysql
postedAug 7, '01 at 1:59a
activeAug 8, '01 at 11:05p
posts4
users2
websitemysql.com
irc#mysql

People

Translate

site design / logo © 2022 Grokbase