home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!pipex!warwick!uknet!edcastle!dcs.ed.ac.uk!nm
- From: nm@dcs.ed.ac.uk (Neil Mackinnon)
- Newsgroups: comp.lang.c++
- Subject: Trouble With extern declaration in g++-2.3.3
- Message-ID: <C17GJ6.9Gu@dcs.ed.ac.uk>
- Date: 21 Jan 93 13:09:06 GMT
- Sender: cnews@dcs.ed.ac.uk (UseNet News Admin)
- Organization: Department of Computer Science, University of Edinburgh
- Lines: 29
-
- I wonder if anyone out there could help me with a small problem I am
- having.
-
- I am writing classes that will be linked with code generated by another
- program to form a simulation program that will carry out a simulation of a
- systolic array. Within one of the classes I have a declarations
-
- extern int NO_OF_PORTS;
-
- static portElem externalData[NO_OF_PORTS];
-
- To say how many connections the array will have to the outside world.
- it is an extern declaration because the code that is generated by my
- main program will assign it a particular value according to the particular
- array I am simulating. The compiler (g++-2.3.3) I am using is not allowing
- me to generate an unlinked object file for the class but is giving me
- the error message
-
- ../include/arrayIo.h:22: variable-size type declared outside of any function
-
- I have not been using C++ for long and have never seen this error before
- if anyone could help I would be most greatful.
-
-
- --
- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- Neil A Mackinnon nm@uk.ac.ed.dcs
- (Moneys not everything but comes damm close)
- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-