Watch, Follow, &
Connect with Us

Please visit our new home
community.embarcadero.com.


Welcome, Guest
Guest Settings
Help

Thread: Why C++Builder programmers can not Fix/Build their own OpenCv Header/Lib?



Permlink Replies: 19 - Last Post: Jan 15, 2018 8:58 AM Last Post By: roca robin Threads: [ Previous | Next ]
roca robin

Posts: 99
Registered: 9/10/06
Why C++Builder programmers can not Fix/Build their own OpenCv Header/Lib?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 4, 2018 11:43 PM
Why C++Builder programmers can not Fix/Build their own OpenCv Header/Lib?

is there any link that would point me to use C++Builder with OpenCv 2.4.13 or 3.4 without errors from header files of openCv?
Alex Belo

Posts: 583
Registered: 10/8/06
Re: Why C++Builder programmers can not Fix/Build their own OpenCv Header/Lib?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 5, 2018 1:15 AM   in response to: roca robin in response to: roca robin
roca robin wrote:

Why C++Builder programmers can not Fix/Build their own OpenCv
Header/Lib?

is there any link that would point me to use C++Builder with OpenCv
2.4.13 or 3.4?

I never touched OpenCV but in general I'd like to try it.
So I have simple questions:

What CB version do you use?

If it has new (clang-based) compiler what problems you have?

--
Alex
roca robin

Posts: 99
Registered: 9/10/06
Re: Why C++Builder programmers can not Fix/Build their own OpenCv Header/Lib?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 5, 2018 2:28 AM   in response to: Alex Belo in response to: Alex Belo
I have many errors on opencv header files,
I'm using 10.2
Keith Dopson

Posts: 58
Registered: 3/16/00
Re: Why C++Builder programmers can not Fix/Build their own OpenCv Header/Lib?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 9, 2018 8:43 AM   in response to: roca robin in response to: roca robin
roca robin wrote:
Why C++Builder programmers can not Fix/Build their own OpenCv Header/Lib?

is there any link that would point me to use C++Builder with OpenCv 2.4.13 or 3.4 without errors from header files of openCv?

While this reply doesnt answer you question, have you seen

http://www.compvision.ru/forum/index.php?/topic/763-opencv-232-cbuilder-xe2/

Also, I build Opencv applications as console, using Visual Studio, then execute the console apps using Windows process calls, with command line arguments, from C++ Builder forms apps... A hack, for sure, but I do get results.
Keith Dopson

Posts: 58
Registered: 3/16/00
Re: Why C++Builder programmers can not Fix/Build their own OpenCv Header/Lib?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 9, 2018 8:50 AM   in response to: roca robin in response to: roca robin
roca robin wrote:
Why C++Builder programmers can not Fix/Build their own OpenCv Header/Lib?

is there any link that would point me to use C++Builder with OpenCv 2.4.13 or 3.4 without errors from header files of openCv?

While this reply doesnt answer your question, have you seen

[Opencv.ru|http://www.compvision.ru/forum/index.php?/topic/763-opencv-232-cbuilder-xe2/]

Also, I build Opencv applications as console, using Visual Studio, then execute the console apps using Windows process calls, with command line arguments, from C++ Builder forms apps... A hack, for sure, but I do get results.
roca robin

Posts: 99
Registered: 9/10/06
Re: Why C++Builder programmers can not Fix/Build their own OpenCv Header/Lib?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 10, 2018 11:37 AM   in response to: Keith Dopson in response to: Keith Dopson
Keith Dopson wrote:
roca robin wrote:
Why C++Builder programmers can not Fix/Build their own OpenCv Header/Lib?

is there any link that would point me to use C++Builder with OpenCv 2.4.13 or 3.4 without errors from header files of openCv?

While this reply doesnt answer your question, have you seen

[Opencv.ru|http://www.compvision.ru/forum/index.php?/topic/763-opencv-232-cbuilder-xe2/]

Also, I build Opencv applications as console, using Visual Studio, then execute the console apps using Windows process calls, with command line arguments, from C++ Builder forms apps... A hack, for sure, but I do get results.

thanks I'll try that version,
roca robin

Posts: 99
Registered: 9/10/06
Re: Why C++Builder programmers can not Fix/Build their own OpenCv Header/Lib?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 10, 2018 11:43 AM   in response to: Keith Dopson in response to: Keith Dopson
Keith Dopson wrote:
roca robin wrote:
Why C++Builder programmers can not Fix/Build their own OpenCv Header/Lib?

is there any link that would point me to use C++Builder with OpenCv 2.4.13 or 3.4 without errors from header files of openCv?

While this reply doesnt answer your question, have you seen

[Opencv.ru|http://www.compvision.ru/forum/index.php?/topic/763-opencv-232-cbuilder-xe2/]

Also, I build Opencv applications as console, using Visual Studio, then execute the console apps using Windows process calls, with command line arguments, from C++ Builder forms apps... A hack, for sure, but I do get results.

hi,
I manage to make an application with opencv3.0.0 and opencv2.4.13.5 the problem is I can't resolved the issue IF I use FaceRecognizer, but any other functions is all fine.

the issue says unresolved external function link
roca robin

Posts: 99
Registered: 9/10/06
Re: Why C++Builder programmers can not Fix/Build their own OpenCv Header/Lib?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 10, 2018 11:43 AM   in response to: Keith Dopson in response to: Keith Dopson
Keith Dopson wrote:
roca robin wrote:
Why C++Builder programmers can not Fix/Build their own OpenCv Header/Lib?

is there any link that would point me to use C++Builder with OpenCv 2.4.13 or 3.4 without errors from header files of openCv?

While this reply doesnt answer your question, have you seen

[Opencv.ru|http://www.compvision.ru/forum/index.php?/topic/763-opencv-232-cbuilder-xe2/]

Also, I build Opencv applications as console, using Visual Studio, then execute the console apps using Windows process calls, with command line arguments, from C++ Builder forms apps... A hack, for sure, but I do get results.

hi,
I manage to make an application with opencv3.0.0 and opencv2.4.13.5 the problem is I can't resolved the issue IF I use FaceRecognizer, but any other functions is all fine.

the issue says unresolved external function link...

I will post
roca robin

Posts: 99
Registered: 9/10/06
Re: Why C++Builder programmers can not Fix/Build their own OpenCv Header/Lib?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 10, 2018 11:48 AM   in response to: Keith Dopson in response to: Keith Dopson
Keith Dopson wrote:
roca robin wrote:
Why C++Builder programmers can not Fix/Build their own OpenCv Header/Lib?

is there any link that would point me to use C++Builder with OpenCv 2.4.13 or 3.4 without errors from header files of openCv?

While this reply doesnt answer your question, have you seen

[Opencv.ru|http://www.compvision.ru/forum/index.php?/topic/763-opencv-232-cbuilder-xe2/]

Also, I build Opencv applications as console, using Visual Studio, then execute the console apps using Windows process calls, with command line arguments, from C++ Builder forms apps... A hack, for sure, but I do get results.

hi,
I manage to make an application with opencv3.0.0 and opencv2.4.13.5 the problem is I can't resolved the issue IF I use FaceRecognizer, but any other functions is all fine.

the issue says unresolved external function link...

FaceRecognizer starts from 2.4x
roca robin

Posts: 99
Registered: 9/10/06
Re: Why C++Builder programmers can not Fix/Build their own OpenCv Header/Lib?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 10, 2018 12:08 PM   in response to: Keith Dopson in response to: Keith Dopson
Keith Dopson wrote:
roca robin wrote:
Why C++Builder programmers can not Fix/Build their own OpenCv Header/Lib?

is there any link that would point me to use C++Builder with OpenCv 2.4.13 or 3.4 without errors from header files of openCv?

While this reply doesnt answer your question, have you seen

[Opencv.ru|http://www.compvision.ru/forum/index.php?/topic/763-opencv-232-cbuilder-xe2/]

Also, I build Opencv applications as console, using Visual Studio, then execute the console apps using Windows process calls, with command line arguments, from C++ Builder forms apps... A hack, for sure, but I do get results.

hi,
I manage to make an application with opencv3.0.0 and opencv2.4.13.5 the problem is I can't resolved the issue IF I use FaceRecognizer, but any other functions is all fine.

the issue says unresolved external function link...

FaceRecognizer starts from 2.4x

here are the list of issues
[ilink32 Error] Error: Unresolved external 'cv::Algorithm::write(cv::FileStorage&) const' referenced from F:\UNIT1.OBJ
[ilink32 Error] Error: Unresolved external 'cv::Algorithm::read(cv::FileNode&)' referenced from F:\UNIT1.OBJ
[ilink32 Error] Error: Unresolved external 'cv::FaceRecognizer::save(std::basic_string<char, std::char_traits<char>, std::allocator<char> >&) const' referenced from F:\UNIT1.OBJ
[ilink32 Error] Error: Unresolved external 'cv::FaceRecognizer::load(std::basic_string<char, std::char_traits<char>, std::allocator<char> >&)' referenced from F:\UNIT1.OBJ
[ilink32 Error] Error: Unresolved external 'cv::Algorithm::~Algorithm()' referenced from F:\UNIT1.OBJ
[ilink32 Error] Error: Unresolved external 'cv::_interlockedExchangeAdd(int *, int)' referenced from F:\UNIT1.OBJ
[ilink32 Error] Error: Unresolved external 'cv::fastFree(void *)' referenced from F:\UNIT1.OBJ
[ilink32 Error] Error: Unresolved external 'cv::_InputArray::_InputArray(const double&)' referenced from F:\UNIT1.OBJ
[ilink32 Error] Error: Unresolved external 'cv::createEigenFaceRecognizer(int, double)' referenced from F:\UNIT1.OBJ
[ilink32 Error] Error: Unresolved external 'cv::createFisherFaceRecognizer(int, double)' referenced from F:\UNIT1.OBJ
[ilink32 Error] Error: Unable to perform link

and I think this lines causes the error messages,

//cv::Ptr<cv::FaceRecognizer> *model; //using this NO ERRORS but I can't use the model to create a facerecognizer e.q createeigenfaceRecognizer

int ima=6;
int ge=1900;
cv::InputArrayOfArrays images=NULL;
cv::InputArray labels=NULL;
cv::createEigenFaceRecognizer(6, 1900)->train(images,labels);
cv::FaceRecognizer* xmodel = cv::createFisherFaceRecognizer(1,1);

same ERROR Messages also like this code:
//cv::InputArrayOfArrays &images=NULL;
//cv::InputArray &labels=NULL;

cv::InputArrayOfArrays images=NULL;
cv::InputArray labels=NULL;

///cv::createEigenFaceRecognizer(6, 1900)->train(images,labels);
//cv::FaceRecognizer* xmodel = cv::createFisherFaceRecognizer(1,1);

cv::Ptr<cv::FaceRecognizer>* model;
model->ptr<cv::FaceRecognizer>()->train(images,labels);

Alex Belo

Posts: 583
Registered: 10/8/06
Re: Why C++Builder programmers can not Fix/Build their own OpenCv Header/Lib? [Edit]
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 11, 2018 8:19 AM   in response to: roca robin in response to: roca robin
roca robin wrote:

[ilink32 Error] Error: Unresolved external
'cv::Algorithm::write(cv::FileStorage&) const' referenced from
F:\UNIT1.OBJ [ilink32 Error] Error: Unresolved external
'cv::Algorithm::read(cv::FileNode&)' referenced from F:\UNIT1.OBJ
...

As I already mentioned I never touched OpenCV so I can try to help only
from "common sense" point of view.

Full text searching in OpenCV 3.4.0 sources returns the only file

opencv-3.4.0\modules\core\src\algorithm.cpp

which implements Algorithm class:

namespace cv
{

Algorithm::Algorithm()
{
CV_TRACE_FUNCTION();
}

Algorithm::~Algorithm()
{
CV_TRACE_FUNCTION();
}

...

and so on.

But I can not find algorithm.h (and algorithm.cpp does not mention it).

So I suggest to add algorithm.cpp to your project, recompile, and see
if this helps.

--
Alex
Alex Belo

Posts: 583
Registered: 10/8/06
Re: Why C++Builder programmers can not Fix/Build their own OpenCv Header/Lib? [Edit]
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 11, 2018 8:20 AM   in response to: roca robin in response to: roca robin
roca robin wrote:

[ilink32 Error] Error: Unresolved external
'cv::Algorithm::write(cv::FileStorage&) const' referenced from
F:\UNIT1.OBJ [ilink32 Error] Error: Unresolved external
'cv::Algorithm::read(cv::FileNode&)' referenced from F:\UNIT1.OBJ
...

As I already mentioned I never touched OpenCV so I can try to help only
from "common sense" point of view.

Full text searching in OpenCV 3.4.0 sources returns the only file

opencv-3.4.0\modules\core\src\algorithm.cpp

which implements Algorithm class:

namespace cv
{

Algorithm::Algorithm()
{
CV_TRACE_FUNCTION();
}

Algorithm::~Algorithm()
{
CV_TRACE_FUNCTION();
}

...

and so on.

But I can not find algorithm.h (and algorithm.cpp does not mention it).

So I suggest to add algorithm.cpp to your project, recompile, and see
if this helps.

--
Alex
Alex Belo

Posts: 583
Registered: 10/8/06
Re: Why C++Builder programmers can not Fix/Build their own OpenCv Header/Lib? [Edit]
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 11, 2018 8:20 AM   in response to: roca robin in response to: roca robin
roca robin wrote:

[ilink32 Error] Error: Unresolved external
'cv::Algorithm::write(cv::FileStorage&) const' referenced from
F:\UNIT1.OBJ [ilink32 Error] Error: Unresolved external
'cv::Algorithm::read(cv::FileNode&)' referenced from F:\UNIT1.OBJ
...

As I already mentioned I never touched OpenCV so I can try to help only
from "common sense" point of view.

Full text searching in OpenCV 3.4.0 sources returns the only file

opencv-3.4.0\modules\core\src\algorithm.cpp

which implements Algorithm class:

namespace cv
{

Algorithm::Algorithm()
{
CV_TRACE_FUNCTION();
}

Algorithm::~Algorithm()
{
CV_TRACE_FUNCTION();
}

...

and so on.

But I can not find algorithm.h (and algorithm.cpp does not mention it).

So I suggest to add algorithm.cpp to your project, recompile, and see
if this helps.

--
Alex
roca robin

Posts: 99
Registered: 9/10/06
Re: Why C++Builder programmers can not Fix/Build their own OpenCv Header/Lib? [Edit]
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 12, 2018 11:36 AM   in response to: Alex Belo in response to: Alex Belo
I can only used opencv2.4.13.5 or opencv3.0.0 because opencv x86 libs can be converted,,

but while I convert(using coff2omf) the opencv_contribXXXX.lib but it's considered empty, the size is 512kb, face recognizer is using that lib but can not get/call the external function

here is the exact code I'm testing..complete project files and libs for the project test.

I hope you to get back soon with good results,
thank you for helping,

it's a .rar extfile with project test of facerecognizer,
http://ge.tt/2UF195o2

Alex Belo

Posts: 583
Registered: 10/8/06
Re: Why C++Builder programmers can not Fix/Build their own OpenCv Header/Lib? [Edit]
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 13, 2018 1:44 AM   in response to: roca robin in response to: roca robin
roca robin wrote:
I can only used opencv2.4.13.5 or opencv3.0.0 because opencv x86 libs can be converted

OK.

here is the exact code I'm testing

1) When I try compiling your example (in 10.2.2) with your cv version I have problems with some math functions. According to

Fix issue #8280: "fastmath.h related compile errors with Embarcadero C++ Builder 10.1"
https://github.com/ville-v/opencv/commit/1de10f9f86699355c727c59dab333d2c01803630

I had to replace

/*
#if defined __BORLANDC__
# include <fastmath.h>
#else
# include <math.h>
#endif
*/

to

#ifdef __cplusplus
# include <cmath>
#else
# ifdef __BORLANDC__
# include <fastmath.h>
# else
# include <math.h>
# endif
#endif

in in types_c.h. After that compilation finishes without errors.

2) I had a lot of linker errors with your libs so I had to import dlls with -a key:

implib -a opencv_contrib2413.lib opencv_contrib2413.dll

and so on. After that I have only following errors (just like you)

Unresolved
'cv::_interlockedExchangeAdd(int *, int)' referenced from MYFILE2.OBJ
'cv::Algorithm::write(cv::FileStorage&) const'
'cv::Algorithm::read(cv::FileNode&)'
'cv::FaceRecognizer::save(std::basic_string<char, std::char_traits<char>, std::allocator<char> >&) const'
'cv::FaceRecognizer::load(std::basic_string<char, std::char_traits<char>, std::allocator<char> >&)'
'cv::Algorithm::~Algorithm()'
'cv::fastFree(void *)'
'cv::_InputArray::_InputArray(const double&)'
'cv::createFisherFaceRecognizer(int, double)'

3) AFAIUI all dlls are compiled with MSVC and they export:
- classes (Algorithm, FaceRecognizer, etc) and theirs methods;
- functions in namespaces.

It is possible to use such exports only with the same compiler (more strictly with the same version of compiler) because generated binaries are compiler-specific. You can not pass an instance of class (like std::basic_string, for example) into dll because your (bcc32) and MSVCx.x binaries of class are not compatible (data layouts, tables of virtual methods, etc.).

In your case even name mangling is not the same (as expected because name mangling is compiler-specific too) so linker can not find even simple functions with POD parameters (like createFisherFaceRecognizer(int, double)) because decoration of names of exported namespaces are not the same.

In general, dlls must have standard C-interface (only POD parameters and simple functions like WinAPI has, not classes) to be usable with different compilers. So to use cv you can:

- move all sources in your application (don't use dlls);
- recompile dlls with your version of buider (not so simple I believe);
- create wrapper dll in VC which will export only standard API functions and call methods of MSVC dlls internally;
- ask for standardization of cv dlls. Why they export compiler-specific interfaces at all?

--
Alex
Alex Belo

Posts: 583
Registered: 10/8/06
Re: Why C++Builder programmers can not Fix/Build their own OpenCv Header/Lib? [Edit]
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 13, 2018 1:46 AM   in response to: roca robin in response to: roca robin
roca robin wrote:
I can only used opencv2.4.13.5 or opencv3.0.0 because opencv x86 libs can be converted

OK.

here is the exact code I'm testing

1) When I try compiling your example (in 10.2.2) with your cv version I have problems with some math functions. According to

Fix issue #8280: "fastmath.h related compile errors with Embarcadero C++ Builder 10.1"
https://github.com/ville-v/opencv/commit/1de10f9f86699355c727c59dab333d2c01803630

I had to replace

/*
#if defined __BORLANDC__
# include <fastmath.h>
#else
# include <math.h>
#endif
*/

to

#ifdef __cplusplus
# include <cmath>
#else
# ifdef __BORLANDC__
# include <fastmath.h>
# else
# include <math.h>
# endif
#endif

in in types_c.h. After that compilation finishes without errors.

2) I had a lot of linker errors with your libs so I had to import dlls with -a key:

implib -a opencv_contrib2413.lib opencv_contrib2413.dll

and so on. After that I have only following errors (just like you)

Unresolved
'cv::_interlockedExchangeAdd(int *, int)' referenced from MYFILE2.OBJ
'cv::Algorithm::write(cv::FileStorage&) const'
'cv::Algorithm::read(cv::FileNode&)'
'cv::FaceRecognizer::save(std::basic_string<char, std::char_traits<char>, std::allocator<char> >&) const'
'cv::FaceRecognizer::load(std::basic_string<char, std::char_traits<char>, std::allocator<char> >&)'
'cv::Algorithm::~Algorithm()'
'cv::fastFree(void *)'
'cv::_InputArray::_InputArray(const double&)'
'cv::createFisherFaceRecognizer(int, double)'

3) AFAIUI all dlls are compiled with MSVC and they export:
- classes (Algorithm, FaceRecognizer, etc) and theirs methods;
- functions in namespaces.

It is possible to use such exports only with the same compiler (more strictly with the same version of compiler) because generated binaries are compiler-specific. You can not pass an instance of class (like std::basic_string, for example) into dll because your (bcc32) and MSVCx.x binaries of class are not compatible (data layouts, tables of virtual methods, etc.).

In your case even name mangling is not the same (as expected because name mangling is compiler-specific too) so linker can not find even simple functions with POD parameters (like createFisherFaceRecognizer(int, double)) because decoration of names of exported namespaces are not the same.

In general, dlls must have standard C-interface (only POD parameters and simple functions like WinAPI has, not classes) to be usable with different compilers. So to use cv you can:

- move all sources in your application (don't use dlls);
- recompile dlls with your version of buider (not so simple I believe);
- create wrapper dll in VC which will export only standard API functions and call methods of MSVC dlls internally;
- ask for standardization of cv dlls. Why do they export compiler-specific interfaces at all?

--
Alex
Alex Belo

Posts: 583
Registered: 10/8/06
Re: Why C++Builder programmers can not Fix/Build their own OpenCv Header/Lib? [Edit]
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 13, 2018 1:52 AM   in response to: roca robin in response to: roca robin
roca robin wrote:
I can only used opencv2.4.13.5 or opencv3.0.0 because opencv x86 libs can be converted

OK.

here is the exact code I'm testing

1) When I try compiling your example (in 10.2.2) with your cv version I have problems with some math functions. According to

Fix issue #8280: "fastmath.h related compile errors with Embarcadero C++ Builder 10.1"
https://github.com/ville-v/opencv/commit/1de10f9f86699355c727c59dab333d2c01803630

I had to replace

/*
#if defined __BORLANDC__
# include <fastmath.h>
#else
# include <math.h>
#endif
*/

to

#ifdef __cplusplus
# include <cmath>
#else
# ifdef __BORLANDC__
# include <fastmath.h>
# else
# include <math.h>
# endif
#endif

in in types_c.h. After that compilation finishes without errors.

2) I had a lot of linker errors with your libs so I had to import dlls with -a key:

implib -a opencv_contrib2413.lib opencv_contrib2413.dll

and so on. After that I have only following errors (just like you)

Unresolved
'cv::_interlockedExchangeAdd(int *, int)' referenced from MYFILE2.OBJ
'cv::Algorithm::write(cv::FileStorage&) const'
'cv::Algorithm::read(cv::FileNode&)'
'cv::FaceRecognizer::save(std::basic_string<char, std::char_traits<char>, std::allocator<char> >&) const'
'cv::FaceRecognizer::load(std::basic_string<char, std::char_traits<char>, std::allocator<char> >&)'
'cv::Algorithm::~Algorithm()'
'cv::fastFree(void *)'
'cv::_InputArray::_InputArray(const double&)'
'cv::createFisherFaceRecognizer(int, double)'

3) AFAIUI all dlls are compiled with MSVC and they export:
- classes (Algorithm, FaceRecognizer, etc) and theirs methods;
- functions in namespaces.

It is possible to use such exports only with the same compiler (more strictly with the same version of compiler) because generated binaries are compiler-specific. You can not pass an instance of class (like std::basic_string, for example) into dll because your (bcc32) and MSVCx.x binaries of class are not compatible (data layouts, tables of virtual methods, etc.).

In your case even name mangling is not the same (as expected because name mangling is compiler-specific too) so linker can not find even simple functions with POD parameters (like createFisherFaceRecognizer(int, double)) because decoration of names of exported namespaces are not the same.

In general, dlls must have standard C-interface (only POD parameters and simple functions like WinAPI has, not classes) to be usable with different compilers. So to use cv you can:

- move all sources in your application (don't use dlls);
- recompile dlls with your version of buider (not so simple I believe);
- create wrapper dll in VC which will export only standard API functions and call methods of MSVC dlls internally;
- ask for standardization of cv dlls. Why do they export compiler-specific interfaces at all?

--
Alex
roca robin

Posts: 99
Registered: 9/10/06
Re: Why C++Builder programmers can not Fix/Build their own OpenCv Header/Lib? [Edit]
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 14, 2018 5:37 AM   in response to: Alex Belo in response to: Alex Belo
Alex Belo wrote:
In general, dlls must have standard C-interface (only POD parameters and simple functions like WinAPI has, not classes) to be usable with different compilers. So to use cv you can:

- move all sources in your application (don't use dlls);
- recompile dlls with your version of buider (not so simple I believe);
- create wrapper dll in VC which will export only standard API functions and call methods of MSVC dlls internally;
- ask for standardization of cv dlls. Why do they export compiler-specific interfaces at all?

- move all sources in your application (don't use dlls); ? I'm sorry I don't know the sources folder located, could you point me in.

great to have your comments,
thank you
Alex Belo

Posts: 583
Registered: 10/8/06
Re: Why C++Builder programmers can not Fix/Build their own OpenCv Header/Lib? [Edit]
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 15, 2018 6:45 AM   in response to: roca robin in response to: roca robin
roca robin wrote:

I'm sorry I don't know the sources folder located

Your distribution has not sources (headers only as interface to dlls).

AFAIUI you need to find sources of "contrib". There is repository on

https://github.com/opencv/opencv_contrib

(see modules\....\src for cpp sources) but I don't know if this version is compatible with your quite old 2.4 version.

After that try to add needed files to you project and compile...

--
Alex
roca robin

Posts: 99
Registered: 9/10/06
Re: Why C++Builder programmers can not Fix/Build their own OpenCv Header/Lib? [Edit]
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 15, 2018 6:57 AM   in response to: Alex Belo in response to: Alex Belo
Alex Belo wrote:
roca robin wrote:

I'm sorry I don't know the sources folder located

Your distribution has not sources (headers only as interface to dlls).

AFAIUI you need to find sources of "contrib". There is repository on

https://github.com/opencv/opencv_contrib

(see modules\....\src for cpp sources) but I don't know if this version is compatible with your quite old 2.4 version.

After that try to add needed files to you project and compile...

--
Alex

hi,
2.4 is old, but not 2.4.13 or 2.4.13.[5(revision)] is new released.
I can also used opencv3.0.0stable, thanks a lot for the comments and advices, glad you showed.
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02