inline functions

R

Robin Forster

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!
 
V

Victor Bazarov

Robin Forster said:
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
 
R

Rolf Magnus

Victor said:
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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,904
Latest member
HealthyVisionsCBDPrice

Latest Threads

Top