Unresolved External Symbols
2013-07-12 07:05:55
Hello, I am new to foobar2000, and I am trying to write a simple plugin for myself. Right now I just have stub code to see if I can build it and run foobar2000 with it. However, when I build it I get linker errors. The errors are: [!--sizeo:2--][span style=\"font-size:10pt;line-height:100%\"][!--/sizeo--]unresolved external symbol "char const * __cdecl core_api::get_my_file_name(void)" (?get_my_file_name@core_api@@YAPBDXZ) unresolved external symbol "public: static struct _GUID const componentversion::class_guid" (?class_guid@componentversion@@2U_GUID@@B) unresolved external symbol "public: static class service_factory_base * service_factory_base::__internal__list" (?__internal__list@service_factory_base@@2PAV1@A) [/size] By process of elimination I found that these are coming from the DECLARE_COMPONENT_VERSION macro. I examined both foo_sample and foo_tutorial1 plus all of the online documentation that I could find, but I can't find out what I am missing. I am linking against libraries: pfc, foobar2000_SDK, foobar2000_component_client, and shared. I am using Microsoft Visual Studio 2010 Express. Any ideas? Thanks... My simple stub code is:[!--sizeo:1--][span style=\"font-size:8pt;line-height:100%\"][!--/sizeo--]#include "stdafx.h" // just has: #include "..\SDK\foobar2000.h" DECLARE_COMPONENT_VERSION ( "Playlist Item Filter", "1.0", "Sorts the incoming playlist items by track number." ) class playlist_incoming_item_filter_custom : public playlist_incoming_item_filter { public: bool filter_items(metadb_handle_list_cref in, metadb_handle_list_ref out) { console::print("My filter_items function here..."); t_size count = in.get_count(); out.remove_all(); if (count > 0) { out.add_items(in); } return (count > 0) ? true : false; } };[/size]