Skip to content

Mac build updates#94

Merged
jsiegle merged 6 commits intoopen-ephys:developmentfrom
cstawarz:mac_build_updates
Oct 13, 2016
Merged

Mac build updates#94
jsiegle merged 6 commits intoopen-ephys:developmentfrom
cstawarz:mac_build_updates

Conversation

@cstawarz
Copy link
Copy Markdown
Contributor

These changes fix some macOS build issues and update some Xcode project settings. They also add Xcode projects for the JuliaProcessor and BinaryWriter plugins.

@jsiegle jsiegle merged commit d3849ec into open-ephys:development Oct 13, 2016
@aacuevas
Copy link
Copy Markdown
Collaborator

Chris, is there any specific reason XCode is so picky about the order of member initialization in the constructors? What is the rule, so we can try to write them in the right order in the future? It doesn't seem to be an issue on linux or windows.

@cstawarz cstawarz deleted the mac_build_updates branch October 14, 2016 13:51
@cstawarz
Copy link
Copy Markdown
Contributor Author

Xcode (well, really clang) is complaining because the project files include -Wreorder in their compiler options. This flag is supported by gcc, too. This Stack Overflow question has a succinct explanation of what it does and why it may matter. I don't know why only the Mac build uses this flag. (I didn't add it, though I think it's a good idea.)

To avoid triggering the warning, the order of the member initializers must match the actual initialization order. For non-static data members, this means the order in which the members are declared in the class definition. See the section "Initialization order" in Constructors and member initializer lists for more details.

@aacuevas
Copy link
Copy Markdown
Collaborator

Oh, so the order in which members are initialized is not the order they appear in the constructor but the one they are declared in, interesting, I didn't notice that particular detail. (not quite intuitive, but in line from what one might expect from C++) Makes sense if you think that that way all members are initialized in the same order regardless of what different constructors might do.

Thanks for the info!

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.

4 participants