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

Build error - taking address of temporary #2

Closed
seberm opened this issue Feb 21, 2014 · 2 comments
Closed

Build error - taking address of temporary #2

seberm opened this issue Feb 21, 2014 · 2 comments
Labels

Comments

@seberm
Copy link

seberm commented Feb 21, 2014

Hi.
Everytime I want to build this library I get these errors:

[ 25%] Building CXX object CMakeFiles/bgs.dir/package_bgs/pt/PixelBasedAdaptiveSegmenter.cpp.o
[ 26%] Building CXX object CMakeFiles/bgs.dir/package_bgs/sjn/SJN_MultiCueBGS.cpp.o
/home/seberm/BTSync/StableData/Compile/bgslibrary/src/bgslibrary-git/package_bgs/sjn/SJN_MultiCueBGS.cpp: In member function ‘virtual void SJN_MultiCueBGS::process(const cv::Mat&, cv::Mat&, cv::Mat&)’:
/home/seberm/BTSync/StableData/Compile/bgslibrary/src/bgslibrary-git/package_bgs/sjn/SJN_MultiCueBGS.cpp:80:39: error: taking address of temporary [-fpermissive]
  IplImage* frame = &IplImage(img_input);
                                       ^
/home/seberm/BTSync/StableData/Compile/bgslibrary/src/bgslibrary-git/package_bgs/sjn/SJN_MultiCueBGS.cpp: In member function ‘void SJN_MultiCueBGS::GaussianFiltering(IplImage*, uchar***)’:
/home/seberm/BTSync/StableData/Compile/bgslibrary/src/bgslibrary-git/package_bgs/sjn/SJN_MultiCueBGS.cpp:526:37: error: taking address of temporary [-fpermissive]
   IplImage* img = &IplImage(temp_img);
                                     ^
CMakeFiles/bgs.dir/build.make:540: recipe for target 'CMakeFiles/bgs.dir/package_bgs/sjn/SJN_MultiCueBGS.cpp.o' failed
make[2]: *** [CMakeFiles/bgs.dir/package_bgs/sjn/SJN_MultiCueBGS.cpp.o] Error 1
CMakeFiles/Makefile2:63: recipe for target 'CMakeFiles/bgs.dir/all' failed
make[1]: *** [CMakeFiles/bgs.dir/all] Error 2
Makefile:106: recipe for target 'all' failed
make: *** [all] Error 2

OS and dependencies:

$ uname -a
Linux daisy 3.12.9-2-ARCH #1 SMP PREEMPT Fri Jan 31 10:22:54 CET 2014 x86_64 GNU/Linux
opencv 2.4.8-1 [installed]
cmake 2.8.12.2-1 [installed]

I'm trying to build revision e29bd0c1.

What I should do? Do I need any other dependency?

@andrewssobral
Copy link
Owner

Hi,
Thank you for the notification.
I fixed this issue, please checkout the latest branch.
Best regards

@seberm
Copy link
Author

seberm commented Feb 24, 2014

Works like a charm :). Thanks a lot.

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

No branches or pull requests

2 participants