<div dir="ltr">Dear Matt, <div><br></div><div>It was my "configure" mistake. I was set --with-cxx=0 not --with-cxx=g++. </div><div>This issue is solved now. </div><div><br></div><div>Thank you very much. </div><div><br clear="all"><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr">Jake Lee (이재규)</div></div></div></div></div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">2022년 12월 2일 (금) 오전 12:06, Matthew Knepley <<a href="mailto:knepley@gmail.com">knepley@gmail.com</a>>님이 작성:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr">On Thu, Dec 1, 2022 at 9:53 AM Jake Lee <<a href="mailto:leejaku@gmail.com" target="_blank">leejaku@gmail.com</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Dear Petsc Project Manager,</div><div><br></div><div>I am Jake Lee with the Advanced Institute of Convergence Technology in South Korea. </div><div>I'm programming with Petsc-3.17 and I encountered the following two errors. </div><div>PETSC_FUNCTION_NAME_CXX and PETSC_RESTRICT macros are not defined?</div><div><br></div><div>1. ./petsc-3.17.0/include/petscmacros.h:10:31: error: ‘PETSC_FUNCTION_NAME_CXX’ was not declared in this scope; did you mean ‘PETSC_FUNCTION_NAME_C’?</div>   10 | #  define PETSC_FUNCTION_NAME PETSC_FUNCTION_NAME_CXX<br><div><br></div><div>2. In file included from ./slepc-3.17.0/include/slepcsys.h:18,</div>                 from ./slepc-3.17.0/include/slepcst.h:16,<br>                 from ./slepc-3.17.0/include/slepceps.h:16,<br>                 from main.cpp:15:<br>./petsc-3.17.0/include/petscsys.h:2548:108: error: expected ‘,’ or ‘...’ before ‘*’ token<br> 2548 | static inline PetscErrorCode PetscSegBufferGetInts(PetscSegBuffer seg,size_t count,PetscInt *PETSC_RESTRICT*slot) {return PetscSegBufferGet(seg,count,(void**)slot);}<br>      |                                                                                                            ^<br>./petsc-3.17.0/include/petscsys.h: In function ‘PetscErrorCode PetscSegBufferGetInts(PetscSegBuffer, size_t, PetscInt*)’:<br>./petsc-3.17.0/include/petscsys.h:2548:159: error: ‘slot’ was not declared in this scope<br> 2548 | rrorCode PetscSegBufferGetInts(PetscSegBuffer seg,size_t count,PetscInt *PETSC_RESTRICT*slot) {return PetscSegBufferGet(seg,count,(void**)slot);}<br>      |                                                                                                                                           ^~~~<br><div><br></div></div></blockquote><div><br></div><div>1. PETSC_FUNCTION_NAME_CXX is defined in petscconf.h which is created by configure. Perhaps you need to rerun your configure</div><div>    if you updated from an earlier version. You can check in</div><div><br></div><div>       petsc-3.17.0/arch-linux-c-debug/include/petscconf.h</div><div><br></div><div>   for the macro</div><div><br></div><div>2. The PETSC_RESTRICT is a knock-on error from the last error.</div><div><br></div><div>  Thanks,</div><div><br></div><div>     Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div></div><div>It seems to be a simple problem. Can I get some hints for them?</div><div><br></div><div>My environment is...</div><div>- CentOS 7 </div><div>- gcc 9.3.1</div><div>- compile option </div><div>g++ -std=c++17   -I./eigen-3.4.0 -I./boost_1_77_0 -I./petsc-3.17.0/include -I./petsc-3.17.0/arch-linux-c-debug/include -I./slepc-3.17.0/include -I./slepc-3.17.0/arch-linux-c-debug/include -c main.cpp<br></div><div><br></div><div>Thank you!</div><div><br></div><div><div dir="ltr"><div dir="ltr"><div><div dir="ltr">Jake Lee (이재규)</div></div></div></div></div></div>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>-- Norbert Wiener</div><div><br></div><div><a href="http://www.cse.buffalo.edu/~knepley/" target="_blank">https://www.cse.buffalo.edu/~knepley/</a><br></div></div></div></div></div></div></div></div>
</blockquote></div>