1

I'm working with C++ (Code::Blocks + OpenframeWorks) and Processing on different projects and have only found the Processing libraries that use the VC++ pre-compiled OpenCV bundle... As I need to use OpenCV with Code::Blocks rather than Visual Studio I was wondering if it is possible to do both?

Side question: I am having trouble compiling OpenCV with Code::Blocks and CMake does anyone have any experience or can point me to a tutorial for the CB 10 + OpenCV 2.3.1 combo?

Thanks in advance.

Best,

Tamler

Tamler
  • 130
  • 1
  • 8

1 Answers1

1

The official Code::Blocks / OpenCV tutorial can be found here. Have you tried it?

There's also the Compile OpenCV under MinGW tutorial, and you might want to check it out.

karlphillip
  • 92,053
  • 36
  • 243
  • 426
  • I wish. I am failing hard at getting OpenCV to compile. CMake is throwing an error(s): "CMAKE_C_COMPILER_ENV_VAR + CMAKE_CXX_COMPILER_ENV_VAR" I'm using the default MinGW in CodeBlocks and have configured the linker, search directory, and tool chain... And am now stuck. – Tamler Mar 26 '12 at 02:50
  • The second page you linked is what I am following. It is at step 15 that I have the errors listed above. I'm using a vanilla codeblocks+MinGW, opencv 2.3.1, and CMake 2.8. Nothing odd or special about the installs. I've googled the errors and lurked here for hints... – Tamler Mar 26 '12 at 15:32
  • That tutorial uses `/` to specify a path. I would try to use the other slash instead: \ , which is what Windows uses. i.e. `C:\Program Files\some_path\gcc.exe` – karlphillip Mar 26 '12 at 16:34
  • 1
    You sir are a scholar and a gentleman. It seems the CMake likes to do that with paths and so that redoubled my investigation and attention to details. The tutorials still work but the paths you select are different and a few of the settings should be changed. Thanks for your help! – Tamler Mar 27 '12 at 02:28
  • Yes, this led me to the the right... path for the C::B + OpenCV. Now I am in the process of getting OpenCV + Processing going and then to test them all together. – Tamler Mar 27 '12 at 03:36
  • Awesome, feel free to upvote my answer or select it as the official answer to your question by clicking on the checkbox near it so it can help other in the future. If you have new questions, feel free to ask them in new threads. – karlphillip Mar 27 '12 at 12:47