IPB

Welcome Guest ( Log In | Register )

> foobar2000 Development Forum Rules

This forum is for developer discussions only. If you have a problem / bug report / idea / feature request that isn't related to foobar2000 SDK, post it in an appropiate forum instead - tech support questions go to support forum, everything else goes to general forum.
All non-developer posts on this forum will be removed. Continued abuse of this forum will result in admin actions (warnings, account suspension).

 
Reply to this topicStart new topic
Unresolved External Symbols, Linker errors from DECLARE_COMPONENT_VERSION
retierney
post Jul 12 2013, 07:05
Post #1





Group: Members
Posts: 7
Joined: 12-April 13
From: USA
Member No.: 107622



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:

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)


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:

CODE

#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;
}
};



Go to the top of the page
+Quote Post
fbuser
post Jul 12 2013, 13:21
Post #2





Group: Developer
Posts: 683
Joined: 26-September 07
Member No.: 47369



The first missing symbol belongs to foobar2000_component_client, the other two belong to foobar2000_SDK. So, you're obviously not linking against these librariers. You should check your project settings.
Go to the top of the page
+Quote Post
retierney
post Jul 12 2013, 15:46
Post #3





Group: Members
Posts: 7
Joined: 12-April 13
From: USA
Member No.: 107622



QUOTE (fbuser @ Jul 12 2013, 14:21) *
The first missing symbol belongs to foobar2000_component_client, the other two belong to foobar2000_SDK. So, you're obviously not linking against these librariers. You should check your project settings.


Oops! Apparently I didn't look close enough at foo_tutorial1 to see how I set up the additional link libs and lib paths. Egg on face and sorry...

Thank you very much...
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 2nd October 2014 - 05:35