this works in 3.x (which I'm going to upload in a few weeks), so this has been fixed at some point.
** Changed in: opencv (Ubuntu) Status: Confirmed => Fix Released -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to opencv in Ubuntu. https://bugs.launchpad.net/bugs/886482 Title: opencv-doc c examples don't build Status in opencv package in Ubuntu: Fix Released Bug description: The opencv-doc package includes example source files for opencv, installed to /usr/share/doc/opencv-doc/examples/c. These fail to build at the linking stage. For instance: $ cp /usr/share/doc/opencv-doc/examples/c/edge.c /tmp $ cd /tmp $ gcc $(pkg-config --cflags --libs opencv) edge.c -o edge /tmp/cc9ghzMY.o: In function `cvRound': edge.c:(.text+0x19): undefined reference to `lrint' /tmp/cc9ghzMY.o: In function `cvDecRefData': edge.c:(.text+0xa5a): undefined reference to `cvFree_' edge.c:(.text+0xacb): undefined reference to `cvFree_' /tmp/cc9ghzMY.o: In function `cvGetRow': edge.c:(.text+0xbc1): undefined reference to `cvGetRows' /tmp/cc9ghzMY.o: In function `cvGetCol': edge.c:(.text+0xbec): undefined reference to `cvGetCols' /tmp/cc9ghzMY.o: In function `cvReleaseMatND': edge.c:(.text+0xbff): undefined reference to `cvReleaseMat' /tmp/cc9ghzMY.o: In function `cvSubS': edge.c:(.text+0xd1f): undefined reference to `cvAddS' /tmp/cc9ghzMY.o: In function `cvCloneSeq': edge.c:(.text+0xd6d): undefined reference to `cvSeqSlice' /tmp/cc9ghzMY.o: In function `cvSetNew': edge.c:(.text+0xdcc): undefined reference to `cvSetAdd' /tmp/cc9ghzMY.o: In function `cvGetSetElem': edge.c:(.text+0xe5f): undefined reference to `cvGetSeqElem' /tmp/cc9ghzMY.o: In function `cvEllipseBox': edge.c:(.text+0xf5f): undefined reference to `cvEllipse' /tmp/cc9ghzMY.o: In function `cvFont': edge.c:(.text+0xfa9): undefined reference to `cvInitFont' /tmp/cc9ghzMY.o: In function `cvReadIntByName': edge.c:(.text+0x1057): undefined reference to `cvGetFileNodeByName' /tmp/cc9ghzMY.o: In function `cvReadRealByName': edge.c:(.text+0x10e8): undefined reference to `cvGetFileNodeByName' /tmp/cc9ghzMY.o: In function `cvReadStringByName': edge.c:(.text+0x1142): undefined reference to `cvGetFileNodeByName' /tmp/cc9ghzMY.o: In function `cvReadByName': edge.c:(.text+0x1172): undefined reference to `cvGetFileNodeByName' edge.c:(.text+0x1188): undefined reference to `cvRead' /tmp/cc9ghzMY.o: In function `cvCreateSubdivDelaunay2D': edge.c:(.text+0x1287): undefined reference to `cvCreateSubdiv2D' edge.c:(.text+0x12b1): undefined reference to `cvInitSubdivDelaunay2D' /tmp/cc9ghzMY.o: In function `cvCalcHist': edge.c:(.text+0x13c6): undefined reference to `cvCalcArrHist' /tmp/cc9ghzMY.o: In function `on_trackbar': edge.c:(.text+0x14ea): undefined reference to `cvSmooth' edge.c:(.text+0x1501): undefined reference to `cvNot' edge.c:(.text+0x1548): undefined reference to `cvCanny' edge.c:(.text+0x1555): undefined reference to `cvSetZero' edge.c:(.text+0x1576): undefined reference to `cvCopy' edge.c:(.text+0x158b): undefined reference to `cvShowImage' /tmp/cc9ghzMY.o: In function `main': edge.c:(.text+0x15c8): undefined reference to `cvLoadImage' edge.c:(.text+0x1628): undefined reference to `cvCreateImage' edge.c:(.text+0x1675): undefined reference to `cvCreateImage' edge.c:(.text+0x16c2): undefined reference to `cvCreateImage' edge.c:(.text+0x16e6): undefined reference to `cvCvtColor' edge.c:(.text+0x16fa): undefined reference to `cvNamedWindow' edge.c:(.text+0x1726): undefined reference to `cvCreateTrackbar' edge.c:(.text+0x173e): undefined reference to `cvWaitKey' edge.c:(.text+0x174a): undefined reference to `cvReleaseImage' edge.c:(.text+0x1756): undefined reference to `cvReleaseImage' edge.c:(.text+0x1762): undefined reference to `cvReleaseImage' edge.c:(.text+0x176e): undefined reference to `cvDestroyWindow' collect2: ld returned 1 exit status ProblemType: Bug DistroRelease: Ubuntu 11.10 Package: opencv-doc 2.1.0-7build1 ProcVersionSignature: Ubuntu 3.0.0-12.20-generic 3.0.4 Uname: Linux 3.0.0-12-generic i686 ApportVersion: 1.23-0ubuntu3 Architecture: i386 Date: Sat Nov 5 09:37:47 2011 Dependencies: InstallationMedia: Ubuntu 11.10 "Oneiric Ocelot" - Release i386 (20111012) PackageArchitecture: all ProcEnviron: LANGUAGE=en_GB:en PATH=(custom, no user) LANG=en_GB.UTF-8 SHELL=/bin/zsh SourcePackage: opencv UpgradeStatus: No upgrade log present (probably fresh install) To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/opencv/+bug/886482/+subscriptions -- Mailing list: https://launchpad.net/~touch-packages Post to : touch-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~touch-packages More help : https://help.launchpad.net/ListHelp