Skip to content

[FEATURE] add library init routine - #2966

Merged
timosachsenberg merged 2 commits into
OpenMS:developfrom
hroest:fix/init
Oct 23, 2017
Merged

timosachsenberg merged 2 commits into
OpenMS:developfrom
hroest:fix/init

Conversation

@hroest

@hroest hroest commented Oct 20, 2017

Copy link
Copy Markdown
Contributor

fixes #352

procedures need to be run at startup (and preferably only once).

*/

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't we need an: extern xerces_init xinit; ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

only if we want to expose it to external callers, right? which we dont want to?

Global variables have global scope, and can be used anywhere in the program. Like functions, you must use a forward declaration (via keyword extern) to use a global variable defined in another file. By default, non-const global variables have external linkage.Jun 19, 2007

so maybe we should make it const

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"By default, non-const variables declared outside of a block are assumed to be external. However, const variables declared outside of a block are assumed to be internal."
Yes I guess we need const or static to declare internal linkage.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have just added const on github, lets see whether the tests work

Comment thread src/openms/source/CONCEPT/Init.cpp Outdated
}

};
xerces_init xinit;

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe add const?

@timosachsenberg
timosachsenberg merged commit 7f847b2 into OpenMS:develop Oct 23, 2017
@hroest
hroest deleted the fix/init branch October 23, 2017 18:39
@hroest

hroest commented Oct 23, 2017

Copy link
Copy Markdown
Contributor Author

what happened to the windows build?

@jpfeuffer

Copy link
Copy Markdown
Contributor

Hmm unfortunately it did not upload to CDash. I increased the retention time of the build logs for CI on Jenkins (which was the reason for the deletion).

@jpfeuffer

Copy link
Copy Markdown
Contributor

rebuild win

@jpfeuffer

Copy link
Copy Markdown
Contributor

probably does not work after it was merged

@timosachsenberg

Copy link
Copy Markdown
Contributor

hmm was the header file added to the cmake?

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.

SEGFAULT in xerces libraries when removing default instance of SvmTheoreticalSpectrumGenerator [352]

3 participants