Перейти к содержимому
Compvision.ru
Kay

C++ Builder and OpenCV

Recommended Posts

Hi Guys,

Thanks for taking the time to read my post.

I have been trying to iron this problem out for weeks now and it is positively killing me - i'm sure you all know the feeling!

I am using OpenCV and have converted Microsoft Visual Studio libs to C++ Builder ones and I thought things were going well; except for all my efforts I cannot get XE to compile with OpenCV Libs.

I am using the OpenCV Libs and dlls in the normal way, i.e. #include "opencv2\opencv.hpp", which is the header file for just about everything. so when I hit compile, with no code (i just want to see if it runs) I get:

[bCC32 Error] complex(204): E2316 '_fm_expl' is not a member of 'std'

if i expand this error is says:

Full parser context

Unit1.cpp(8): #include opencv2\opencv.hpp

opencv.hpp(47): #include opencv2/core/core.hpp

core.hpp(59): #include c:\program files\embarcadero\rad studio\8.0\include\dinkumware\complex

complex(47): namespace std

complex(153): class _Ctraits<long double>

complex(236): decision to instantiate: long double _Ctraits<long double>::_fm_exp(long double)

--- Resetting parser context for instantiation...

complex(203): parsing: long double _Ctraits<long double>::_fm_exp(long double)

I get two more type of error which is:

[bCC32 Error] complex(245): E2238 Multiple declaration for '_Ctraits<double>::_Cosh(double,double)'

( and when expanded)

Full parser context

Unit1.cpp(8): #include opencv2\opencv.hpp

opencv.hpp(47): #include opencv2/core/core.hpp

core.hpp(59): #include c:\program files\embarcadero\rad studio\8.0\include\dinkumware\complex

complex(47): namespace std

complex(240): class _Ctraits<double>

and

[bCC32 Error] complex(65): E2344 Earlier declaration of '_Ctraits<double>::_Cosh(double,double)'

(expanded)

Full parser context

Unit1.cpp(8): #include opencv2\opencv.hpp

opencv.hpp(47): #include opencv2/core/core.hpp

core.hpp(59): #include c:\program files\embarcadero\rad studio\8.0\include\dinkumware\complex

complex(47): namespace std

complex(240): class _Ctraits<double>

could anyone point me in the direction of a fix or a good tutorial? or am I missing something basic? I know some of you guys have successfully done this.

I have seen the thread started by Smorodov with the OpenCV 2.3 files in, but I want to learn myself how to do this!

I'm using OpenCV 2.4.2 if that makes a difference. I can supply the converted libs and dll's if that helps.

Many thanks for your time guys!

Kay

Поделиться сообщением


Ссылка на сообщение
Поделиться на других сайтах

It's simple to correct :), just add in the beginning of source file three lines:

#define _STLP_NO_CSTD_FUNCTION_IMPORTS
#define _FM_NO_REMAP
#include "opencv2/opencv.hpp"[/code]

But it will not solve all problems, you'll need correct headers.

Поделиться сообщением


Ссылка на сообщение
Поделиться на других сайтах

Smorodov you ROCK STAR!!

Would it be possible to explain to me how to correct the headers?

I can then do the work and contribute them back to the compvision forums.

There must be loads of people having this same problem!

Thanks Smorodov!

Поделиться сообщением


Ссылка на сообщение
Поделиться на других сайтах

:)

I use vs2010 now, and forgot that I correct in headers.

My advice -- try build your project, and kill errors one by one ( you want undestand the process, isnt it? :) ).

The sources have not changed alot, and you can find solution by example of my corrections in headers (I suppose you have them downloaded) in corresponding file and near corresponding line.

Try to solve it yourself, if will be hard problems, post error message and code fragment corresponding to the error, I will try to help you.

Good luck.

Поделиться сообщением


Ссылка на сообщение
Поделиться на других сайтах

Создайте учётную запись или войдите для комментирования

Вы должны быть пользователем, чтобы оставить комментарий

Создать учётную запись

Зарегистрируйтесь для создания учётной записи. Это просто!

Зарегистрировать учётную запись

Войти

Уже зарегистрированы? Войдите здесь.

Войти сейчас


  • Сейчас на странице   0 пользователей

    Нет пользователей, просматривающих эту страницу

×