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: Error with the compiling foo_sample (Read 4369 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

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


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\