J
Jan-Henrik Grobe
Hallo,
normally I am not the one who calls a Newsgroup if something does not work.
But now I am frustrated.
I did write a program with a lot classes. I use some gloabl variables which
are in a file called global.h. Now two of my classes access this variables.
One classes changes the values (writes) and another read them out.
So far so good...under Visual Studio.NET I declared these globals with
__declspec(selectany) and it worked. Now I with to convert everything to
Linux (Fedora Core 2.0), but the g++ compiler does not accept these
__declspec(selectany). I tried it with "extern" but it didnt work, too. I
always get errors like "multiple definitions of xxxxxx"
My question now is, if saomebody knows about such a problems and can provide
a way to solve it.
Many Thanks
Jan-Henrik
normally I am not the one who calls a Newsgroup if something does not work.
But now I am frustrated.
I did write a program with a lot classes. I use some gloabl variables which
are in a file called global.h. Now two of my classes access this variables.
One classes changes the values (writes) and another read them out.
So far so good...under Visual Studio.NET I declared these globals with
__declspec(selectany) and it worked. Now I with to convert everything to
Linux (Fedora Core 2.0), but the g++ compiler does not accept these
__declspec(selectany). I tried it with "extern" but it didnt work, too. I
always get errors like "multiple definitions of xxxxxx"
My question now is, if saomebody knows about such a problems and can provide
a way to solve it.
Many Thanks
Jan-Henrik