Mandoline
Mandoline copied to clipboard
Compile failed
On Ubuntu 16.04:
$ ./configure
...
$ make
...
libtool: compile: g++ -DHAVE_CONFIG_H -I. -O2 -MT BGLMesh3d.lo -MD -MP -MF .deps/BGLMesh3d.Tpo -c BGLMesh3d.cc -fPIC -DPIC -o .libs/BGLMesh3d.o
BGLMesh3d.cc: In member function 'int BGL::Mesh3d::loadFromSTLFile(const char*)':
BGLMesh3d.cc:224:35: error: 'fopen' was not declared in this scope
FILE *f = fopen(fileName, "rb");
^
BGLMesh3d.cc:226:17: error: 'stderr' was not declared in this scope
fprintf(stderr, "STL read failed to open\n");
^
BGLMesh3d.cc:226:52: error: 'fprintf' was not declared in this scope
fprintf(stderr, "STL read failed to open\n");
^
BGLMesh3d.cc:230:27: error: 'fread' was not declared in this scope
if (fread(buf, 1, 5, f) < 5) {
^
BGLMesh3d.cc:231:17: error: 'stderr' was not declared in this scope
fprintf(stderr, "STL read failed read\n");
^
BGLMesh3d.cc:231:49: error: 'fprintf' was not declared in this scope
fprintf(stderr, "STL read failed read\n");
^
BGLMesh3d.cc:235:50: error: 'strncasecmp' was not declared in this scope
if (!strncasecmp((const char*)buf, "solid", 5)) {
^
BGLMesh3d.cc:241:32: error: 'fread' was not declared in this scope
if (fread(buf, 1, 75, f) < 75) {
^
BGLMesh3d.cc:242:21: error: 'stderr' was not declared in this scope
fprintf(stderr, "STL read failed header read\n");
^
BGLMesh3d.cc:242:60: error: 'fprintf' was not declared in this scope
fprintf(stderr, "STL read failed header read\n");
^
BGLMesh3d.cc:246:41: error: 'fread' was not declared in this scope
if (fread(intdata.bytes, 1, 4, f) < 4) {
^
BGLMesh3d.cc:247:21: error: 'stderr' was not declared in this scope
fprintf(stderr, "STL read failed face count read\n");
^
BGLMesh3d.cc:247:64: error: 'fprintf' was not declared in this scope
fprintf(stderr, "STL read failed face count read\n");
^
BGLMesh3d.cc:252:23: error: 'feof' was not declared in this scope
while (!feof(f) && tricount-->0) {
^
BGLMesh3d.cc:253:51: error: 'fread' was not declared in this scope
if (fread(tridata.bytes, 1, 3*4*4+2, f) < 3*4*4+2) {
^
BGLMesh3d.cc:273:17: error: 'fclose' was not declared in this scope
fclose(f);
^
BGLMesh3d.cc:277:41: error: 'fgets' was not declared in this scope
fgets((char*)buf, sizeof(buf), f);
^
BGLMesh3d.cc:280:23: error: 'feof' was not declared in this scope
while (!feof(f)) {
^
BGLMesh3d.cc:281:34: error: 'fscanf' was not declared in this scope
fscanf(f, "%80s", buf);
^
BGLMesh3d.cc:282:51: error: 'strcasecmp' was not declared in this scope
if (!strcasecmp((char*)buf, "endsolid")) {
^
BGLMesh3d.cc:305:17: error: 'fclose' was not declared in this scope
fclose(f);
^
BGLMesh3d.cc: In member function 'int BGL::Mesh3d::loadFromOBJFile(const char*)':
BGLMesh3d.cc:321:35: error: 'fopen' was not declared in this scope
FILE *f = fopen(fileName, "rb");
^
BGLMesh3d.cc:323:17: error: 'stderr' was not declared in this scope
fprintf(stderr, "OBJ file failed to open\n");
^
BGLMesh3d.cc:323:52: error: 'fprintf' was not declared in this scope
fprintf(stderr, "OBJ file failed to open\n");
^
BGLMesh3d.cc:330:19: error: 'feof' was not declared in this scope
while (!feof(f)) {
^
BGLMesh3d.cc:331:32: error: 'fscanf' was not declared in this scope
if (fscanf(f, "%s", buf) < 0) {
^
BGLMesh3d.cc:334:39: error: 'strcasecmp' was not declared in this scope
if (!strcasecmp((char*)buf,"v")) {
^
BGLMesh3d.cc:335:49: error: 'fscanf' was not declared in this scope
if (fscanf(f, "%f %f %f", &x, &y, &z) < 0) {
^
BGLMesh3d.cc:340:39: error: 'strcasecmp' was not declared in this scope
if (!strcasecmp((char*)buf,"f")) {
^
BGLMesh3d.cc:341:36: error: 'fscanf' was not declared in this scope
if (fscanf(f, "%s", buf) < 0) {
^
BGLMesh3d.cc:344:26: error: 'atoi' was not declared in this scope
v1 = atoi(buf);
^
BGLMesh3d.cc:346:36: error: 'fscanf' was not declared in this scope
if (fscanf(f, "%s", buf) < 0) {
^
BGLMesh3d.cc:351:36: error: 'fscanf' was not declared in this scope
if (fscanf(f, "%s", buf) < 0) {
^
BGLMesh3d.cc:364:13: error: 'fclose' was not declared in this scope
fclose(f);
^
Makefile:434: recipe for target 'BGLMesh3d.lo' failed
make[4]: *** [BGLMesh3d.lo] Error 1
make[4]: Leaving directory '/home/kjcole/github/Mandoline/src/BGL'
Makefile:477: recipe for target 'all-recursive' failed
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory '/home/kjcole/github/Mandoline/src/BGL'
Makefile:308: recipe for target 'all' failed
make[2]: *** [all] Error 2
make[2]: Leaving directory '/home/kjcole/github/Mandoline/src/BGL'
Makefile:454: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/kjcole/github/Mandoline/src'
Makefile:290: recipe for target 'all' failed
make: *** [all] Error 2
$