combind the C and C++ program

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • s88

    combind the C and C++ program

    Hi all:
    I encounter a problem in my C++ project which I have to call
    some functions written in C. Could I just include the C library without
    g++ recompilation??

    Thanks in advance,
    Dave.

  • Rolf Magnus

    #2
    Re: combind the C and C++ program

    s88 wrote:
    [color=blue]
    > Hi all:
    > I encounter a problem in my C++ project which I have to call
    > some functions written in C. Could I just include the C library without
    > g++ recompilation??[/color]

    Yes.

    Comment

    • s88

      #3
      Re: combind the C and C++ program

      :D Thank you very much!!!
      Could you tell me how to make it???

      I mean, just compile the C++ file with the C object/library files?
      or need to add some C++ flags?

      best regards,
      Dave

      Comment

      • Jonathan Mcdougall

        #4
        Re: combind the C and C++ program

        s88 wrote:[color=blue]
        > :D Thank you very much!!!
        > Could you tell me how to make it???
        >
        > I mean, just compile the C++ file with the C object/library files?
        > or need to add some C++ flags?[/color]

        Questions about compilers and linkers are best asked where topical; for
        example, not here. See
        http://www.parashift.com/c++-faq-lit...t.html#faq-5.9 for
        newsgroup suggestions.


        Jonathan

        Comment

        Working...