[petsc-users] Linking error with C++ code: undefined symbols

charles reid charlesreid1 at gmail.com
Wed Mar 24 13:12:14 CDT 2010


Hi Matt,

That alternative line gives me problems - but works if I add
${PETSC_CC_INCLUDES} to the compiler command.  If I don't, I see this stuff:

g++ -Wl,-multiply_defined,suppress -Wl,-multiply_defined -Wl,suppress
-Wl,-commons,use_dylibs -Wl,-search_paths_first  -Wall -Wwrite-strings
-Wno-strict-aliasing -g  Laplace.cc -o bin.x BoundaryConditionFactory.o
BoundaryCondition.o Field.o FileIO.o JacobiSolver.o Timer.o TimerFactory.o
GmresSolver.o -L/Users/charles/pkg/petsc-3.0.0-p12/darwin9.5.0-c-opt/lib
-L/Users/charles/pkg/petsc-3.0.0-p12/darwin9.5.0-c-opt/lib -lpetscksp
-lpetscdm -lpetscmat -lpetscvec -lpetsc    -L/usr/X11/lib -lX11 -llapack
-lblas -L/Users/charles/pkg/petsc-3.0.0-p12/darwin9.5.0-c-opt/lib -lmpiuni
-L/usr/lib/i686-apple-darwin9/4.0.1 -L/usr/lib/gcc/i686-apple-darwin9/4.0.1
-ldl -lgcc_s.10.5 -lSystem -lgfortranbegin -lgfortran
-L/usr/local/libexec/gcc/i386-apple-darwin9.7.0/4.4.1
-L/usr/local/libexec/gcc/i386-apple-darwin9.7.0
-L/usr/local/lib/gcc/i386-apple-darwin9.7.0/4.4.1
-L/usr/local/lib/gcc/i386-apple-darwin9.7.0 -L/usr/local/lib -lstdc++
-lstdc++ -ldl -lgcc_s.10.5 -lSystem -ldl
In file included from
/Users/charles/pkg/petsc-3.0.0-p12/include/petscis.h:7,
                 from
/Users/charles/pkg/petsc-3.0.0-p12/include/petscvec.h:9,
                 from
/Users/charles/pkg/petsc-3.0.0-p12/include/petscmat.h:6,
                 from
/Users/charles/pkg/petsc-3.0.0-p12/include/petscpc.h:6,
                 from
/Users/charles/pkg/petsc-3.0.0-p12/include/petscksp.h:6,
                 from GmresSolver.h:10,
                 from Laplace.cc:8:
/Users/charles/pkg/petsc-3.0.0-p12/include/petsc.h:13:23: error:
petscconf.h: No such file or directory
/Users/charles/pkg/petsc-3.0.0-p12/include/petsc.h:14:22: error: petscfix.h:
No such file or directory
In file included from
/Users/charles/pkg/petsc-3.0.0-p12/include/petsc.h:1431,
                 from
/Users/charles/pkg/petsc-3.0.0-p12/include/petscis.h:7,
                 from
/Users/charles/pkg/petsc-3.0.0-p12/include/petscvec.h:9,
                 from
/Users/charles/pkg/petsc-3.0.0-p12/include/petscmat.h:6,
                 from
/Users/charles/pkg/petsc-3.0.0-p12/include/petscpc.h:6,
                 from
/Users/charles/pkg/petsc-3.0.0-p12/include/petscksp.h:6,
                 from GmresSolver.h:10,
                 from Laplace.cc:8:
/Users/charles/pkg/petsc-3.0.0-p12/include/private/petscimpl.h:8:21: error:
petsc.h: No such file or directory
In file included from
/Users/charles/pkg/petsc-3.0.0-p12/include/petscvec.h:432,
                 from
/Users/charles/pkg/petsc-3.0.0-p12/include/petscmat.h:6,
                 from
/Users/charles/pkg/petsc-3.0.0-p12/include/petscpc.h:6,
                 from
/Users/charles/pkg/petsc-3.0.0-p12/include/petscksp.h:6,
                 from GmresSolver.h:10,
                 from Laplace.cc:8:
/Users/charles/pkg/petsc-3.0.0-p12/include/private/vecimpl.h:11:22: error:
petscvec.h: No such file or directory
/Users/charles/pkg/petsc-3.0.0-p12/include/petscviewer.h:117: error:
‘PETSC_STATIC_INLINE’ does not name a type
/Users/charles/pkg/petsc-3.0.0-p12/include/petscoptions.h:10: error:
‘PETSC_STATIC_INLINE’ does not name a type
/Users/charles/pkg/petsc-3.0.0-p12/include/petscoptions.h:12: error:
‘PETSC_STATIC_INLINE’ does not name a type
/Users/charles/pkg/petsc-3.0.0-p12/include/petscoptions.h:14: error:
‘PETSC_STATIC_INLINE’ does not name a type
/Users/charles/pkg/petsc-3.0.0-p12/include/petscoptions.h:16: error:
‘PETSC_STATIC_INLINE’ does not name a type
/Users/charles/pkg/petsc-3.0.0-p12/include/petscoptions.h:18: error:
‘PETSC_STATIC_INLINE’ does not name a type
/Users/charles/pkg/petsc-3.0.0-p12/include/petscoptions.h:20: error:
‘PETSC_STATIC_INLINE’ does not name a type
/Users/charles/pkg/petsc-3.0.0-p12/include/petscoptions.h:22: error:
‘PETSC_STATIC_INLINE’ does not name a type
/Users/charles/pkg/petsc-3.0.0-p12/include/petscoptions.h:24: error:
‘PETSC_STATIC_INLINE’ does not name a type
/Users/charles/pkg/petsc-3.0.0-p12/include/petscoptions.h:26: error:
‘PETSC_STATIC_INLINE’ does not name a type
/Users/charles/pkg/petsc-3.0.0-p12/include/petscoptions.h:28: error:
‘PETSC_STATIC_INLINE’ does not name a type
/Users/charles/pkg/petsc-3.0.0-p12/include/petsc.h:1220: error:
‘PETSC_STATIC_INLINE’ does not name a type
/Users/charles/pkg/petsc-3.0.0-p12/include/petsc.h:1414: error:
‘PETSC_STATIC_INLINE’ does not name a type
/Users/charles/pkg/petsc-3.0.0-p12/include/petsc.h:1415: error:
‘PETSC_STATIC_INLINE’ does not name a type
/Users/charles/pkg/petsc-3.0.0-p12/include/petsc.h:1417: error:
‘PETSC_STATIC_INLINE’ does not name a type
/Users/charles/pkg/petsc-3.0.0-p12/include/petsc.h:1418: error:
‘PETSC_STATIC_INLINE’ does not name a type
/Users/charles/pkg/petsc-3.0.0-p12/include/petscis.h:127: error:
‘PETSC_STATIC_INLINE’ does not name a type
/Users/charles/pkg/petsc-3.0.0-p12/include/petscis.h:157: error:
‘PETSC_IS_COLOR_VALUE_TYPE’ does not name a type
/Users/charles/pkg/petsc-3.0.0-p12/include/petscis.h:158: error:
‘ISColoringValue’ has not been declared
/Users/charles/pkg/petsc-3.0.0-p12/include/petscis.h:158: error:
‘ISColoringValue’ has not been declared
/Users/charles/pkg/petsc-3.0.0-p12/include/petscis.h:178: error: ISO C++
forbids declaration of ‘ISColoringValue’ with no type
/Users/charles/pkg/petsc-3.0.0-p12/include/petscis.h:178: error: expected
‘;’ before ‘*’ token
/Users/charles/pkg/petsc-3.0.0-p12/include/petscis.h:184: error: ISO C++
forbids declaration of ‘ISColoringValue’ with no type
/Users/charles/pkg/petsc-3.0.0-p12/include/petscvec.h:61: error:
‘PETSC_STATIC_INLINE’ does not name a type
/Users/charles/pkg/petsc-3.0.0-p12/include/petscvec.h:63: error:
‘PETSC_STATIC_INLINE’ does not name a type
/Users/charles/pkg/petsc-3.0.0-p12/include/petscvec.h:65: error:
‘PETSC_STATIC_INLINE’ does not name a type
/Users/charles/pkg/petsc-3.0.0-p12/include/petscvec.h:67: error:
‘PETSC_STATIC_INLINE’ does not name a type
/Users/charles/pkg/petsc-3.0.0-p12/include/petscvec.h:69: error:
‘PETSC_STATIC_INLINE’ does not name a type
/Users/charles/pkg/petsc-3.0.0-p12/include/petscvec.h:83: error:
‘PETSC_STATIC_INLINE’ does not name a type
/Users/charles/pkg/petsc-3.0.0-p12/include/petscvec.h:85: error:
‘PETSC_STATIC_INLINE’ does not name a type
/Users/charles/pkg/petsc-3.0.0-p12/include/petscvec.h:158: error:
‘PETSC_STATIC_INLINE’ does not name a type
/Users/charles/pkg/petsc-3.0.0-p12/include/petscvec.h:159: error:
‘PETSC_STATIC_INLINE’ does not name a type
/Users/charles/pkg/petsc-3.0.0-p12/include/petscvec.h:160: error:
‘PETSC_STATIC_INLINE’ does not name a type
/Users/charles/pkg/petsc-3.0.0-p12/include/petscvec.h:164: error:
‘PETSC_STATIC_INLINE’ does not name a type
/Users/charles/pkg/petsc-3.0.0-p12/include/petscvec.h:166: error:
‘PETSC_STATIC_INLINE’ does not name a type
/Users/charles/pkg/petsc-3.0.0-p12/include/petscvec.h:179: error:
‘PETSC_STATIC_INLINE’ does not name a type
/Users/charles/pkg/petsc-3.0.0-p12/include/petscvec.h:181: error:
‘PETSC_STATIC_INLINE’ does not name a type
/Users/charles/pkg/petsc-3.0.0-p12/include/petscvec.h:183: error:
‘PETSC_STATIC_INLINE’ does not name a type
/Users/charles/pkg/petsc-3.0.0-p12/include/petscvec.h:185: error:
‘PETSC_STATIC_INLINE’ does not name a type
/Users/charles/pkg/petsc-3.0.0-p12/include/petscvec.h:187: error:
‘PETSC_STATIC_INLINE’ does not name a type
/Users/charles/pkg/petsc-3.0.0-p12/include/petscvec.h:205: error:
‘PETSC_STATIC_INLINE’ does not name a type
/Users/charles/pkg/petsc-3.0.0-p12/include/petscvec.h:206: error:
‘PETSC_STATIC_INLINE’ does not name a type
/Users/charles/pkg/petsc-3.0.0-p12/include/petscvec.h:208: error:
‘PETSC_STATIC_INLINE’ does not name a type
/Users/charles/pkg/petsc-3.0.0-p12/include/petscvec.h:210: error:
‘PETSC_STATIC_INLINE’ does not name a type
/Users/charles/pkg/petsc-3.0.0-p12/include/petscvec.h:254: error:
‘PETSC_STATIC_INLINE’ does not name a type
/Users/charles/pkg/petsc-3.0.0-p12/include/petscvec.h:259: error:
‘PETSC_STATIC_INLINE’ does not name a type
/Users/charles/pkg/petsc-3.0.0-p12/include/petscvec.h:321: error:
‘PETSC_STATIC_INLINE’ does not name a type
/Users/charles/pkg/petsc-3.0.0-p12/include/petscvec.h:322: error:
‘PETSC_STATIC_INLINE’ does not name a type
/Users/charles/pkg/petsc-3.0.0-p12/include/petscvec.h:323: error:
‘PETSC_STATIC_INLINE’ does not name a type
/Users/charles/pkg/petsc-3.0.0-p12/include/petscvec.h:324: error:
‘PETSC_STATIC_INLINE’ does not name a type
/Users/charles/pkg/petsc-3.0.0-p12/include/petscvec.h:325: error:
‘PETSC_STATIC_INLINE’ does not name a type
/Users/charles/pkg/petsc-3.0.0-p12/include/petscvec.h:357: error:
‘PETSC_STATIC_INLINE’ does not name a type
/Users/charles/pkg/petsc-3.0.0-p12/include/petscvec.h:362: error:
‘PETSC_STATIC_INLINE’ does not name a type
/Users/charles/pkg/petsc-3.0.0-p12/include/petscvec.h:364: error:
‘PETSC_STATIC_INLINE’ does not name a type
/Users/charles/pkg/petsc-3.0.0-p12/include/petscvec.h:398: error:
‘PETSC_STATIC_INLINE’ does not name a type
/Users/charles/pkg/petsc-3.0.0-p12/include/petscvec.h:404: error:
‘PETSC_STATIC_INLINE’ does not name a type
/Users/charles/pkg/petsc-3.0.0-p12/include/petscvec.h:406: error:
‘PETSC_STATIC_INLINE’ does not name a type
/Users/charles/pkg/petsc-3.0.0-p12/include/petscvec.h:408: error:
‘PETSC_STATIC_INLINE’ does not name a type
/Users/charles/pkg/petsc-3.0.0-p12/include/petscvec.h:410: error:
‘PETSC_STATIC_INLINE’ does not name a type
/Users/charles/pkg/petsc-3.0.0-p12/include/petscvec.h:412: error:
‘PETSC_STATIC_INLINE’ does not name a type
/Users/charles/pkg/petsc-3.0.0-p12/include/petscvec.h:413: error:
‘PETSC_STATIC_INLINE’ does not name a type
/Users/charles/pkg/petsc-3.0.0-p12/include/petscvec.h:415: error:
‘PETSC_STATIC_INLINE’ does not name a type
/Users/charles/pkg/petsc-3.0.0-p12/include/petscvec.h:416: error:
‘PETSC_STATIC_INLINE’ does not name a type
/Users/charles/pkg/petsc-3.0.0-p12/include/private/vecimpl.h:29: error:
‘PETSC_STATIC_INLINE’ does not name a type
/Users/charles/pkg/petsc-3.0.0-p12/include/private/vecimpl.h:32: error:
‘PETSC_STATIC_INLINE’ does not name a type
/Users/charles/pkg/petsc-3.0.0-p12/include/private/vecimpl.h:283: error:
‘PETSC_STATIC_INLINE’ does not name a type
/Users/charles/pkg/petsc-3.0.0-p12/include/private/vecimpl.h:304: error:
‘PETSC_STATIC_INLINE’ does not name a type
/Users/charles/pkg/petsc-3.0.0-p12/include/petscvec.h:452: error:
‘PETSC_STATIC_INLINE’ does not name a type
/Users/charles/pkg/petsc-3.0.0-p12/include/petscmat.h:141: error:
‘PETSC_STATIC_INLINE’ does not name a type
/Users/charles/pkg/petsc-3.0.0-p12/include/petscmat.h:142: error:
‘PETSC_STATIC_INLINE’ does not name a type
/Users/charles/pkg/petsc-3.0.0-p12/include/petscmat.h:218: error:
‘PETSC_STATIC_INLINE’ does not name a type
/Users/charles/pkg/petsc-3.0.0-p12/include/petscmat.h:219: error:
‘PETSC_STATIC_INLINE’ does not name a type
/Users/charles/pkg/petsc-3.0.0-p12/include/petscmat.h:220: error:
‘PETSC_STATIC_INLINE’ does not name a type
/Users/charles/pkg/petsc-3.0.0-p12/include/petscmat.h:221: error:
‘PETSC_STATIC_INLINE’ does not name a type
/Users/charles/pkg/petsc-3.0.0-p12/include/petscmat.h:222: error:
‘PETSC_STATIC_INLINE’ does not name a type
/Users/charles/pkg/petsc-3.0.0-p12/include/petscmat.h:223: error:
‘PETSC_STATIC_INLINE’ does not name a type
/Users/charles/pkg/petsc-3.0.0-p12/include/petscmat.h:224: error:
‘PETSC_STATIC_INLINE’ does not name a type
/Users/charles/pkg/petsc-3.0.0-p12/include/petscmat.h:226: error:
‘PETSC_STATIC_INLINE’ does not name a type
/Users/charles/pkg/petsc-3.0.0-p12/include/petscmat.h:227: error:
‘PETSC_STATIC_INLINE’ does not name a type
/Users/charles/pkg/petsc-3.0.0-p12/include/petscmat.h:228: error:
‘PETSC_STATIC_INLINE’ does not name a type
/Users/charles/pkg/petsc-3.0.0-p12/include/petscmat.h:229: error:
‘PETSC_STATIC_INLINE’ does not name a type
/Users/charles/pkg/petsc-3.0.0-p12/include/petscmat.h:230: error:
‘PETSC_STATIC_INLINE’ does not name a type
/Users/charles/pkg/petsc-3.0.0-p12/include/petscmat.h:231: error:
‘PETSC_STATIC_INLINE’ does not name a type
/Users/charles/pkg/petsc-3.0.0-p12/include/petscmat.h:232: error:
‘PETSC_STATIC_INLINE’ does not name a type
/Users/charles/pkg/petsc-3.0.0-p12/include/petscmat.h:233: error:
‘PETSC_STATIC_INLINE’ does not name a type
/Users/charles/pkg/petsc-3.0.0-p12/include/petscmat.h:234: error:
‘PETSC_STATIC_INLINE’ does not name a type
/Users/charles/pkg/petsc-3.0.0-p12/include/petscmat.h:235: error:
‘PETSC_STATIC_INLINE’ does not name a type
/Users/charles/pkg/petsc-3.0.0-p12/include/petscmat.h:236: error:
‘PETSC_STATIC_INLINE’ does not name a type
/Users/charles/pkg/petsc-3.0.0-p12/include/petscmat.h:237: error:
‘PETSC_STATIC_INLINE’ does not name a type
/Users/charles/pkg/petsc-3.0.0-p12/include/petscmat.h:238: error:
‘PETSC_STATIC_INLINE’ does not name a type
/Users/charles/pkg/petsc-3.0.0-p12/include/petscmat.h:239: error:
‘PETSC_STATIC_INLINE’ does not name a type
/Users/charles/pkg/petsc-3.0.0-p12/include/petscmat.h:245: error:
‘PETSC_STATIC_INLINE’ does not name a type
/Users/charles/pkg/petsc-3.0.0-p12/include/petscmat.h:246: error:
‘PETSC_STATIC_INLINE’ does not name a type
/Users/charles/pkg/petsc-3.0.0-p12/include/petscmat.h:247: error:
‘PETSC_STATIC_INLINE’ does not name a type
/Users/charles/pkg/petsc-3.0.0-p12/include/petscmat.h:248: error:
‘PETSC_STATIC_INLINE’ does not name a type
/Users/charles/pkg/petsc-3.0.0-p12/include/petscmat.h:249: error:
‘PETSC_STATIC_INLINE’ does not name a type
/Users/charles/pkg/petsc-3.0.0-p12/include/petscmat.h:250: error:
‘PETSC_STATIC_INLINE’ does not name a type
/Users/charles/pkg/petsc-3.0.0-p12/include/petscmat.h:251: error:
‘PETSC_STATIC_INLINE’ does not name a type
/Users/charles/pkg/petsc-3.0.0-p12/include/petscmat.h:253: error:
‘PETSC_STATIC_INLINE’ does not name a type
/Users/charles/pkg/petsc-3.0.0-p12/include/petscmat.h:254: error:
‘PETSC_STATIC_INLINE’ does not name a type
/Users/charles/pkg/petsc-3.0.0-p12/include/petscmat.h:255: error:
‘PETSC_STATIC_INLINE’ does not name a type
/Users/charles/pkg/petsc-3.0.0-p12/include/petscmat.h:256: error:
‘PETSC_STATIC_INLINE’ does not name a type
/Users/charles/pkg/petsc-3.0.0-p12/include/petscmat.h:257: error:
‘PETSC_STATIC_INLINE’ does not name a type
/Users/charles/pkg/petsc-3.0.0-p12/include/petscmat.h:258: error:
‘PETSC_STATIC_INLINE’ does not name a type
/Users/charles/pkg/petsc-3.0.0-p12/include/petscmat.h:259: error:
‘PETSC_STATIC_INLINE’ does not name a type
/Users/charles/pkg/petsc-3.0.0-p12/include/petscmat.h:260: error:
‘PETSC_STATIC_INLINE’ does not name a type
/Users/charles/pkg/petsc-3.0.0-p12/include/petscmat.h:261: error:
‘PETSC_STATIC_INLINE’ does not name a type
/Users/charles/pkg/petsc-3.0.0-p12/include/petscmat.h:262: error:
‘PETSC_STATIC_INLINE’ does not name a type
/Users/charles/pkg/petsc-3.0.0-p12/include/petscmat.h:263: error:
‘PETSC_STATIC_INLINE’ does not name a type
/Users/charles/pkg/petsc-3.0.0-p12/include/petscmat.h:264: error:
‘PETSC_STATIC_INLINE’ does not name a type
/Users/charles/pkg/petsc-3.0.0-p12/include/petscmat.h:265: error:
‘PETSC_STATIC_INLINE’ does not name a type
/Users/charles/pkg/petsc-3.0.0-p12/include/petscmat.h:266: error:
‘PETSC_STATIC_INLINE’ does not name a type
/Users/charles/pkg/petsc-3.0.0-p12/include/petscmat.h:269: error:
‘PETSC_STATIC_INLINE’ does not name a type
/Users/charles/pkg/petsc-3.0.0-p12/include/petscmat.h:270: error:
‘PETSC_STATIC_INLINE’ does not name a type
/Users/charles/pkg/petsc-3.0.0-p12/include/petscmat.h:271: error:
‘PETSC_STATIC_INLINE’ does not name a type
/Users/charles/pkg/petsc-3.0.0-p12/include/petscmat.h:272: error:
‘PETSC_STATIC_INLINE’ does not name a type
/Users/charles/pkg/petsc-3.0.0-p12/include/petscmat.h:273: error:
‘PETSC_STATIC_INLINE’ does not name a type
/Users/charles/pkg/petsc-3.0.0-p12/include/petscmat.h:274: error:
‘PETSC_STATIC_INLINE’ does not name a type
/Users/charles/pkg/petsc-3.0.0-p12/include/petscmat.h:275: error:
‘PETSC_STATIC_INLINE’ does not name a type
/Users/charles/pkg/petsc-3.0.0-p12/include/petscmat.h:277: error:
‘PETSC_STATIC_INLINE’ does not name a type
/Users/charles/pkg/petsc-3.0.0-p12/include/petscmat.h:278: error:
‘PETSC_STATIC_INLINE’ does not name a type
/Users/charles/pkg/petsc-3.0.0-p12/include/petscmat.h:279: error:
‘PETSC_STATIC_INLINE’ does not name a type
/Users/charles/pkg/petsc-3.0.0-p12/include/petscmat.h:280: error:
‘PETSC_STATIC_INLINE’ does not name a type
/Users/charles/pkg/petsc-3.0.0-p12/include/petscmat.h:281: error:
‘PETSC_STATIC_INLINE’ does not name a type
/Users/charles/pkg/petsc-3.0.0-p12/include/petscmat.h:282: error:
‘PETSC_STATIC_INLINE’ does not name a type
/Users/charles/pkg/petsc-3.0.0-p12/include/petscmat.h:283: error:
‘PETSC_STATIC_INLINE’ does not name a type
/Users/charles/pkg/petsc-3.0.0-p12/include/petscmat.h:284: error:
‘PETSC_STATIC_INLINE’ does not name a type
/Users/charles/pkg/petsc-3.0.0-p12/include/petscmat.h:285: error:
‘PETSC_STATIC_INLINE’ does not name a type
/Users/charles/pkg/petsc-3.0.0-p12/include/petscmat.h:286: error:
‘PETSC_STATIC_INLINE’ does not name a type
/Users/charles/pkg/petsc-3.0.0-p12/include/petscmat.h:287: error:
‘PETSC_STATIC_INLINE’ does not name a type
/Users/charles/pkg/petsc-3.0.0-p12/include/petscmat.h:288: error:
‘PETSC_STATIC_INLINE’ does not name a type
/Users/charles/pkg/petsc-3.0.0-p12/include/petscmat.h:289: error:
‘PETSC_STATIC_INLINE’ does not name a type
/Users/charles/pkg/petsc-3.0.0-p12/include/petscmat.h:290: error:
‘PETSC_STATIC_INLINE’ does not name a type
/Users/charles/pkg/petsc-3.0.0-p12/include/petscmat.h:292: error:
‘PETSC_STATIC_INLINE’ does not name a type
/Users/charles/pkg/petsc-3.0.0-p12/include/petscmat.h:293: error:
‘PETSC_STATIC_INLINE’ does not name a type
/Users/charles/pkg/petsc-3.0.0-p12/include/petscmat.h:296: error:
‘PETSC_STATIC_INLINE’ does not name a type
/Users/charles/pkg/petsc-3.0.0-p12/include/petscmat.h:395: error: expected
constructor, destructor, or type conversion before ‘const’
/Users/charles/pkg/petsc-3.0.0-p12/include/petscmat.h:406: error:
‘PETSC_STATIC_INLINE’ does not name a type
/Users/charles/pkg/petsc-3.0.0-p12/include/petscmat.h:409: error:
‘PETSC_STATIC_INLINE’ does not name a type
/Users/charles/pkg/petsc-3.0.0-p12/include/petscmat.h:415: error:
‘PETSC_STATIC_INLINE’ does not name a type
/Users/charles/pkg/petsc-3.0.0-p12/include/petscmat.h:418: error:
‘PETSC_STATIC_INLINE’ does not name a type
/Users/charles/pkg/petsc-3.0.0-p12/include/petscmat.h:419: error:
‘PETSC_STATIC_INLINE’ does not name a type
/Users/charles/pkg/petsc-3.0.0-p12/include/petscmat.h:422: error:
‘PETSC_STATIC_INLINE’ does not name a type
/Users/charles/pkg/petsc-3.0.0-p12/include/petscmat.h:440: error:
‘PETSC_STATIC_INLINE’ does not name a type
/Users/charles/pkg/petsc-3.0.0-p12/include/petscmat.h:442: error:
‘PETSC_STATIC_INLINE’ does not name a type
/Users/charles/pkg/petsc-3.0.0-p12/include/petscmat.h:443: error:
‘PETSC_STATIC_INLINE’ does not name a type
/Users/charles/pkg/petsc-3.0.0-p12/include/petscmat.h:449: error:
‘PETSC_STATIC_INLINE’ does not name a type
/Users/charles/pkg/petsc-3.0.0-p12/include/petscmat.h:450: error:
‘PETSC_STATIC_INLINE’ does not name a type
/Users/charles/pkg/petsc-3.0.0-p12/include/petscmat.h:452: error:
‘PETSC_STATIC_INLINE’ does not name a type
/Users/charles/pkg/petsc-3.0.0-p12/include/petscmat.h:454: error:
‘PETSC_STATIC_INLINE’ does not name a type
/Users/charles/pkg/petsc-3.0.0-p12/include/petscmat.h:459: error:
‘PETSC_STATIC_INLINE’ does not name a type
/Users/charles/pkg/petsc-3.0.0-p12/include/petscmat.h:507: error:
‘PETSC_STATIC_INLINE’ does not name a type
/Users/charles/pkg/petsc-3.0.0-p12/include/petscmat.h:509: error:
‘PETSC_STATIC_INLINE’ does not name a type
/Users/charles/pkg/petsc-3.0.0-p12/include/petscmat.h:514: error:
‘PETSC_STATIC_INLINE’ does not name a type
/Users/charles/pkg/petsc-3.0.0-p12/include/petscmat.h:521: error:
‘PETSC_STATIC_INLINE’ does not name a type
/Users/charles/pkg/petsc-3.0.0-p12/include/petscmat.h:595: error:
‘PETSC_STATIC_INLINE’ does not name a type
/Users/charles/pkg/petsc-3.0.0-p12/include/petscmat.h:620: error:
‘PETSC_STATIC_INLINE’ does not name a type
/Users/charles/pkg/petsc-3.0.0-p12/include/petscmat.h:622: error:
‘PETSC_STATIC_INLINE’ does not name a type
/Users/charles/pkg/petsc-3.0.0-p12/include/petscmat.h:624: error:
‘PETSC_STATIC_INLINE’ does not name a type
/Users/charles/pkg/petsc-3.0.0-p12/include/petscmat.h:945: error: expected
constructor, destructor, or type conversion before ‘void’
/Users/charles/pkg/petsc-3.0.0-p12/include/petscmat.h:959: error:
‘PETSC_STATIC_INLINE’ does not name a type
/Users/charles/pkg/petsc-3.0.0-p12/include/petscmat.h:961: error:
‘PETSC_STATIC_INLINE’ does not name a type
/Users/charles/pkg/petsc-3.0.0-p12/include/petscmat.h:963: error:
‘PETSC_STATIC_INLINE’ does not name a type
/Users/charles/pkg/petsc-3.0.0-p12/include/petscmat.h:966: error:
‘PETSC_STATIC_INLINE’ does not name a type
/Users/charles/pkg/petsc-3.0.0-p12/include/petscmat.h:1217: error:
‘ISColoringValue’ has not been declared
Laplace.cc: In function ‘int main(int, char**)’:
Laplace.cc:207: warning: unused variable ‘gmres’
make: [Laplace] Error 1 (ignored)
/bin/rm -f BoundaryConditionFactory.o BoundaryCondition.o Field.o FileIO.o
JacobiSolver.o Timer.o TimerFactory.o GmresSolver.o

On Wed, Mar 24, 2010 at 04:30, Matthew Knepley <knepley at gmail.com> wrote:

> On Wed, Mar 24, 2010 at 3:02 AM, charles reid <charlesreid1 at gmail.com>wrote:
>
>> Hi Satish -
>>
>> Thanks for your response. I think this helped me to realize that I was
>> making things harder than they should be.
>>
>> I've managed to get this working, and here are a few notes:
>>
>> 1. It was not clear to me why the Petsc-provided makefiles worked, because
>> the compilation of the C code into a ".o" file is buried deep inside several
>> makefiles (e.g. $PETSC_DIR/conf/rules) included in the original example
>> makefile.  So, I was trying to compile each of my ".cc" files into ".o"
>> files manually, then link.  In fact, all I had to do was let Petsc take care
>> of compiling each ".cc" file into a ".o" file, and I only had to give the
>> line to link the libraries to the driver.
>>
>> 2. The only major change I had to make to the example makefiles to get the
>> driver to link and compile was to add ${PETSC_CC_INCLUDES} after ${CLINKER},
>> like this:
>>
>> Laplace: Laplace.cc $(OBJ_FILES)
>>     -${CLINKER} ${PETSC_CC_INCLUDES} Laplace.cc -o bin.x $(OBJ_FILES)
>> ${PETSC_KSP_LIB}
>>     ${RM} $(OBJ_FILES)
>>
>
> Alternatively
>
> Laplace: Laplace.o $(OBJ_FILES)
>     -${CLINKER} -o bin.x Laplace.o $(OBJ_FILES) ${PETSC_KSP_LIB}
>     ${RM} $(OBJ_FILES)
>
>    Matt
>
>
>> Otherwise there were some error messages related to header files.
>>
>>
>> Thanks again for your help.
>>
>> Charles
>>
>> --
> What most experimenters take for granted before they begin their
> experiments is infinitely more interesting than any results to which their
> experiments lead.
> -- Norbert Wiener
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20100324/f8451cd2/attachment-0001.htm>


More information about the petsc-users mailing list