Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Checkout does not build revision 96 #2

Open
GoogleCodeExporter opened this issue Mar 14, 2015 · 1 comment
Open

Checkout does not build revision 96 #2

GoogleCodeExporter opened this issue Mar 14, 2015 · 1 comment

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. cd src; make
2.
3.

What is the expected output? What do you see instead?
Expect it to compile. Fails with following error:
g++ `pkg-config --cflags opencv` -I../include -I. -o cvhaartraining.o -c 
cvhaartraining.cpp
cvhaartraining.cpp: In function ‘int 
icvGetHaarTrainingDataFromVec(CvHaarTrainingData*, int, int, 
CvIntHaarClassifier*, const char*, int*)’:
cvhaartraining.cpp:1818:50: error: ‘int 
icvGetHaarTrainingDataFromVec(CvHaarTrainingData*, int, int, 
CvIntHaarClassifier*, const char*, int*)’ was declared ‘extern’ and later 
‘static’ [-fpermissive]
In file included from cvhaartraining.cpp:49:0:
./_cvhaartraining.h:354:5: error: previous declaration of ‘int 
icvGetHaarTrainingDataFromVec(CvHaarTrainingData*, int, int, 
CvIntHaarClassifier*, const char*, int*)’ [-fpermissive]
make: *** [cvhaartraining.o] Error 1


What version of the product are you using? On what operating system?
Built against OpenCV 2.4.2, Ubuntu 13.04, Kernel 3.8.0-27-generic

Please provide any additional information below.
FIX: Remove line 1814 from cvhaartraining.cpp

Original issue reported on code.google.com by [email protected] on 23 Aug 2013 at 8:44

@GoogleCodeExporter
Copy link
Author

Checkout build revision 96

OpenCV Version: 2.4.4 with python 2.7.5
OS: Mac OS X 10.7.5

When trying to make mergvec

$ g++ `pkg-config --libs --cflags opencv` -I. -o mergevec mergevec.cpp 
cvboost.cpp cvcommon.cpp cvsamples.cpp cvhaarclassifier.cpp cvhaartraining.cpp

the above command produces the error

cvhaartraining.cpp: In function ‘int 
icvGetHaarTrainingDataFromVec(CvHaarTrainingData*, int, int, 
CvIntHaarClassifier*, const char*, int*)’:
cvhaartraining.cpp:1818: error: ‘int 
icvGetHaarTrainingDataFromVec(CvHaarTrainingData*, int, int, 
CvIntHaarClassifier*, const char*, int*)’ was declared ‘extern’ and later 
‘static’
/opt/local/include/opencv/_cvhaartraining.h:357: error: previous declaration of 
‘int icvGetHaarTrainingDataFromVec(CvHaarTrainingData*, int, int, 
CvIntHaarClassifier*, const char*, int*)’

Line 1814 in cvhaartraining.cpp declares `int icvGetHaarTrainingDataFromVec( 
CvHaarTrainingData* data, int first, int count, CvIntHaarClassifier* cascade, 
const char* filename, int* consumed )` as `static` 

Removing line 1814 in cvhaartraining.cpp fixed the issue 

:)

Original comment by [email protected] on 6 Nov 2013 at 11:33

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant