Skip to content

compile error in linux #1

@wantyNing

Description

@wantyNing

HI,
I tried to compile this project in linux.
And the G+Smo was compiled successfully, when I try to compile the shapeopt,
cmake ..
the output is below:

root@wanty-VirtualBox:/home/shape1/build# cmake ../shape
-- The C compiler identification is GNU 7.5.0
-- The CXX compiler identification is GNU 7.5.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- G+Smo is configured at /home/build/lib
-- G+Smo shared library in /home/build/lib
-- Paths are relative to /home/shape1/shape
-- Type "make" to build main
-- Configuring done
-- Generating done
-- Build files have been written to: /home/shape1/build

but when I try to make,Some errors have occurred

Scanning dependencies of target main
[  2%] Building CXX object CMakeFiles/main.dir/main.cpp.o
In file included from /home/shape1/shape/main.cpp:43:0:
/home/shape1/shape/gsOptInit.h: In member function ‘virtual bool gsOptInit::update()’:
/home/shape1/shape/gsOptInit.h:31:36: error: ‘m_status’ was not declared in this scope
     bool update(){ solve(); return m_status; };
                                    ^~~~~~~~
/home/shape1/shape/gsOptInit.h:31:36: note: suggested alternative: ‘m_data’
     bool update(){ solve(); return m_status; };
                                    ^~~~~~~~
                                    m_data
In file included from /home/shape1/shape/main.cpp:44:0:
/home/shape1/shape/gsOptInit2nd.h: In member function ‘virtual bool gsOptInit2nd::update()’:
/home/shape1/shape/gsOptInit2nd.h:31:36: error: ‘m_status’ was not declared in this scope
     bool update(){ solve(); return m_status; };
                                    ^~~~~~~~
/home/shape1/shape/gsOptInit2nd.h:31:36: note: suggested alternative: ‘m_data’
     bool update(){ solve(); return m_status; };
                                    ^~~~~~~~
                                    m_data

.............

/home/gismo-stable/src/gsAssembler/gsExprAssembler.h:432:10:   required from ‘void gismo::gsExprAssembler<T>::_apply(op, const gismo::expr::_expr<E2>&, Rest ...) [with op = gismo::gsExprAssembler<>::_eval; E1 = gismo::expr::mult_expr<gismo::expr::mult_expr<gismo::expr::mult_expr<double, gismo::expr::nvDeriv_expr<gismo::expr::gsFeSpace<double> >, false>, gismo::expr::onormal_expr<double>, false>, gismo::expr::tr_expr<gismo::expr::gsFeVariable<double> >, false>; Rest = {gismo::expr::mult_expr<gismo::expr::gsFeVariable<double>, gismo::expr::fjac_expr<double>, false>}; T = double]’
/home/gismo-stable/src/gsAssembler/gsExprAssembler.h:750:19:   required from ‘void gismo::gsExprAssembler<T>::assemble(expr ...) [with expr = {gismo::expr::mult_expr<gismo::expr::mult_expr<gismo::expr::mult_expr<double, gismo::expr::nvDeriv_expr<gismo::expr::gsFeSpace<double> >, false>, gismo::expr::onormal_expr<double>, false>, gismo::expr::tr_expr<gismo::expr::gsFeVariable<double> >, false>, gismo::expr::mult_expr<gismo::expr::gsFeVariable<double>, gismo::expr::fjac_expr<double>, false>}; T = double]’
/home/shape1/shape/main.cpp:3164:56:   required from here
/home/shape1/shape/gsMyExpressions.h:322:79: error: invalid initialization of reference of type ‘const gismo::expr::gsFeSpace<double>&’ from expression of type ‘const gismo::expr::gsNullExpr<double>’
  const gsFeSpace<Scalar> & colVar() const { return gsNullExpr<Scalar>::get(); }
                                                                            ^
CMakeFiles/main.dir/build.make:62: recipe for target 'CMakeFiles/main.dir/main.cpp.o' failed
make[2]: *** [CMakeFiles/main.dir/main.cpp.o] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/main.dir/all' failed
make[1]: *** [CMakeFiles/main.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2

Is it that the version I selected does not match?
Could you please provide some advice?
Thanks a lot!

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