Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RtAudio: fix globally visible VERSION constant #4

Closed
wants to merge 1 commit into from

Conversation

tmatth
Copy link
Contributor

@tmatth tmatth commented Feb 6, 2014

Calling it VERSION clashes with the VERSION macro of any autotools based project.

See https://gist.github.com/tmatth/e968b9e27e8cc806daba for a more complete explanation/example.

Calling it VERSION clashes with the VERSION macro of any autotools based project.
@radarsat1
Copy link
Contributor

Hm, didn't realize the version is hardcoded in there.

@tmatth
Copy link
Contributor Author

tmatth commented Feb 6, 2014

Hardcoding it is not so bad, it should just be called something else.

@garyscavone
Copy link
Contributor

I already changed it in a prerelease version I am putting together. I changed it to use

#define RTAUDIO_VERSION “4.1.0pre”

in RtAudio.h and then the function:

std::string RtAudio :: getVersion( void ) throw()
{
return std::string( RTAUDIO_VERSION );
}

defined in RtAudio.cpp. Another user wrote to mention the compile problem and also point out that there could be problems with reporting the correct version when using a library.

I wish I had time to wrap up the new release but I’m currently swamped with higher priorities.

—gary

On Feb 6, 2014, at 10:24 AM, tmatth notifications@github.com wrote:

Hardcoding it is not so bad, it should just be called something else.


Reply to this email directly or view it on GitHub.

@tmatth
Copy link
Contributor Author

tmatth commented Feb 6, 2014

OK, since it's not depending on your build system, I would write:
static const char * RTAUDIO_VERSION = "4.1.0pre";

Also note that in any case, you don't need the std::string( ) constructor in the getVersion() method.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants