Compile Opencv 3 with visual studio 9 [closed]

asked 2015-08-05 01:15:17 -0500

theodore gravatar image

Due to some circumstances I need to use an older version of visual studio, I tried to use the this guide and compile the source from scratch but I ended up with quite a bunch of errors. I made a quick research but I could not find something. Thus before I restart the procedure I would like to ask if there is a compatibility matter or not.

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by sturkmen
close date 2020-09-28 16:50:50.795257

Comments

2

you will need some tweaks, but it is for sure doable.

iirc, you need to add stdint.h to your compiler, and fix a part in the mjpg encoder[ result.data() -> &(result[0]) ]

berak gravatar imageberak ( 2015-08-05 01:33:58 -0500 )edit

just saying: before changing any of the opencv src code, don't forget to git checkout -b my_new_branch ... (as to leave the master one clean !)

berak gravatar imageberak ( 2015-08-05 04:00:05 -0500 )edit

@berak can you be more specific about how I can do the changes that you are pointing in your first comment or point me to a guide because my Visual Studio experience is close to 0.

theodore gravatar imagetheodore ( 2015-08-05 04:13:51 -0500 )edit
  • download stdint.h e.g. from here and put it into D:\Programme\Microsoft Visual Studio 9.0\VC\include (wherever you installed vs2008)

  • this has to be: m_file_stream.read(&(result[0]), chunk.m_size); (cl9 does not know any c++11)

berak gravatar imageberak ( 2015-08-05 04:28:08 -0500 )edit

@berak many thanks, indeed your instructions were helpful. ;-)

theodore gravatar imagetheodore ( 2015-08-05 07:57:17 -0500 )edit

was that it ? do we have to append something to the list ?

berak gravatar imageberak ( 2015-08-05 08:37:51 -0500 )edit
1

nope, after following the instructions that you pointed above and following the guide I pointed in my initial post the compilation succeeded both in Release and Debug mode without problem. So, consider it solved for the moment, many thanks again ;-)

theodore gravatar imagetheodore ( 2015-08-05 11:14:41 -0500 )edit