inline functions

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

    #1

    inline functions

    I am trying to turn some of my methods inline. However, the compiler
    complains upon link that the symbols do not exist. I implemented the
    method as shown below:

    inline void aule_gl_surface ::gl_bind(int frame) { code; }

    Cheers!
  • Victor Bazarov

    #2
    Re: inline functions

    "Robin Forster" <robin.forster@ sympatico.ca> wrote...[color=blue]
    > I am trying to turn some of my methods inline. However, the compiler
    > complains upon link that the symbols do not exist. I implemented the
    > method as shown below:
    >
    > inline void aule_gl_surface ::gl_bind(int frame) { code; }[/color]

    Inlined functions have to be visible to the compiler when it
    compiles calls to them. Move all functions you want to turn
    "inline" to the header next to 'aule_gl_surfac e' definition.

    Victor


    Comment

    • Rolf Magnus

      #3
      Re: inline functions

      Victor Bazarov wrote:
      [color=blue]
      > "Robin Forster" <robin.forster@ sympatico.ca> wrote...[color=green]
      >> I am trying to turn some of my methods inline. However, the compiler
      >> complains upon link that the symbols do not exist. I implemented the
      >> method as shown below:
      >>
      >> inline void aule_gl_surface ::gl_bind(int frame) { code; }[/color]
      >
      > Inlined functions have to be visible to the compiler when it
      > compiles calls to them. Move all functions you want to turn
      > "inline" to the header next to 'aule_gl_surfac e' definition.[/color]

      You can also put them in an own file if you want, and then #include that
      at the end of the header.

      Comment

      Working...