Invalid structure redefinition G0505 "PV"

I encountered the followong error messages: Invalid structure redefinition G0505 "PV" and  Invalid structure redefinition G0505 "DS".

Please tell me what I should check when I see them?

Thanks in advance.


1 Answer


The invalid redefinition error typically comes up when you define a variable to be a structure and then later define it to be a different type of structure. For example:

//Create an instance of a PV struct called 'mypv'
struct PV mypv;

//Attempt to redefine 'mypv' as an instance of a DS struct
struct DS mypv;

This above is essentially what is happening whenever you get this error.
One of the most common ways that this comes up is from running different files. If program 'A' defines 'mystruct' to be a struct of type 'PV' and then program 'B' defines 'mystruct' to be a struct of type 'DS', then you will get this error if you first run program 'A' and then run program 'B'. Placing:


at the top of each program will prevent this case, because new clears all variables from the GAUSS workspace.

If the structures are being redefined in the same program, then you need to come up with some more variable names.

You must login to post answers.

Have a Specific Question?

Get a real answer from a real person

Need Support?

Get help from our friendly experts.

Try GAUSS for 14 days for FREE

See what GAUSS can do for your data

© Aptech Systems, Inc. All rights reserved.

Privacy Policy