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

ScriptOperator definitions - static linking #313

Open
satirn opened this issue Oct 1, 2021 · 3 comments
Open

ScriptOperator definitions - static linking #313

satirn opened this issue Oct 1, 2021 · 3 comments
Assignees

Comments

@satirn
Copy link

satirn commented Oct 1, 2021

I'm trying to compile cfdcore in xcode but have been unable due to the following error associated with each of the opcode definitions located in the cfdcore_script header:

Expected member name or ';' after declaration specifiers

I noticed the following comment above the class declaration:

/**
 * @brief Script Operation definition class.
 * @details
 * Regarding the definition value of OP_XXXX, please note the following when using it.
 * - When statically linking, do not use it as the initial value of global variables.
 *   - Due to the initialization order, it may be set in the uninitialized state.
 *   - When using it as the initial value of a global variable, \
 *     use ScriptType instead of ScriptOperator.
 */

In the comment it is instructed, 'do not use it as the initial value of global variables', which I assume must be related to this issue. My question is, how can I change the code to use ScriptType instead of ScriptOperator (as instructed)? Would it be possible for someone to provide a diff to demonstrate this change?

Thanks

@k-matsuzawa
Copy link
Collaborator

k-matsuzawa commented Oct 1, 2021

@satirn
Thank you for reporting this!
I will investigate now. If you can, please let me know the version of MacOS and xcode. 🙏

@k-matsuzawa k-matsuzawa self-assigned this Oct 1, 2021
@satirn
Copy link
Author

satirn commented Oct 1, 2021

Thanks @k-matsuzawa

macOS Big Sur 11.5.2 (20G95)
Xcode Version 13.0 (13A233)

@k-matsuzawa
Copy link
Collaborator

k-matsuzawa commented Oct 2, 2021

@satirn
In the first place, I did not describe the setup procedure for working with Xcode/VisualStudio. 😓
It is possible that you may have been missing some necessary files. (Especially libwally-core)
I have added the procedure for setup using cmake to the README. Please check it. 🙏

https://github.com/cryptogarageinc/cfd-core/tree/v0.4.0#using-ide
https://github.com/cryptogarageinc/cfd-core/blob/v0.4.0/tools/simple_xcode_build_debug.sh

My operation check version:

  • macOS Big Sur 11.6
  • Xcode Version 13.0 (13A233)
  • CMake 3.21.3

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

No branches or pull requests

2 participants