User forums > General (but related to Code::Blocks)

Building IVT - Integrating Vision Toolkit with CodeBlocks

(1/1)

grooveordie:
Hi,

I need to use IVT - Integrating Vision Toolkit. It has MS Visual C++ workspace files to build, but i use CodeBlocks for all my work, and i like it.

But, when i import MSVC workspace to CodeBlocks, something strange happens, and can't compile.

How can i get it run?

IVT's homepage: ivt.sourceforge.net

dje:
By configuring your project settings. Answer is as detailed as problem description.

Dje

grooveordie:
Oh, thank you.

When i import that MSVC projects to CodeBlocks or DevCpp and try to build, i get 25 erros.

First of them is, related to this line:

"static LRESULT CALLBACK CallbackProc(HWND hWnd, LPVIDEOHDR lpVHdr)
{..."

Error is, "LPVIDEIHDR has not been declared". Then it says that lpVHdr with no type couldn't be declared and base operand (lpVHdr) of '->' is not a pointer.

Could i make a new CodeBlocks project just with the cpp and header files of the library? And, how?

dje:
If you don't have a file not found error in the output log, then you should have a look on macro that might be defined in the header that defines this type and configure the project settings (complier options) to make things work with MinGW.

I suppose the macro configuration makes #ifdef game skip the type declaration.

Dje

stahta01:
The build works for me

Please turn on full compiler logging; if you want any more help in this or any other forum.
http://wiki.codeblocks.org/index.php?title=FAQ#Q:_How_do_I_troubleshoot_an_compiler_problem.3F


--- Quote ---=== IVTLib, Win32 Release ===
--- End quote ---

--- Quote ---src\VideoCapture\VFWCapture.cpp
--- End quote ---

--- Code: ---mingw32-g++.exe -DAVSTREAMMASTER_NONE=1 -DAVSTREAMMASTER_AUDIO=0  -W -fexceptions -O2 -DWIN32 -DNDEBUG -D_MBCS -D_LIB -D_WIN32_WINNT=0x0400 -D_CRT_SECURE_NO_DEPRECATE  -fno-strict-aliasing   -I..\..\src -IC:\GreenApps\MinGW_Boost\include  -c C:\SourceCode\Projects\IDEs\CodeBlocks\Projects\IVT\src\VideoCapture\VFWCapture.cpp -o Release\src\VideoCapture\VFWCapture.o

--- End code ---

Note: My mingw is installed in C:\GreenApps\MinGW_Boost the normal place is C:\MinGW

Note: I added these defines to get past later error
-DAVSTREAMMASTER_NONE=1 -DAVSTREAMMASTER_AUDIO=0

IIRC, The -fno-strict-aliasing is needed using a MinGW GCC of 4.2.

I believe, the rest is there as result of importing the project into Code::Blocks.

Tim S

Details on My MinGW Installation; the one most likely to matter in this case is
Windows API Version mine is 3.13 (the value of __W32API_VERSION in file include/w32api.h)

--- Code: ---GCCBASEDIR=C:\GreenApps\MinGW_Boost
gcc version 4.4.0 (GCC)
GNU ld (GNU Binutils) 2.19.1
GNU windres (GNU Binutils) 2.19.1
GNU dlltool (GNU Binutils) 2.19.1
GNU Make 3.81
#define __MINGW32_VERSION           3.15.2
#define __W32API_VERSION 3.13

--- End code ---

Navigation

[0] Message Index

Go to full version