Re: Any non-GNU compilers? sick of GNU copylefts

Discussion in 'C++' started by Markus Elfring, Feb 19, 2005.

  1. > What I did find out is that there is a huge problem with binary
    > incompatibility in gcc between anything but minor revisions. Additionally
    > the lack of compatibility in C++ libraries doesn't help on the case either.
    > What strikes me is that if you code your program in C then you don't have
    > all these problems (or atleast fewer).


    "How to mix C and C++"
    http://www.inf.uni-konstanz.de/~kuehl/c -faq/mixing-c-and-cpp.html


    > I'm just surprised that a language beeing as old as C++ still gives that
    > many problems.
    >
    > But it's not a new problem ... so why havn't someone thought of fixing it
    > before? I assume somewhere deep on the net there must be someone who wrote
    > aproaches for best practice of how to avoid these problems.


    Would you like to read the chapters "7 ABI" and "8 Objects Across Broders" of the book
    "Imperfect C++" (ISBN 0-321-22877-4) by Matthew Wilson?
    http://imperfectcplusplus.com/

    Regards,
    Markus
     
    Markus Elfring, Feb 19, 2005
    #1
    1. Advertising

  2. Markus Elfring

    John Smith Guest

    > "How to mix C and C++"
    > http://www.inf.uni-konstanz.de/~kuehl/c -faq/mixing-c-and-cpp.html
    >


    Thanks but it doesn't tell me anything new.
    It says if you use C++ you must use the C++ related linker. In my case g++
    as ld frontend driver. Also you need compatible compiler versions.

    Lets say you have a C program compiled with gcc v2.95.x. Can you assume it
    will link with other code compiled with gcc or g++ v3.3?
    I assume not because I think the ABI was changed between 2.9.x and 3.x.
    So how about C code compiled with gcc 3.1 and linked with 3.4?
    Likewise what would happen if you used 3.1 and 3.4 of g++ for C++ code?

    Yes I have lots of questions (unfortionatly) because some pieces of
    information is still missing in my mind.

    > Would you like to read the chapters "7 ABI" and "8 Objects Across Broders"

    of the book
    > "Imperfect C++" (ISBN 0-321-22877-4) by Matthew Wilson?
    > http://imperfectcplusplus.com/
    >


    Thank you for the suggestion. As soon as my library gets it I hope to become
    alot smarter.

    -- John
     
    John Smith, Feb 21, 2005
    #2
    1. Advertising

  3. > It says if you use C++ you must use the C++ related linker. In my case g++
    > as ld frontend driver. Also you need compatible compiler versions.


    Did you check if other linkers can also resolve the referenced and imported symbols?


    > Yes I have lots of questions (unfortionatly) because some pieces of
    > information is still missing in my mind.


    Can your C and C++ code be divided into components with clear interfaces?
    How do you think about to separate the functionality into shared libraries to minimize
    compiler dependencies?
    http://en.wikipedia.org/wiki/Application_binary_interface

    Regards,
    Markus
     
    Markus Elfring, Feb 23, 2005
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Johnny Emde

    SO DAM SICK of this error

    Johnny Emde, Oct 14, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    368
    Ken Cox [Microsoft MVP]
    Oct 15, 2005
  2. James Kimble
    Replies:
    36
    Views:
    1,145
    unbending
    Jan 26, 2005
  3. Replies:
    0
    Views:
    300
  4. adfgvx

    Sick (yaml library) and Python

    adfgvx, Sep 20, 2003, in forum: Python
    Replies:
    0
    Views:
    323
    adfgvx
    Sep 20, 2003
  5. geletine

    commercial c compilers vs free c compilers

    geletine, Jul 2, 2006, in forum: C Programming
    Replies:
    33
    Views:
    1,370
Loading...

Share This Page