oboe icon indicating copy to clipboard operation
oboe copied to clipboard

[RhythmGame - game-codelab branch] use of undeclared identifier 'assert' error

Open dturner opened this issue 3 years ago • 4 comments

Getting the following error when trying to build the RhythmGame sample on the game-codelab branch:

/Users/donturner/Code/workspace-android/oboe/src/flowgraph/resampler/PolyphaseResampler.cpp:26:5: error: use of undeclared identifier 'assert'

dturner avatar Mar 03 '21 18:03 dturner

I'm having the same issue on my project. I guess after upgrading NDK.

.../workspace/oboe-1.4.3/src/flowgraph/resampler/PolyphaseResamplerMono.cpp:25:5: error: use of undeclared identifier 'assert'
.../workspace/oboe-1.4.3/src/flowgraph/resampler/PolyphaseResampler.cpp:26:5: error: use of undeclared identifier 'assert'
.../workspace/oboe-1.4.3/src/flowgraph/resampler/SincResamplerStereo.cpp:27:5: error: use of undeclared identifier 'assert'
.../workspace/oboe-1.4.3/src/flowgraph/resampler/SincResampler.cpp:25:5: error: use of undeclared identifier 'assert'
.../workspace/oboe-1.4.3/src/flowgraph/resampler/PolyphaseResamplerStereo.cpp:25:5: error: use of undeclared identifier 'assert'

Had to comment out the assert calls for code to compile.

serhii-k avatar May 18 '21 06:05 serhii-k

You can include the cassert like this to resolve:

#include "cassert"

IHNEL avatar Nov 23 '23 13:11 IHNEL

Fixed in https://github.com/google/oboe/commit/395f3d6ac25c2b069d53451b89dff4aa96d26eb8

robertwu1 avatar Nov 27 '23 18:11 robertwu1

@[email protected] do you know how to cherry-pick this one change to the game-codelab-final branch? It's already in the game-codelab branch.

robertwu1 avatar Nov 27 '23 18:11 robertwu1