HydrogenAudio

Hosted Forums => foobar2000 => Development - (fb2k) => Topic started by: Wizard on 2004-07-15 14:51:58

Title: Problem compiling plugin
Post by: Wizard on 2004-07-15 14:51:58
Hi!
I'm trying to build my first plugin. I use VC++ 6.0 SP6, I start a new project as Win32 Dynamic DLL, include projects foobar2000_sdk, component_client, pfc and utf8api, set all dependencies (my project->foobar2000_sdk & component_client, foobar2000_sdk->utf8api, utf8api->pfc), choose Multithreaded DLL as runtime library for Win32 release, but I get this:

Code: [Select]
--------------------Configuration: foo_billy - Win32 Release--------------------
Linking...
  Creating library Release/foo_billy.lib and object Release/foo_billy.exp
foobar2000_component_client.lib(component_client.obj) : error LNK2001: unresolved external symbol "public: static void __cdecl cfg_var::config_on_app_init(void)" (?config_on_app_init@cfg_var@@SAXXZ)
foobar2000_SDK.lib(service.obj) : error LNK2001: unresolved external symbol "public: static void __cdecl cfg_var::config_write_file(class cfg_var::write_config_callback *)" (?config_write_file@cfg_var@@SAXPAVwrite_config_callback@1@@Z)
foobar2000_SDK.lib(service.obj) : error LNK2001: unresolved external symbol "public: static void __cdecl cfg_var::config_read_file(void const *,unsigned int)" (?config_read_file@cfg_var@@SAXPBXI@Z)
../Release/foo_billy.dll : fatal error LNK1120: 3 unresolved externals
Error executing link.exe.

foo_billy.dll - 4 error(s), 0 warning(s)


Anybody knows what I'm doing wrong? 
Title: Problem compiling plugin
Post by: foosion on 2004-07-15 15:11:17
This looks like a missing dependency on pfc somewhere. Try comparing your dependcy setup with the one in the original foobar2000 SDK workspace. I'm currently not at home so I can't check, but I think the exact dependency setup was also mentioned on this forum at some point.
Title: Problem compiling plugin
Post by: Wizard on 2004-07-15 15:51:47
Quote
This looks like a missing dependency on pfc somewhere. Try comparing your dependcy setup with the one in the original foobar2000 SDK workspace. I'm currently not at home so I can't check, but I think the exact dependency setup was also mentioned on this forum at some point.
[a href="index.php?act=findpost&pid=226228"][{POST_SNAPBACK}][/a]


Thanks foosion, got it now! I also needed foobar2000_sdk->utf8api. Compilation works, but I get a warning:
LINK : warning LNK4089: all references to "utf8api.dll" discarded by /OPT:REF

What is that?
Title: Problem compiling plugin
Post by: janjan on 2004-07-15 15:54:34
Quote
...my project->foobar2000_sdk & component_client, ...


I always check foobar2000_sdk_helpers too, but I on't know if this is the reason for your error.

[edit:] too slow