Jaunty and Codeblocks: Missing Definitions..

Hi all,
Im a new “oF&cb” user, jus after installing all the packages and launching the ide, i ve tryied to launch an example project (audioInputExample).

But i ve got a bunch of issues, here’s the Build Log:

  
  
-------------- Build: Debug in audioInputExample ---------------  
  
Compiling: src/main.cpp  
In file included from ../../../libs/openFrameworks/app/ofAppRunner.h:8,  
                 from ../../../libs/openFrameworks/graphics/ofImage.h:7,  
                 from ../../../libs/openFrameworks/ofMain.h:24,  
                 from /home/akab/Scrivania/of_preRelease_v0.06_linux_cb_FAT/apps/examples/audioInputExample/src/main.cpp:1:  
../../../libs/openFrameworks/app/ofAppGlutWindow.h:15:22: warning: GL/glut.h: Nessun file o directory  
In file included from ../../../libs/openFrameworks/ofMain.h:40,  
                 from /home/akab/Scrivania/of_preRelease_v0.06_linux_cb_FAT/apps/examples/audioInputExample/src/main.cpp:1:  
../../../libs/openFrameworks/video/ofVideoPlayer.h:9:22: warning: gst/gst.h: Nessun file o directory  
In file included from ../../../libs/openFrameworks/ofMain.h:40,  
                 from /home/akab/Scrivania/of_preRelease_v0.06_linux_cb_FAT/apps/examples/audioInputExample/src/main.cpp:1:  
../../../libs/openFrameworks/video/ofVideoPlayer.h:13: error: ISO C++ forbids declaration of ‘GMainLoop’ with no type  
../../../libs/openFrameworks/video/ofVideoPlayer.h:13: error: expected ‘;’ before ‘*’ token  
../../../libs/openFrameworks/video/ofVideoPlayer.h:14: error: ISO C++ forbids declaration of ‘GstElement’ with no type  
../../../libs/openFrameworks/video/ofVideoPlayer.h:14: error: expected ‘;’ before ‘*’ token  
../../../libs/openFrameworks/video/ofVideoPlayer.h:19: error: ‘guint64’ does not name a type  
../../../libs/openFrameworks/video/ofVideoPlayer.h:20: error: ‘guint64’ does not name a type  
../../../libs/openFrameworks/video/ofVideoPlayer.h:130: error: ISO C++ forbids declaration of ‘GstElement’ with no type  
../../../libs/openFrameworks/video/ofVideoPlayer.h:130: error: expected ‘;’ before ‘*’ token  
../../../libs/openFrameworks/video/ofVideoPlayer.h:131: error: ISO C++ forbids declaration of ‘GstElement’ with no type  
../../../libs/openFrameworks/video/ofVideoPlayer.h:131: error: expected ‘;’ before ‘*’ token  
../../../libs/openFrameworks/video/ofVideoPlayer.h:132: error: ‘gint64’ does not name a type  
Process terminated with status 1 (0 minutes, 9 seconds)  
11 errors, 2 warnings  
  

I understand that is a “not-issue” generated by the fact that i ve not manually set all the dependencies to the definitions ( * gstreamer-0.10 * gstreamer-base-0.10 * gstreamer-video-0.10 * libavcodec * libavformat * libavutil * libswscale).

But the problem is: Where to manually set them?

Thanks from now!
4k4B

Have you run the install_dependencies.sh script in the scripts/ubuntu folder?

Normally that should install the development packages for the OF linux dependencies (such as Gstreamer etc).

Then in the Project settings->Libraries tab you should have a list of library pkg-configs which find stuff for you automatically. You shouldn’t need to set or change anything.

Did you install codeblocks from the repositories or using the install_codeblocks script?
The latter is recommended because it’s a more recent version with some useful functionality such as being able to run OF apps from within the IDE (which the repo one can’t do due to library path problems).

Unistalled all the package and reinstalled from the beginning.

Now all works fine!

I believe that was a problem with the repositories… im behind a not-very-functional proxy… :\

Thanks Anyway!

But im struck with another problem…

I ve find a little bug on the “ofUCUtils.cpp” OR “ofUCUtils.h” OR “swscale.h” (under ‘libs/openframework/video’)…

I got this during the build of most of the example projects! (ofUCUtils is needed for most of them…)

Its basically a wrong conversion from int 2 pixelformat, and strangely the issue occurrency is precisely under a function that should convert *that* string" 2 *that* format… :\

in ofUCUtils.h the var src_pix_fmt (to convert) is declared as int

in ofUCUtils.cpp there is a function to convert src_pix_fmt that uses “swscale.h” (line 130) to doing that…

Is my analisys wrong? Anyway, here’s the buildlog!

\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\

\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\

-------------- Clean: Debug in textureExample ---------------

Cleaned “textureExample - Debug”

-------------- Build: Debug in textureExample ---------------

Compiling: src/main.cpp
Compiling: src/testApp.cpp
Compiling: …/…/…/libs/openFrameworks/app/ofAppGlutWindow.cpp
/home/akab/Scrivania/of_preRelease_v0.06_linux_cb_FAT/libs/openFrameworks/app/ofAppGlutWindow.cpp: In member function ‘virtual void ofAppGlutWindow::setupOpenGL(int, int, int)’:
/home/akab/Scrivania/of_preRelease_v0.06_linux_cb_FAT/libs/openFrameworks/app/ofAppGlutWindow.cpp:59: warning: deprecated conversion from string constant to ‘char*’
Compiling: …/…/…/libs/openFrameworks/app/ofAppRunner.cpp
Compiling: …/…/…/libs/openFrameworks/communication/ofArduino.cpp
Compiling: …/…/…/libs/openFrameworks/communication/ofSerial.cpp
Compiling: …/…/…/libs/openFrameworks/communication/ofStandardFirmata.cpp
Compiling: …/…/…/libs/openFrameworks/graphics/ofBitmapFont.cpp
Compiling: …/…/…/libs/openFrameworks/graphics/ofGraphics.cpp
Compiling: …/…/…/libs/openFrameworks/graphics/ofImage.cpp
Compiling: …/…/…/libs/openFrameworks/graphics/ofTexture.cpp
Compiling: …/…/…/libs/openFrameworks/graphics/ofTrueTypeFont.cpp
Compiling: …/…/…/libs/openFrameworks/sound/ofSoundPlayer.cpp
Compiling: …/…/…/libs/openFrameworks/sound/ofSoundStream.cpp
Compiling: …/…/…/libs/openFrameworks/utils/ofMath.cpp
Compiling: …/…/…/libs/openFrameworks/utils/ofUtils.cpp
Compiling: …/…/…/libs/openFrameworks/video/ofUCUtils.cpp
/home/akab/Scrivania/of_preRelease_v0.06_linux_cb_FAT/libs/openFrameworks/video/ofUCUtils.cpp:19:22: warning: avformat.h: Nessun file o directory
/home/akab/Scrivania/of_preRelease_v0.06_linux_cb_FAT/libs/openFrameworks/video/ofUCUtils.cpp:20:21: warning: swscale.h: Nessun file o directory
/home/akab/Scrivania/of_preRelease_v0.06_linux_cb_FAT/libs/openFrameworks/video/ofUCUtils.cpp: In member function ‘void ofUCUtils::set_format(int, int)’:
/home/akab/Scrivania/of_preRelease_v0.06_linux_cb_FAT/libs/openFrameworks/video/ofUCUtils.cpp:303: error: invalid conversion from ‘int’ to ‘PixelFormat’
/home/akab/Scrivania/of_preRelease_v0.06_linux_cb_FAT/libs/openFrameworks/video/ofUCUtils.cpp:303: error: initializing argument 3 of ‘SwsContext* sws_getContext(int, int, PixelFormat, int, int, PixelFormat, int, SwsFilter*, SwsFilter*, double*)’
Process terminated with status 1 (0 minutes, 37 seconds)
2 errors, 3 warnings

\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\

\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\

Im still trying to *understand* the logic(its my first-time with codeblocks, and im an almost-newbie in C++ dev), can anyone enlight the way for me?

Thanks!
4k4B

No, that’s just a problem with Ubuntu 9.04 which can be easily fixed. There’s a post of the linux forum about this but basically just do this:

substitute line 303 in ofUCUtils.cpp with:

  
sws_getContext(format.size.width, format.size.height, (PixelFormat)src_pix_fmt,  
         d_width, d_height, PIX_FMT_RGB24,  
         VIDEOGRABBER_RESIZE_FLAGS, NULL, NULL, NULL);  

It’s the cast to (PixelFormat) that’s the important bit.

Now I understand where is the “conversion” !

Thanks grimus! :mrgreen:

no got this error with fedora12 alpha. but the good thing is, the hack works, too! :slight_smile: