Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Problem compiling plugin (Read 3374 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Problem compiling plugin

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? 

Problem compiling plugin

Reply #1
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.

Problem compiling plugin

Reply #2
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?

Problem compiling plugin

Reply #3
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