Mail Archives: djgpp/1992/05/12/11:06:36
>Wassup!
>I recently downloaded the new djgcc, but I`ve encountered various problems
>with it.
>1st of all, I can`t declare class members static. e.g. check out this little
>piece of code:
>#include <stream.h>
>class xy
>{
> public:
> static int foo;
>};
>main()
>{
> xy test;
> int a;
> xy::foo=2;
> cout << xy::foo;
>}
>which IMHO should work fine (at least it did with the old version).
>But the compiler gives me somethin` like this:
>TEST.o: Undefined symbol __2xy$foo referenced from text segment
The C++ spec states that you have to manually declare static members
outside of the class definition, much like you define methods:
int xy::foo;
The old compiler guessed at where you wanted it to go, or used the
#pragma implementation method to decide.
>Also, I`ve had a problem with the old Borland make, which worked fine with
>the old gcc but now causes HD hangs almost always.
I use NDMAKE, which causes tcc to hang, for gcc; and TMAKE, which is
too wimpy for gcc, for tcc.
>Other than that, I love the whole djgpp project, esp. the new cbgrx lib, which
>works wonderfully w/ my old t4k card.
It's nice to hear good news for a change :-)
DJ
dj AT ctron DOT com
Life is a banana.
- Raw text -