Quantcast
Viewing all articles
Browse latest Browse all 40524

Using ofxGui slider values outside of ofApp

I have a class "Wave" and inside I'd like to access the slider value 'waveSpeed' but it gives me linking errors.

z += ofApp::waveSpeed * deltaTime;

That gives me invalid use of non-static

If I make it a static variable it throws:

Undefined symbols for architecture i386:
  "ofApp::waveSpeed", referenced from:
      ofApp::setup() in ofApp.o
      Wave::update() in Wave.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Viewing all articles
Browse latest Browse all 40524

Trending Articles