2012/12/10 Kyle Schwarz <kshawk...@gmail.com>

> I'm trying to compile an example program that uses openjpeg 2.0.0 and am
> getting an undefined reference to `opj_version'.
>
> I'm using the latest MinGW-w64 svn along with gcc 4.7.2.
>
> The example program is:
> extern int opj_version();
> int main(void){ opj_version(); }
>
> I'm compiling it with: i686-w64-mingw32-gcc ./test-openjpeg.c -lopenjp2
>
> I get the error:
> /tmp/cci01N0F.o:test-openjpeg.c:(.text+0xc): undefined reference to
> `opj_version'
> collect2: error: ld returned 1 exit status
>
> When running: i686-w64-mingw32-nm
>
> '/home/kyle/software/ffmpeg/pkgs/openjpeg/openjpeg-2.0.0-win32/lib/libopenjp2.a'
> | grep opj_version
>
> I get the output:
> 00000228 T _opj_version@0
>
> I also posted some information here:
> <http://code.google.com/p/openjpeg/issues/detail?id=200>
>
> Does anyone know why I might be having this issue? I can provide any
> further details.
>

Are you using the binary package on their website?

I just compiled openjpeg with both my x64 and x86 compilers and I get no
undefined references. Running "nm" on the produced libopenjp2.dll.a gives
me:
00000000 I __imp__opj_version@0
00000000 T _opj_version@0

If you built statically, the first will be absent.

Try building openjpeg yourself and see if the issue is still present.

Ruben

>
>
> ------------------------------------------------------------------------------
> LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
> Remotely access PCs and mobile devices and provide instant support
> Improve your efficiency, and focus on delivering more value-add services
> Discover what IT Professionals Know. Rescue delivers
> http://p.sf.net/sfu/logmein_12329d2d
> _______________________________________________
> Mingw-w64-public mailing list
> Mingw-w64-public@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
>
------------------------------------------------------------------------------
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
_______________________________________________
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to