Skip to content

Can't build schematic_file.cpp with MinGW - expected type-specifier before 'Rectangle' #1109

Description

@Luddite-Geekazoid

I get these errors:

schematic_file.cpp: In member function 'bool Schematic::loadPaintings(QTextStream*, SharedObjectList&)': schematic_file.cpp:683:42: error: expected type-specifier before 'Rectangle'
683 | else if(cstr == "Rectangle") p = new Rectangle();
| ^~~~~~~~~
schematic_file.cpp:685:40: error: expected type-specifier before 'Ellipse'
685 | else if(cstr == "Ellipse") p = new Ellipse();
| ^~~~~~~
make[3]: *** [Makefile:904: schematic_file.lo] Error 1
rm qucs_.cpp

The source code has similar statements that don't result in an error:
#` cstr = Line.section(' ',0,0); // painting type

     if(cstr == "Line") p = new GraphicLine();

else if(cstr == "EArc") p = new EllipseArc();

else if(cstr == ".PortSym") p = new PortSymbol();

else if(cstr == ".ID") p = new ID_Text();

else if(cstr == "Text") p = new GraphicText();


else if(cstr == "Rectangle") p = new Rectangle();

else if(cstr == "Arrow") p = new Arrow();

else if(cstr == "Ellipse") p = new Ellipse();

else {

  QMessageBox::critical(0, QObject::tr("Error"),

	QObject::tr("Format Error:\nUnknown painting: ") + Line);

  return false;

}`

msys64 installed from msys2-x86_64-20250830.exe
Windows 10, 22H2, 10.0.19045 Build 19045
qucs 0.0.21-dev cloned 2025-10-23 20:08 UTC

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions