0

Question in the title. Ideally I'd like to make small C++ projects without MS Visual Studio. Right now I can't even get the code in samples/cpp/ to compile and run with basic g++.

For reference I've downloaded OpenCV 3.1 from here: https://sourceforge.net/projects/opencvlibrary/files/opencv-win/3.1.0/opencv-3.1.0.exe/download

I want nothing to do with Visual Studio, but from my search results all Windows OpenCV C++ projects seem to use it.

halfer
  • 19,824
  • 17
  • 99
  • 186
JDS
  • 16,388
  • 47
  • 161
  • 224
  • 2
    OpenCV is a library, you will need a compiler if you want to compile C++ code. – Guvante Jun 09 '16 at 21:10
  • Yes of course, I've been having trouble using simple g++ compiler (through MinGW) to compile code. I should be able to do this rather than using a full-fledged IDE, yes? – JDS Jun 09 '16 at 21:12
  • 1
    As @Guvante mentioned, to transform (_C_ or _C++_) code into [PE](https://msdn.microsoft.com/en-us/library/windows/desktop/ms680547(v=vs.85).aspx), you need a compiler (+linker). Check [this post](http://stackoverflow.com/questions/34748913/lnk2005-error-in-clr-windows-form/34777349#34777349) for details. When there are hundreds of source files (and dependencies) things can get messy, so projects are used. There are many project types (handled by as many tools), but they all do the same thing. So, either use the tool that the project was designed for, or convert it to the desired tool format. – CristiFati Jun 09 '16 at 21:39
  • 2
    Just tell him that there are prebuilt libraries for people using MSVC, but the option is available to build them with your own toolchain from source. It's that his google wasn't giving examples of people using the latter option that were apparently giving him concerns. Here is a link to OpenCv on it http://docs.opencv.org/3.0-last-rst/doc/tutorials/introduction/windows_install/windows_install.html#cpptutwindowsmakeown There are even videos on the process – infixed Jun 09 '16 at 22:12

0 Answers0