Victor I get f.ex lots alike:
(.bss+0x64e0):-1: Fehler:multiple definition of
`gizmo_flag_LuaRestartCalled'
and searching in the source returns:
michael@ubuntu:~/CPP/Gizmo$ grep -R "gizmo_flag_LuaRestartCalled" .
[--snip--]
./plugin_source/XPlaneHooks.h: bool gizmo_flag_LuaRestartCalled = false;
[--snip--]
There is your ODR (one definition rule) violation. You have at least
two translation units where this header file got included. That makes
all of'em contain a definition of gizmo_flag_LuaRestartCalled, hence
the multiple definition error.
You get the intented behaviour by turning this definition into a
declaration and define the variable in just one translation unit (for
example, XPlaneHooks.cpp)
extern bool gizmo_flag_LuaRestartCalled; // declaration
bool gizmo_flag_LuaRestartCalled = false; // definition
Pick up a decent C++ book and learn the basics (What are translation
units? What is the concept of separate compilation? What is a
declaration? What is a definition? What is internal/external linkage?
What does the one definition rule say?)
SG