Skip to main content

Topic: Error with the compiling foo_sample (Read 3357 times) previous topic - next topic

0 Members and 1 Guest are viewing this topic.
  • wahaha99
  • [*]
Error with the compiling foo_sample
I am trying to use VS 2008 to compile foo_sample and get many errors...

like this:

error LNK2001: unresolved external symbol  "public: static struct _GUID const contextmenu_groups::root" (?root@contextmenu_groups@@2U_GUID@@B)   contextmenu.obj   foo_sample

(Anothers are LNK2019)

I dont know how to fix it...
Please tell me if you can. Thanks.

Visual Studio 2008 + WTL 8.0 + Windows XP SP3 + .NET framework 3.5 SP1

  • aganders3
  • [*]
  • Developer
Error with the compiling foo_sample
Reply #1
Try out Zao's advice from this post:

http://www.hydrogenaudio.org/forums/index....st&p=644614

It could also be helpful if you posted the full output of the build log.

Error with the compiling foo_sample
Reply #2
I am trying to use VS 2008 to compile foo_sample and get many errors...

like this:

error LNK2001: unresolved external symbol  "public: static struct _GUID const contextmenu_groups::root" (?root@contextmenu_groups@@2U_GUID@@B)   contextmenu.obj   foo_sample

(Anothers are LNK2019)

I dont know how to fix it...
Please tell me if you can. Thanks.

Visual Studio 2008 + WTL 8.0 + Windows XP SP3 + .NET framework 3.5 SP1


Make sure that you have built each library it needs to link to individually before building foo_sample.

They are listed in the sdk-readme.

For each project that it links to add the Library folder as an included depency path in the foo_sample project and add the libary name to the list of dependencies to use.

That is,

Build these included projects:

foobar2000_SDK project
foobar2000_component_client
foobar2000_SDK_helpers
foobar2000_ATL_helpers

Add these libraries to Additional Dependencies under project->properties->linker->Input:

shared.lib;pfc.lib;foobar2000_SDK.lib;foobar2000_component_client.lib;foobar2000_sdk_helpers.lib;

Add your library folders where these are located (whatever the output of the VS build) to project->properties->linker->general->Additional Library Directories. For me it looks like this:

G:\Documents\Visual Studio 2012\foobar\foobar2000\shared\;G:\Documents\Visual Studio 2012\foobar\pfc\Debug\; G:\Documents\Visual Studio 2012\foobar\foobar2000\SDK\Debug\;G:\Documents\Visual Studio 2012\foobar\foobar2000\foobar2000_component_client\Debug\;G:\Documents\Visual Studio 2012\foobar\foobar2000\helpers\Debug\