Closed VolkerEnderlein closed 8 years ago
Original comment by Claude Safon (Bitbucket: claude_safon, ).
Same on Ubuntu 15.10: g++ -DHAVE_CONFIG_H -I../../include -I../../../Coin3D-coin-f5e2bb476519/include -I../../src -I../../../Coin3D-coin-f5e2bb476519/src -D_REENTRANT -DCOIN_DEBUG=1 -DCOIN_INTERNAL -g -O2 -W -Wall -Wno-unused -Wno-multichar -Woverloaded-virtual -fno-builtin -finline-functions -Wreturn-type -Wchar-subscripts -Wparentheses -MT SbVec2ub.lo -MD -MP -MF .deps/SbVec2ub.Tpo -c ../../../Coin3D-coin-f5e2bb476519/src/base/SbVec2ub.cpp -fPIC -DPIC -o .libs/SbVec2ub.o In file included from ../../../Coin3D-coin-f5e2bb476519/src/base/SbVec2ub.cpp:36:0: ../../../Coin3D-coin-f5e2bb476519/include/Inventor/SbVec2us.h: In member function ‘SbVec2us& SbVec2us::operator=(int)’: ../../../Coin3D-coin-f5e2bb476519/include/Inventor/SbVec2us.h:70:45: error: expected primary-expression before ‘unsigned’ SbVec2us & operator = (int d) { vec[0] = unsigned short(vec[0] d); vec[1] = unsigned short(vec[1] d); return this; } ^ ../../../Coin3D-coin-f5e2bb476519/include/Inventor/SbVec2us.h:70:82: error: expected primary-expression before ‘unsigned’ SbVec2us & operator = (int d) { vec[0] = unsigned short(vec[0] d); vec[1] = unsigned short(vec[1] d); return this; } ^ ../../../Coin3D-coin-f5e2bb476519/include/Inventor/SbVec2us.h: In member function ‘SbVec2us& SbVec2us::operator/=(int)’: ../../../Coin3D-coin-f5e2bb476519/include/Inventor/SbVec2us.h:72:91: error: expected primary-expression before ‘unsigned’ SbVec2us & operator /= (int d) { SbDividerChk("SbVec2us::operator/=(int)", d); vec[0] = unsigned short(vec[0] / d); vec[1] = unsigned short(vec[1] / d); return this; } ^ In file included from ../../../Coin3D-coin-f5e2bb476519/src/base/SbVec2ub.cpp:36:0: ../../../Coin3D-coin-f5e2bb476519/include/Inventor/SbVec2us.h:72:128: error: expected primary-expression before ‘unsigned’ SbVec2us & operator /= (int d) { SbDividerChk("SbVec2us::operator/=(int)", d); vec[0] = unsigned short(vec[0] / d); vec[1] = unsigned short(vec[1] / d); return *this; } ^ Makefile:1004: recipe for target 'SbVec2ub.lo' failed
Original comment by Roy Walmsley (Bitbucket: walroy, GitHub: walroy).
When I compile the file SbVec2ub on my WIndows system with Visual Studio 2008 it compiles without error. I don't have Mac or Linux systems I can reproduce on.
I looked at the first couple of errors in Daniel's error log and it looks like it is complaining about the cast. Does it not like 'short' after 'unsigned', or does in not like 'unsigned'?
Would it help, for example, to put the 'unsigned short' in brackets? It still compiles on my system. And your error messages indicate an expectation of a '('. Please can you try it and let me know how you get on?
Roy
Original comment by Ryan Rios (Bitbucket: rrios_eq, ).
I also had issues compiling in OS X earlier this week, but I was able to succeed by enclosing unsigned short
in parentheses, for example unsigned short(vec[0] * d)
-> (unsigned short)(vec[0] * d)
. So, I modified these three files:
include/Inventor/SbVec2us.h
include/Inventor/SbVec3us.h
include/Inventor/SbVec4us.h
Now if I could only get SoXt to compile too...
Original comment by Daniel Rugerio (Bitbucket: jflash, GitHub: jflash).
Hi.
Sorry for taking too long to answer, and thank you very much for your response.
I can confirm that commit solved the problem. However, I can't say if it was for LLVM or GCC, as I have both installed and don't know which one was configured.
Original comment by Ryan Rios (Bitbucket: rrios_eq, ).
In my case it was Coin was configured for LLVM.
Original report by Daniel Rugerio (Bitbucket: jflash, GitHub: jflash).
The configure script executes without problems, but when I issue the make command, the compiler gives the following errors: