Skip to content

ScriptOperator definitions - static linking #313

@satirn

Description

@satirn

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions