Help - Search - Members - Calendar
Full Version: Some components need nothing, some need libraries
Hydrogenaudio Forums > Hosted Forums > foobar2000 > Development - (fb2k)
Squeller
Hi,

you know some components need .net runtime, some need v(b|c)[0-9] runtime dlls, some need nothing. I HATE SUCH DEPENDENCIES. I've had enough problems when porting an existing fb2k to another w2k machine, plugins didn't work because they needed vbX vcX runtimes or even .net. Can someone explain why developers "choose" such dependencies, why are they doing this? In case of the thread about foo_dsp_soundtouch, the developer didn't even know about such dependencies. Is there a kind of "trap" in ms ide's? I think the developers should avoid unnecessary dependencies as much as possible.
Thx.
david_dl
Developers use libraries because they contain code that developer can use; ie. he doesn't have to reinvent the wheel. Yes, by default MS IDEs will set your project to dynamically link to the CRT, however this is easily changed. As for other dependancies, such as .Net, libpng etc, developers use these because they provide useful functionality. Again, most libraries can be statically linked, and IMHO .NET isn't at all appropriate for a foobar2000 plugin, as it means the CLR has to be loaded for foobar.
Squeller
About .net I'm not sure, I remember there was one plugin config page within the preferences, which was loading pretty slow.
But e.g. there's one java based gui in one Plugin. I'm avoiding it because of java bloat- and slowliness of the gui.
foosion
The C/C++ runtime implements basic language features and standard library functions. This runtime can be linked either dynamically - resulting in a dependency on a particular DLL - or statically, which results in runtime code being included in the component itself. Dynamic linking is theoretically nicer, since it allows components (even different applications) to share a DLL resulting in overall reduced memory usage, so Microsoft prefers that mode and makes it the standard for newly created projects. However, the (static) libraries from the foobar2000 SDK that you need to link to create a component are set to linking the runtime statically (for various reasons), so you will usually get a linker warning about incompatible runtime libraries. Of course you can choose to ignore that and release the component anyway - perhaps without even telling people that it needs a runtime they might need to install, though I don't think either part is a good idea.

I have yet to see a component that requires Visual Basic runtimes. Apart from that, it is not guaranteed that you can copy arbitrary software to another machine and expect it to work.

Regarding .NET, I think only foo_prettypop really needs that, though there is a lot of confusion from users (and developers) who don't know the difference between the .NET CLR and VC8 runtimes.
Squeller
QUOTE(foosion @ Jun 30 2006, 03:03) *
I have yet to see a component that requires Visual Basic runtimes. Apart from that, it is not guaranteed that you can copy arbitrary software to another machine and expect it to work.
Erm. No, but I expect it to work this way, as fb2k does, after install, not leave relevant traces in windows registry: Install fb2k minimally with the installer, replace the complete fb2k program folder by another one, and of course putting the cfg to either %appdata%\foobar2000 or Program folder...

And I've had massive problems with a component on a w2k machine (I think it was foo_uie_explorer). I wasn't even able to find out about the dependency with the dependency walker. I installed almost any vc runtime library wink.gif Pure PITA. This is why I think statically linked programs cause less pain...
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.