Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. Calling C++ functions from C

Calling C++ functions from C

Scheduled Pinned Locked Moved The Lounge
c++question
6 Posts 5 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Alexandru Savescu
    wrote on last edited by
    #1

    Hello everyone, Is there a way from a C program I can call C++ functions without getting C++ linkage errors? I know that if I wanted from C++ to call C functions I declare them with extern "C", but what about the other way around? Thanks Best regards, Alexandru Savescu

    T T 2 Replies Last reply
    0
    • A Alexandru Savescu

      Hello everyone, Is there a way from a C program I can call C++ functions without getting C++ linkage errors? I know that if I wanted from C++ to call C functions I declare them with extern "C", but what about the other way around? Thanks Best regards, Alexandru Savescu

      T Offline
      T Offline
      Tomasz Sowinski
      wrote on last edited by
      #2

      You need to link with 'post_in_right_forum.lib'. Tomasz Sowinski -- http://www.shooltz.com
      ** If you're going to rape, pillage and burn, be sure to do things in that order. **

      J 1 Reply Last reply
      0
      • A Alexandru Savescu

        Hello everyone, Is there a way from a C program I can call C++ functions without getting C++ linkage errors? I know that if I wanted from C++ to call C functions I declare them with extern "C", but what about the other way around? Thanks Best regards, Alexandru Savescu

        T Offline
        T Offline
        Tibor Blazko
        wrote on last edited by
        #3

        linker error: something wrong with your forum selection (extern "C" is for c to cpp calls) t!

        1 Reply Last reply
        0
        • T Tomasz Sowinski

          You need to link with 'post_in_right_forum.lib'. Tomasz Sowinski -- http://www.shooltz.com
          ** If you're going to rape, pillage and burn, be sure to do things in that order. **

          J Offline
          J Offline
          Jeremy Falcon
          wrote on last edited by
          #4

          Tomasz Sowinski wrote: You need to link with 'post_in_right_forum.lib'. Is that ANSI or ISO compliant? :-D Jeremy L. Falcon "The One Who Said, 'The One Who Said...'" Homepage: imputek.com

          T 1 Reply Last reply
          0
          • J Jeremy Falcon

            Tomasz Sowinski wrote: You need to link with 'post_in_right_forum.lib'. Is that ANSI or ISO compliant? :-D Jeremy L. Falcon "The One Who Said, 'The One Who Said...'" Homepage: imputek.com

            T Offline
            T Offline
            Tomasz Sowinski
            wrote on last edited by
            #5

            Jeremy Falcon wrote: Is that ANSI or ISO compliant? No. But they're considering it for inclusion in C++/2010 standard ;) Tomasz Sowinski -- http://www.shooltz.com
            ** If you're going to rape, pillage and burn, be sure to do things in that order. **

            C 1 Reply Last reply
            0
            • T Tomasz Sowinski

              Jeremy Falcon wrote: Is that ANSI or ISO compliant? No. But they're considering it for inclusion in C++/2010 standard ;) Tomasz Sowinski -- http://www.shooltz.com
              ** If you're going to rape, pillage and burn, be sure to do things in that order. **

              C Offline
              C Offline
              CMFC6 0VS NETUser
              wrote on last edited by
              #6

              Tomasz Sowinski wrote: No. But they're considering it for inclusion in C++/2010 standard Can't wait... Real World Coding:      POP& BuyAPop(Money ADollar){...};

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups