CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Main CFD Forum (https://www.cfd-online.com/Forums/main/)
-   -   OpenFOAM foamNewSource compilation error (https://www.cfd-online.com/Forums/main/240994-openfoam-foamnewsource-compilation-error.html)

Volle February 3, 2022 16:41

OpenFOAM foamNewSource compilation error
 
Hello :)
I have problems compiling a new class when i start from the

Code:

foamNewSource H box
foamNewSource C box

I then removed what is optional and only get errors.
Now i compiled with



box.H:

Code:

#ifndef box_H
#define box_H
#include "vector.H"

namespace Foam
{

class box
{
        int data_;
        vector uf_;

public:

    box();

    ~box();

}

}

#endif

// ************************************************************************* //

and box.C
Code:

#include "box.H"

box::box()
:
    data_()
{}

This combination spit me only 1 error out:

error: ‘box’ does not name a type; did you mean ‘box_H’? (Edit: error is in the line "box::box()" )

I do not know what to do, do you have any suggestions?

Best wishes
Ingo


All times are GMT -4. The time now is 01:26.