Warning and error messages during LPMT compilation


#1

Hi !
I’m trying to resolve problems about LPMT installation, it’s hard… I read forums etc… but anything.

There is no README or INSTALL file to explain us the process.

I use ubuntu 16.04 and OF V0.9
My graphic card is a NVIDIA GEFORCE GTX 660M

An exemple from terminal message after compilation:
"/home/zan/Téléchargements/of_v0.9.8_linux64_release/apps/myApps/lpmt/src/testApp.cpp: In member function ‘virtual void testApp::keyPressed(int)’:
/home/zan/Téléchargements/of_v0.9.8_linux64_release/apps/myApps/lpmt/src/testApp.cpp:1052:59: error: cannot convert ‘ofPixels {aka ofPixels_}’ to ‘unsigned char*’ in initialization
unsigned char * pixels = cameras[0].getPixels();
^
In file included from …/…/…/libs/openFrameworks/ofMain.h:64:0,
from /home/zan/Téléchargements/of_v0.9.8_linux64_release/apps/myApps/lpmt/src/testApp.h:15,
from /home/zan/Téléchargements/of_v0.9.8_linux64_release/apps/myApps/lpmt/src/testApp.cpp:1:
…/…/…/libs/openFrameworks/graphics/ofImage.h:593:9: error: ‘int ofImage_::width’ is protected
int width; ///< \brief Image width in pixels.
^
/home/zan/Téléchargements/of_v0.9.8_linux64_release/apps/myApps/lpmt/src/testApp.cpp:1065:42: error: within this context
snapshotTexture.allocate(img.width,img.height, GL_RGB);
^
In file included from …/…/…/libs/openFrameworks/ofMain.h:64:0,
from /home/zan/Téléchargements/of_v0.9.8_linux64_release/apps/myApps/lpmt/src/testApp.h:15,
from /home/zan/Téléchargements/of_v0.9.8_linux64_release/apps/myApps/lpmt/src/testApp.cpp:1:
…/…/…/libs/openFrameworks/graphics/ofImage.h:594:9: error: ‘int ofImage_::height’ is protected
int height; ///< \brief Image Height in pixels.
^
/home/zan/Téléchargements/of_v0.9.8_linux64_release/apps/myApps/lpmt/src/testApp.cpp:1065:52: error: within this context
snapshotTexture.allocate(img.width,img.height, GL_RGB);
^
/home/zan/Téléchargements/of_v0.9.8_linux64_release/apps/myApps/lpmt/src/testApp.cpp:1066:52: error: cannot convert ‘ofPixels_’ to ‘unsigned char*’ in initialization
unsigned char * pixels = img.getPixels();
^
In file included from …/…/…/libs/openFrameworks/ofMain.h:64:0,
from /home/zan/Téléchargements/of_v0.9.8_linux64_release/apps/myApps/lpmt/src/testApp.h:15,
from /home/zan/Téléchargements/of_v0.9.8_linux64_release/apps/myApps/lpmt/src/testApp.cpp:1:
…/…/…/libs/openFrameworks/graphics/ofImage.h:593:9: error: ‘int ofImage_::width’ is protected
int width; ///< \brief Image width in pixels.
^
/home/zan/Téléchargements/of_v0.9.8_linux64_release/apps/myApps/lpmt/src/testApp.cpp:1067:50: error: within this context
snapshotTexture.loadData(pixels, img.width,img.height, GL_RGB);
^
In file included from …/…/…/libs/openFrameworks/ofMain.h:64:0,
from /home/zan/Téléchargements/of_v0.9.8_linux64_release/apps/myApps/lpmt/src/testApp.h:15,
from /home/zan/Téléchargements/of_v0.9.8_linux64_release/apps/myApps/lpmt/src/testApp.cpp:1:
…/…/…/libs/openFrameworks/graphics/ofImage.h:594:9: error: ‘int ofImage_::height’ is protected
int height; ///< \brief Image Height in pixels.
^
/home/zan/Téléchargements/of_v0.9.8_linux64_release/apps/myApps/lpmt/src/testApp.cpp:1067:60: error: within this context
snapshotTexture.loadData(pixels, img.width,img.height, GL_RGB);
^
/home/zan/Téléchargements/of_v0.9.8_linux64_release/apps/myApps/lpmt/src/testApp.cpp: In member function ‘virtual void testApp::mouseMoved(int, int)’:
/home/zan/Téléchargements/of_v0.9.8_linux64_release/apps/myApps/lpmt/src/testApp.cpp:1573:26: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(int i = 0; i < quads[activeQuad].maskPoints.size(); i++)
^
/home/zan/Téléchargements/of_v0.9.8_linux64_release/apps/myApps/lpmt/src/testApp.cpp: In member function ‘void testApp::quadBezierSpherize(int)’:
/home/zan/Téléchargements/of_v0.9.8_linux64_release/apps/myApps/lpmt/src/testApp.cpp:1896:19: warning: narrowing conversion of ‘(((double)((h * 0.0f) / w)) + (((((double)((w / h) - 1.0e+0f)) * 5.0e-1) * ((double)h)) / ((double)w)))’ from ‘double’ to ‘float’ inside { } [-Wnarrowing]
{ {0h/w+(0.5(w/h-1))h/w, 0, 0},{0.5kh/w+(0.5(w/h-1))h/w, -0.5
^
/home/zan/Téléchargements/of_v0.9.8_linux64_release/apps/myApps/lpmt/src/testApp.cpp:1896:55: warning: narrowing conversion of ‘((((((double)k) * 5.0e-1) * ((double)h)) / ((double)w)) + (((((double)((w / h) - 1.0e+0f)) * 5.0e-1) * ((double)h)) / ((double)w)))’ from ‘double’ to ‘float’ inside { } [-Wnarrowing]
{ {0h/w+(0.5(w/h-1))h/w, 0, 0},{0.5kh/w+(0.5(w/h-1))h/w, -0.5
^
/home/zan/Téléchargements/of_v0.9.8_linux64_release/apps/myApps/lpmt/src/testApp.cpp:1896:79: warning: narrowing conversion of ‘(((double)k) * -5.0e-1)’ from ‘double’ to ‘float’ inside { } [-Wnarrowing]
{0h/w+(0.5(w/h-1))h/w, 0, 0},{0.5kh/w+(0.5(w/h-1))h/w, -0.5k, 0},
^
/home/zan/Téléchargements/of_v0.9.8_linux64_release/apps/myApps/lpmt/src/testApp.cpp:1896:112: warning: narrowing conversion of ‘(((((double)h) / ((double)w)) - (((((double)k) * 5.0e-1) * ((double)h)) / ((double)w))) + (((((double)((w / h) - 1.0e+0f)) * 5.0e-1) * ((double)h)) / ((double)w)))’ from ‘double’ to ‘float’ inside { } [-Wnarrowing]
,{0.5kh/w+(0.5*(w/h-1))h/w, -0.5k, 0}, {(1.0h/w)-(0.5kh/w)+(0.5(w/h-
^
/home/zan/Téléchargements/of_v0.9.8_linux64_release/apps/myApps/lpmt/src/testApp.cpp:1896:136: warning: narrowing conversion of ‘(((double)k) * -5.0e-1)’ from ‘double’ to ‘float’ inside { } [-Wnarrowing]
)h/w, -0.5k, 0}, {(1.0h/w)-(0.5kh/w)+(0.5(w/h-1))h/w, -0.5k, 0},
^
/home/zan/Téléchargements/of_v0.9.8_linux64_release/apps/myApps/lpmt/src/testApp.cpp:1896:155: warning: narrowing conversion of ‘((((double)h) / ((double)w)) + (((((double)((w / h) - 1.0e+0f)) * 5.0e-1) * ((double)h)) / ((double)w)))’ from ‘double’ to ‘float’ inside { } [-Wnarrowing]
{(1.0h/w)-(0.5kh/w)+(0.5(w/h-1))h/w, -0.5k, 0}, {1.0h/w+(0.5(w/h-
^
/home/zan/Téléchargements/of_v0.9.8_linux64_release/apps/myApps/lpmt/src/testApp.cpp:1897:31: warning: narrowing conversion of ‘((((double)((h * 0.0f) / w)) - (((((double)k) * 5.0e-1) * ((double)h)) / ((double)w))) + (((((double)((w / h) - 1.0e+0f)) * 5.0e-1) * ((double)h)) / ((double)w)))’ from ‘double’ to ‘float’ inside { } [-Wnarrowing]
{ {0h/w-(0.5kh/w)+(0.5(w/h-1))h/w, 0.5k, 0}, {0h/w+(0.5
^
/home/zan/Téléchargements/of_v0.9.8_linux64_release/apps/myApps/lpmt/src/testApp.cpp:1897:54: warning: narrowing conversion of ‘(((double)k) * 5.0e-1)’ from ‘double’ to ‘float’ inside { } [-Wnarrowing]
{ {0
h/w-(0.5kh/w)+(0.5*(w/h-1))h/w, 0.5k, 0}, {0h/w+(0.5
^
/home/zan/Téléchargements/of_v0.9.8_linux64_release/apps/myApps/lpmt/src/testApp.cpp:1897:75: warning: narrowing conversion of ‘(((double)((h * 0.0f) / w)) + (((((double)((w / h) - 1.0e+0f)) * 5.0e-1) * ((double)h)) / ((double)w)))’ from ‘double’ to ‘float’ inside { } [-Wnarrowing]
{ {0
h/w-(0.5kh/w)+(0.5*(w/h-1))h/w, 0.5k, 0}, {0h/w+(0.5(w/h-
^
/home/zan/Téléchargements/of_v0.9.8_linux64_release/apps/myApps/lpmt/src/testApp.cpp:1897:111: warning: narrowing conversion of ‘((((double)h) / ((double)w)) + (((((double)((w / h) - 1.0e+0f)) * 5.0e-1) * ((double)h)) / ((double)w)))’ from ‘double’ to ‘float’ inside { } [-Wnarrowing]
))h/w, 0.5k, 0}, {0h/w+(0.5(w/h-1))h/w, 0, 0}, {1.0h/w+(0.5*(w/h-
^
/home/zan/Téléchargements/of_v0.9.8_linux64_release/apps/myApps/lpmt/src/testApp.cpp:1897:159: warning: narrowing conversion of ‘(((((double)h) / ((double)w)) + (((((double)k) * 5.0e-1) * ((double)h)) / ((double)w))) + (((((double)((w / h) - 1.0e+0f)) * 5.0e-1) * ((double)h)) / ((double)w)))’ from ‘double’ to ‘float’ inside { } [-Wnarrowing]
/w, 0, 0}, {1.0h/w+(0.5(w/h-1))h/w, 0, 0}, {1.0h/w+(0.5kh/w)+(0.5*(w/h-
^
/home/zan/Téléchargements/of_v0.9.8_linux64_release/apps/myApps/lpmt/src/testApp.cpp:1897:182: warning: narrowing conversion of ‘(((double)k) * 5.0e-1)’ from ‘double’ to ‘float’ inside { } [-Wnarrowing]
0.5*(w/h-1))h/w, 0, 0}, {1.0h/w+(0.5kh/w)+(0.5*(w/h-1))h/w, 0.5k, 0} },
^
/home/zan/Téléchargements/of_v0.9.8_linux64_release/apps/myApps/lpmt/src/testApp.cpp:1898:31: warning: narrowing conversion of ‘((((double)((h * 0.0f) / w)) - (((((double)k) * 5.0e-1) * ((double)h)) / ((double)w))) + (((((double)((w / h) - 1.0e+0f)) * 5.0e-1) * ((double)h)) / ((double)w)))’ from ‘double’ to ‘float’ inside { } [-Wnarrowing]
{ {0h/w-(0.5kh/w)+(0.5(w/h-1))h/w, 1.0-0.5k, 0}, {0h/w+
^
/home/zan/Téléchargements/of_v0.9.8_linux64_release/apps/myApps/lpmt/src/testApp.cpp:1898:54: warning: narrowing conversion of ‘(1.0e+0 - (((double)k) * 5.0e-1))’ from ‘double’ to ‘float’ inside { } [-Wnarrowing]
{ {0
h/w-(0.5kh/w)+(0.5*(w/h-1))h/w, 1.0-0.5k, 0}, {0h/w+
^
/home/zan/Téléchargements/of_v0.9.8_linux64_release/apps/myApps/lpmt/src/testApp.cpp:1898:79: warning: narrowing conversion of ‘(((double)((h * 0.0f) / w)) + (((((double)((w / h) - 1.0e+0f)) * 5.0e-1) * ((double)h)) / ((double)w)))’ from ‘double’ to ‘float’ inside { } [-Wnarrowing]
{0
h/w-(0.5kh/w)+(0.5*(w/h-1))h/w, 1.0-0.5k, 0}, {0h/w+(0.5(w/h-
^
/home/zan/Téléchargements/of_v0.9.8_linux64_release/apps/myApps/lpmt/src/testApp.cpp:1898:117: warning: narrowing conversion of ‘((((double)h) / ((double)w)) + (((((double)((w / h) - 1.0e+0f)) * 5.0e-1) * ((double)h)) / ((double)w)))’ from ‘double’ to ‘float’ inside { } [-Wnarrowing]
, 1.0-0.5k, 0}, {0h/w+(0.5*(w/h-1))h/w, 1.0, 0}, {1.0h/w+(0.5*(w/h-
^
/home/zan/Téléchargements/of_v0.9.8_linux64_release/apps/myApps/lpmt/src/testApp.cpp:1898:167: warning: narrowing conversion of ‘(((((double)h) / ((double)w)) + (((((double)k) * 5.0e-1) * ((double)h)) / ((double)w))) + (((((double)((w / h) - 1.0e+0f)) * 5.0e-1) * ((double)h)) / ((double)w)))’ from ‘double’ to ‘float’ inside { } [-Wnarrowing]
1.0, 0}, {1.0h/w+(0.5(w/h-1))h/w, 1.0, 0}, {1.0h/w+(0.5kh/w)+(0.5*(w/h-
^
/home/zan/Téléchargements/of_v0.9.8_linux64_release/apps/myApps/lpmt/src/testApp.cpp:1898:190: warning: narrowing conversion of ‘(1.0e+0 - (((double)k) * 5.0e-1))’ from ‘double’ to ‘float’ inside { } [-Wnarrowing]
(w/h-1))h/w, 1.0, 0}, {1.0h/w+(0.5kh/w)+(0.5(w/h-1))h/w, 1.0-0.5k, 0}
^
/home/zan/Téléchargements/of_v0.9.8_linux64_release/apps/myApps/lpmt/src/testApp.cpp:1899:19: warning: narrowing conversion of ‘(((double)((h * 0.0f) / w)) + (((((double)((w / h) - 1.0e+0f)) * 5.0e-1) * ((double)h)) / ((double)w)))’ from ‘double’ to ‘float’ inside { } [-Wnarrowing]
{ {0h/w+(0.5(w/h-1))h/w, 1.0, 0}, {0.5kh/w+(0.5(w/h-1))h/w, 1.
^
/home/zan/Téléchargements/of_v0.9.8_linux64_release/apps/myApps/lpmt/src/testApp.cpp:1899:58: warning: narrowing conversion of ‘((((((double)k) * 5.0e-1) * ((double)h)) / ((double)w)) + (((((double)((w / h) - 1.0e+0f)) * 5.0e-1) * ((double)h)) / ((double)w)))’ from ‘double’ to ‘float’ inside { } [-Wnarrowing]
{ {0
h/w+(0.5*(w/h-1))h/w, 1.0, 0}, {0.5kh/w+(0.5(w/h-1))h/w, 1.
^
/home/zan/Téléchargements/of_v0.9.8_linux64_release/apps/myApps/lpmt/src/testApp.cpp:1899:81: warning: narrowing conversion of ‘((((double)k) * 5.0e-1) + 1.0e+0)’ from ‘double’ to ‘float’ inside { } [-Wnarrowing]
{0
h/w+(0.5*(w/h-1))h/w, 1.0, 0}, {0.5kh/w+(0.5(w/h-1))h/w, 1.0+0.5k, 0},
^
/home/zan/Téléchargements/of_v0.9.8_linux64_release/apps/myApps/lpmt/src/testApp.cpp:1899:116: warning: narrowing conversion of ‘(((((double)h) / ((double)w)) - (((((double)k) * 5.0e-1) * ((double)h)) / ((double)w))) + (((((double)((w / h) - 1.0e+0f)) * 5.0e-1) * ((double)h)) / ((double)w)))’ from ‘double’ to ‘float’ inside { } [-Wnarrowing]
{0.5kh/w+(0.5*(w/h-1))h/w, 1.0+0.5k, 0}, {(1.0h/w)-(0.5kh/w)+(0.5(w/h-
^
/home/zan/Téléchargements/of_v0.9.8_linux64_release/apps/myApps/lpmt/src/testApp.cpp:1899:139: warning: narrowing conversion of ‘((((double)k) * 5.0e-1) + 1.0e+0)’ from ‘double’ to ‘float’ inside { } [-Wnarrowing]
)h/w, 1.0+0.5k, 0}, {(1.0h/w)-(0.5kh/w)+(0.5(w/h-1))h/w, 1.0+0.5k, 0},
^
/home/zan/Téléchargements/of_v0.9.8_linux64_release/apps/myApps/lpmt/src/testApp.cpp:1899:160: warning: narrowing conversion of ‘((((double)h) / ((double)w)) + (((((double)((w / h) - 1.0e+0f)) * 5.0e-1) * ((double)h)) / ((double)w)))’ from ‘double’ to ‘float’ inside { } [-Wnarrowing]
{(1.0h/w)-(0.5kh/w)+(0.5(w/h-1))h/w, 1.0+0.5k, 0}, {1.0h/w+(0.5(w/h-
^
/home/zan/Téléchargements/of_v0.9.8_linux64_release/apps/myApps/lpmt/src/testApp.cpp: In member function ‘void testApp::quadBezierSpherizeStrong(int)’:
/home/zan/Téléchargements/of_v0.9.8_linux64_release/apps/myApps/lpmt/src/testApp.cpp:1928:19: warning: narrowing conversion of ‘(((double)((h * 0.0f) / w)) + (((((double)((w / h) - 1.0e+0f)) * 5.0e-1) * ((double)h)) / ((double)w)))’ from ‘double’ to ‘float’ inside { } [-Wnarrowing]
{ {0h/w+(0.5(w/h-1))h/w, 0, 0}, {0.5kh/w+(0.5(w/h-1))h/w, -0.
^
/home/zan/Téléchargements/of_v0.9.8_linux64_release/apps/myApps/lpmt/src/testApp.cpp:1928:57: warning: narrowing conversion of ‘((((((double)k) * 5.0e-1) * ((double)h)) / ((double)w)) + (((((double)((w / h) - 1.0e+0f)) * 5.0e-1) * ((double)h)) / ((double)w)))’ from ‘double’ to ‘float’ inside { } [-Wnarrowing]
{ {0
h/w+(0.5*(w/h-1))h/w, 0, 0}, {0.5kh/w+(0.5(w/h-1))h/w, -0.
^
/home/zan/Téléchargements/of_v0.9.8_linux64_release/apps/myApps/lpmt/src/testApp.cpp:1928:81: warning: narrowing conversion of ‘(((double)k) * -5.0e-1)’ from ‘double’ to ‘float’ inside { } [-Wnarrowing]
{0
h/w+(0.5*(w/h-1))h/w, 0, 0}, {0.5kh/w+(0.5(w/h-1))h/w, -0.5k, 0},
^
/home/zan/Téléchargements/of_v0.9.8_linux64_release/apps/myApps/lpmt/src/testApp.cpp:1928:114: warning: narrowing conversion of ‘(((((double)h) / ((double)w)) - (((((double)k) * 5.0e-1) * ((double)h)) / ((double)w))) + (((((double)((w / h) - 1.0e+0f)) * 5.0e-1) * ((double)h)) / ((double)w)))’ from ‘double’ to ‘float’ inside { } [-Wnarrowing]
{0.5kh/w+(0.5*(w/h-1))h/w, -0.5k, 0}, {(1.0h/w)-(0.5kh/w)+(0.5(w/h-
^
/home/zan/Téléchargements/of_v0.9.8_linux64_release/apps/myApps/lpmt/src/testApp.cpp:1928:138: warning: narrowing conversion of ‘(((double)k) * -5.0e-1)’ from ‘double’ to ‘float’ inside { } [-Wnarrowing]
)h/w, -0.5k, 0}, {(1.0h/w)-(0.5kh/w)+(0.5(w/h-1))h/w, -0.5k, 0},
^
/home/zan/Téléchargements/of_v0.9.8_linux64_release/apps/myApps/lpmt/src/testApp.cpp:1928:157: warning: narrowing conversion of ‘((((double)h) / ((double)w)) + (((((double)((w / h) - 1.0e+0f)) * 5.0e-1) * ((double)h)) / ((double)w)))’ from ‘double’ to ‘float’ inside { } [-Wnarrowing]
{(1.0h/w)-(0.5kh/w)+(0.5(w/h-1))h/w, -0.5k, 0}, {1.0h/w+(0.5(w/h-
^
/home/zan/Téléchargements/of_v0.9.8_linux64_release/apps/myApps/lpmt/src/testApp.cpp:1929:31: warning: narrowing conversion of ‘((((double)((h * 0.0f) / w)) - (((((double)k) * 5.0e-1) * ((double)h)) / ((double)w))) + (((((double)((w / h) - 1.0e+0f)) * 5.0e-1) * ((double)h)) / ((double)w)))’ from ‘double’ to ‘float’ inside { } [-Wnarrowing]
{ {0h/w-(0.5kh/w)+(0.5(w/h-1))h/w, 0.5k, 0}, {0h/w-(0.5
^
/home/zan/Téléchargements/of_v0.9.8_linux64_release/apps/myApps/lpmt/src/testApp.cpp:1929:54: warning: narrowing conversion of ‘(((double)k) * 5.0e-1)’ from ‘double’ to ‘float’ inside { } [-Wnarrowing]
{ {0
h/w-(0.5kh/w)+(0.5*(w/h-1))h/w, 0.5k, 0}, {0*h/w-(0.5 "

Sorry for the long text.
Someone has an idea, a solution, a clue, etc… ?
THX a lot


#2

This is simple, unsigned char * doesn’t work anymore, you’re better of doing
ofPixels pixels = cameras[0].getPixels();

Next…

int ofImage_::width is protected (probably didn’t use to be earlier). You have to use .getWidth() [same with ofImage_::height which you have as a error later).

So for the snapshotTexture.allocate, do,
snapshotTexture.allocate(img.getWidth(), img.getHeight(), GL_RGB);

And,

would become
snapshotTexture.loadData(pixels, img.getWidth(), img.getHeight(), GL_RGB);

Ok… I see lots of errors, can’t go through it all right now, but the pixel/image errors should be solved with these function calls.

At first glance a lot of the others seem like warnings so they might just work anyway once you fix these.


#3

HI ayruos !

Thx for your help. I think that understand.
I’ll try this solution but I think too that i’ll take time to resolve all warnings and errors.
I’m a new linux user. I’ll tell you if i arrive to fix these.

Best way !


#4

An idea for that ?

…/…/…/libs/openFrameworks/graphics/ofImage.h:594:9: error: ‘int ofImage_::height’ is protected

And questions Are there compatibilties problems between OF V0.9 and addons ?


#5

i think the code you are trying to use is too old so 0.9 is not compatible anymore with it. the _height is protected error can be probably solved by changing .height with .getHeight()


#6

Hi Arturo,

Thanks for your answer.
Okay for the error message. But for the compatibility… there is no code compatible with OF v0.9? Where can i find this or an other soft for mapping?

All the best


#7

What @arturo means is that the code you’re trying to compile is getting the error messages because it was written before 0.9 and thus the function calls needs to be updated to 0.9 standards. [.height becomes .getHeight(), ofPixels instead of unsigned char * etc].

It would probably compile fine once you update the deprecated function calls but I can’t confirm on that because I have no idea what is the full project you’re trying to compile.

As for other softwares for mapping, you could take a look at ofxPiMapper, it’s meant for the Pi but I’ve heard from people that it works on other OS’ too. Not sure what other options you have on Linux though, Syphon doesn’t exist on Linux to be able to use other third party softwares.


#8

Hi Ayrus,

Okay. But there are much different deprecated functions. Where can i find updated functions?
The project would like to install is LPMT.
I go to see ofxpimapper. THX

Now i would like to say isn’t it strange on the OF site there are addons no compatible with the latest version of OF?
Thanks guys to take time with a novice.


#9

I give up on OF, there are too many problems updating and I do not know enough computer language and so I spend too much time trying to install everything.

Although patient, I have not been able to install anything other than OF.

Thank you for your help and good road to you

ZAN