I built OpenCV from CMake to work with QT in prior months. I now want to also develop in Visual Studio 2010. Can I use this same installation, or do I need to have 2 opencv installations for this to work?
Asked
Active
Viewed 361 times
0
-
Do you mean to say the Qt Creator IDE? – Bart Oct 28 '11 at 19:59
-
I think Visual Studio is Visual Studio, @Bart ;) – Blender Oct 28 '11 at 20:01
-
Setting up OpenCV for Qt makes no sense to me and leads me to believe there is some confusion. Qt is an application development framework. It is often confused with the Qt Creator IDE by developers new to Qt. They are not synonymous. If that is what the OP means, the questions is: Can I use the OpenCV libraries compiled with compiler X (MinGW I guess?) inside projects compiled with the Visual Studio compiler. I might be mistaken though. – Bart Oct 28 '11 at 20:04
-
@Bart Actually, OpenCV uses the Qt framework as an optional (and more feature rich) addition to the `highgui` API. So, the question may be valid. But, I do agree the OP is either confused, or does not understand what compiling OpenCV with Qt support means... – mevatron Oct 28 '11 at 20:12
-
1@mevatron Ah okay, thanks for the info. Did not know that. Would like the clarification though. :) – Bart Oct 28 '11 at 20:14
-
@4501: Have you tried to use your exisiting installation? – Blender Oct 28 '11 at 20:15
-
@Blender Yes, and I was having troubles with it, which lead me to believe they were incompatible. Thus, the question – Oct 28 '11 at 22:34
1 Answers
0
Since your question isn't quite clear, I'm going to make an assumption that you compiled OpenCV with Qt support. It should be noted that Qt support has nothing to do with whether or not you compiled it to work with Qt Creator for example. This Qt support enhances the highgui
API (e.g., imshow
etc...).
If you set your OpenCV build target to be MinGW based, then yes, you will have to recompile OpenCV.
If, on the other hand, you set the build target to Visual Studio 2010 based, then no the OpenCV build should work fine with Visual Studio.
Hope that is helpful!

mevatron
- 13,911
- 4
- 55
- 72
-
Ahhh sorry for the confusion. Yes, it is built to be MinGW based. There is no way for it to go both ways? I need to have 2 installations on my machine for both to work simultaneously? – Oct 28 '11 at 21:12
-
Well, you can try going down that path, but from my experience you don't want to. Here are the links on how you might try this... http://www.mingw.org/wiki/MSVC%5Fand%5FMinGW%5FDLLs and http://stackoverflow.com/questions/1291594/using-libs-dlls-compiled-in-linux-mingw-in-visual-studio – mevatron Oct 28 '11 at 21:21