Error when including highgui.hpp in Xcode proyect (Bug #1791)
Description
I receive a compiler error when I include the highgui.hpp
file in my project using Xcode 3.2.6. The error that is given is:
/opt/local/include/opencv2/core/core.hpp:428:0 /opt/local/include/opencv2/core/core.hpp:428: error: statement-expressions are allowed only inside functions
On the other hand when I use the file highgui_c.h
I receive a EXEC_BAD_ACCES
signal when I try to use the cvCreateVideoWriter
. The code is below:
1(bool) testRecord{
2 CvCapture *c = cvCreateCameraCapture(0);
3
4 int isColor = 1;
5 int fps = 30; // or 30
6 int frameW = 640; // 744 for firewire cameras
7 int frameH = 480; // 480 for firewire cameras
8 CvVideoWriter *w = cvCreateVideoWriter("~/Desktop/out.mov",CV_FOURCC('M','J','P','G'),fps,cvSize(frameW,frameH),isColor);
9
10 IplImage *f = 0;
11 while (1) {
12 f = cvQueryFrame(c);
13 cvWriteFrame(w, f); // add the frame to the file
14 cvWaitKey(25);
15 }
16
17 cvReleaseVideoWriter(&w);
18 cvReleaseCapture(&c);
19
20 NSLog(@"Terminamos");
21
22 return 0;
23}
Associated revisions
Merge pull request #1791 from prattmic:limit
History
Updated by Andrey Kamaev almost 13 years ago
- Description changed from I receive a compilator error when I include the highgui.hpp file in my proyec... to I receive a compiler error when I include the @highgui.hpp@ file in my projec... More
- Category set to build/install
Updated by Daniel Suárez about 12 years ago
This petition can be closed It was resolved in other petition
Updated by Kirill Kornyakov about 12 years ago
Daniel, could you please provide a link to either ticket or pull request or something?
- Affected version set to 2.4.0
- Status changed from Open to Cancelled