How to include header file in Photon

I have a header file VersionArray.h, in it, it contains a char varialbe
VersionArray[][];

Now. Inside a photon application, I have 3 cc files.: x.cc, y.cc, z.cc.
each one of them include VersionArrary.h,
When I compile under photon, in the linking stage, it says VersionArray
declared in the x.o file, multiple declaration in y.o file, multiple
declaration
in z.o file…

I use ‘make shared’ in order to make under photon 2.0. this photon
application didn’t give me linking errors under photon 1.4, anyone got any
idea?

“ran zhang” <rzhang@vamcointernational.com> wrote in message
news:9v5loo$a37$1@inn.qnx.com

I have a header file VersionArray.h, in it, it contains a char varialbe
VersionArray[][];

Now. Inside a photon application, I have 3 cc files.: x.cc, y.cc, z.cc.
each one of them include VersionArrary.h,
When I compile under photon, in the linking stage, it says VersionArray
declared in the x.o file, multiple declaration in y.o file, multiple
declaration
in z.o file…

That normal behavior. The variable should be defined as extern
in the header file and declared in one c file. This is the
standard behavior for C or C++.

I use ‘make shared’ in order to make under photon 2.0.

That’s not what shared is for. It means you want to link
against the shared library instead of the static one.

application didn’t give me linking errors under photon 1.4, anyone got any
idea?

That’s very odd. You should have seen the same error.
Maybe the watcom linker was passed an option to defined variable
as static by default. But I’m not aware of such an option.
Maybe the watcom linker treated this as a warning only and
was still generating the executable and for some reason you
didn’t see or notice the warning?