views:

81

answers:

2

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.

A: 

I'm not familiar with the tools you use, but could it be that the problem is that cvMat is not defined? (CvMat is defined, but cvMat?)

Daniyar
A: 

got the cause, the toolchain uses somewhat old #define's in ctypes.h which define _L, _M, _U etc. to be some constant integers. #undef'ing these values seem to work.

Atilla Filiz