mingw-cross-env-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Mingw-cross-env-list] Undefined Reference errors when linking


From: Mark Brand
Subject: Re: [Mingw-cross-env-list] Undefined Reference errors when linking
Date: Thu, 23 Feb 2012 20:58:50 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.2) Gecko/20120215 Firefox/10.0.2 SeaMonkey/2.7.2



Now I ned to convince ffmpeg to link with my program:
http://granjow.net/uploads/temp/make3.txt
What could I do here?


I don't anything useful in your make3.txt. It stops after 80%.

fixed. codepad.org did not allow more text ;)
I used VERBOSE=1, V=1 seemed to have no effect, or am I wrong?


/home/user/mingw-cross-env/usr/bin/i686-pc-mingw32-g++  -O3 -DNDEBUG    
-Wl,--whole-archive CMakeFiles/PhenoCam.dir/objects.a -Wl,--no-whole-archive  
-o PhenoCam.exe -Wl,--out-implib,libPhenoCam.dll.a 
-Wl,--major-image-version,0,--minor-image-version,0  libproject.a 
lib/libgeometry.a -Wl,-Bstatic -lQtGui -lpng -ljpeg -ltiff -lmng -Wl,-Bdynamic 
-limm32 -lwinmm -Wl,-Bstatic -lQtTest -lQtCore -lz -Wl,-Bdynamic -lws2_32 
-Wl,-Bstatic -lqjson -Wl,-Bdynamic -ltiff -llzma -lmng -llcms -lmp3lame -lspeex 
-lvorbis -lspeexdsp -lxvidcore -lx264 -lvpx -lwinmm core/libcorelib.a 
lib/libgeometry.a lib/libcsv.a -Wl,-Bstatic -lQtGui -lpng -ljpeg -ltiff -lmng 
-Wl,-Bdynamic -limm32 lib/libmemInfo.a lib/libvideo.a -lavformat -lavcodec 
-lavutil -lwinmm -Wl,-Bstatic -lQtTest -lQtCore -lz -Wl,-Bdynamic -lws2_32 
-lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid 
-lcomdlg32 -ladvapi32
lib/libvideo.a(readVideo.c.obj):readVideo.c:(.text+0x400): undefined reference 
to `_sws_getContext'
lib/libvideo.a(readVideo.c.obj):readVideo.c:(.text+0x47f): undefined reference 
to `_sws_freeContext'
lib/libvideo.a(readVideo.c.obj):readVideo.c:(.text+0x60d): undefined reference 
to `_sws_scale'
lib/libvideo.a(readVideo.c.obj):readVideo.c:(.text+0xa46): undefined reference 
to `_sws_getContext'
lib/libvideo.a(readVideo.c.obj):readVideo.c:(.text+0xa74): undefined reference 
to `_sws_scale'
lib/libvideo.a(writeVideo.c.obj):writeVideo.c:(.text+0x23a): undefined 
reference to `_sws_freeContext'
lib/libvideo.a(writeVideo.c.obj):writeVideo.c:(.text+0x290): undefined 
reference to `_sws_getContext'
lib/libvideo.a(writeVideo.c.obj):writeVideo.c:(.text+0x14ed): undefined 
reference to `_sws_scale'
lib/libvideo.a(writeVideo.c.obj):writeVideo.c:(.text+0x17bf): undefined 
reference to `_sws_freeContext'
/home/user/mingw-cross-env/usr/lib/gcc/i686-pc-mingw32/4.6.2/../../../../i686-pc-mingw32/lib/libavformat.a(avisynth.o):avisynth.c:(.text+0x6b):
 undefined reference to address@hidden'
/home/user/mingw-cross-env/usr/lib/gcc/i686-pc-mingw32/4.6.2/../../../../i686-pc-mingw32/lib/libavformat.a(avisynth.o):avisynth.c:(.text+0x88):
 undefined reference to address@hidden'
/home/user/mingw-cross-env/usr/lib/gcc/i686-pc-mingw32/4.6.2/../../../../i686-pc-mingw32/lib/libavformat.a(avisynth.o):avisynth.c:(.text+0x90):
 undefined reference to address@hidden'
<snip>

You need to link to the libraries that supply these symbols. Since ffmpeg doesn't come with pkg-config support, I'm afraid you have to manually figure out which libraries to link to.

You can get an idea of what you need by looking at the package dependency (DEP) list in ffmpeg.mk.

Start by adding "-lavfilter -lswscale". Then see what's still missing and add those libraries. Repeat until finished.

Mark




reply via email to

[Prev in Thread] Current Thread [Next in Thread]