Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > inline functions

Reply
Thread Tools

inline functions

 
 
Robin Forster
Guest
Posts: n/a
 
      06-29-2003
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!
 
Reply With Quote
 
 
 
 
Victor Bazarov
Guest
Posts: n/a
 
      06-29-2003
"Robin Forster" <(E-Mail Removed)> wrote...
> 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; }


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_surface' definition.

Victor


 
Reply With Quote
 
 
 
 
Rolf Magnus
Guest
Posts: n/a
 
      06-29-2003
Victor Bazarov wrote:

> "Robin Forster" <(E-Mail Removed)> wrote...
>> 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; }

>
> 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_surface' definition.


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

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Multiple functions (one version being inline and other beingnon-inline) Rahul C++ 3 02-28-2008 03:28 PM
converting inline functions to C functions jamihuq C Programming 7 05-17-2006 08:46 AM
Tool which expands implicitly inline inline functions tthunder@gmx.de C++ 3 06-16-2005 12:54 AM
External inline functions calling internal inline functions Daniel Vallstrom C Programming 2 11-21-2003 01:57 PM
inline or not to inline in C++ Abhi C++ 2 07-03-2003 12:07 AM



Advertisments