Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Developing U++ » U++ Developers corner » Disable library functions
Disable library functions [message #28279] Wed, 25 August 2010 15:15 Go to next message
koldo is currently offline  koldo
Messages: 3355
Registered: August 2008
Senior Veteran
Hello all

I get errors linking avcodec.lib (ffmpeg) into a GUI application.

z.lib(inflate.obj) : error LNK2005: _inflateReset already defined in avcodec.lib(avcodec-52.dll)
...


It seems the reason is that zlib is included in Core and also in avcodec.lib.

It is the same with MSC and with MinGW.

Do you know if it is possible to disable functions in a linked library, or at least to hold those functions usable only inside that library?



Best regards
Iñaki
Re: Disable library functions [message #28284 is a reply to message #28279] Wed, 25 August 2010 17:49 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3355
Registered: August 2008
Senior Veteran
Hello all

Now it works...

To avoid duplicating zlib, I have removed avcodec from library list, so I have had to include it as a dll, linking it to the program inserting the functions in a .dli file Smile.

I will see if it works in Linux.


Best regards
Iñaki
Re: Disable library functions [message #28514 is a reply to message #28284] Sat, 04 September 2010 23:34 Go to previous message
koldo is currently offline  koldo
Messages: 3355
Registered: August 2008
Senior Veteran
Hello all

As it was hard to maintain avcodec.dli because the avcodec.dll has lots of functions, I have used some "ugly" linker options that work:

- MSC: /FORCE:MULTIPLE
- GCC/MinGW: -Wl,--allow-multiple-definition

With these options the linker uses the zlib functions included in plugin/z package, instead of the functions in avcodec.dll.


Best regards
Iñaki
Previous Topic: JavaScriptCore
Next Topic: how to building UPP to one dll?
Goto Forum:
  


Current Time: Fri Mar 29 11:13:03 CET 2024

Total time taken to generate the page: 0.01127 seconds