I want to copy some functions from OpenCV library to my embedded application. Rewriting them to use standard data structures is really painful, so I tried the following:
bfin-elf-g++ -c cvcalibration.cpp `pkg-config --cflags opencv`
I did not get any missing header errors but got lots of
error: expected unqualified-id before numeric constant
for lines like
CvMat _U = cvMat( 3, 3, CV_64F, U );
and error: invalid lvalue in unary ‘&’
for lines like
cvGEMM( &_U, &_V, 1, 0, 0, &_R, CV_GEMM_A_T );
where _U, _V etc. are previously defined as CvMAt variables.(got no compiler errors about CvMat not being defined)
I'm using bfin-elf-g++ (GCC) 4.1.2 (ADI svn) and currently my implementation is bare metal, i.e. without any operating system.
Any advice? I am only interested in several functions in this file, not the whole package.