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: Build add-in with VS2012 or VS2013? (Read 4036 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Build add-in with VS2012 or VS2013?

I took the tutorial and tried to adapt it to VS2012.  I have 2010 (and access to 2013 if need be), but I need 2012+ because I need some C++11x extensions for a project. 

Here's what I've done so far (adapting the foo_tutorial project). 

1)  Launch in VS
2)  Remove all projects from references due to them being missing
3)  Add all projects in the SDK + shared.lib to the project (Add Existing Item)
4)  Updated shared.h to point to ATLHelpers.h instead of tmschema.h
5)  Bring over .zip of WTL and update atlhelpers.h to point to proper WTL libraries (atlapp.h, atlctrls.h, atlcrack.h)
6)  Attempt to build

RESULTS:  Lots of compiler errors for missing objects:
\foo_tutorial1\foobar2000\helpers\input_helpers.h(4): error C2065: 'service_ptr_t' : undeclared identifier
\foo_tutorial1\foobar2000\helpers\input_helpers.h(4): error C2065: 'file' : undeclared identifier
\foo_tutorial1\foobar2000\helpers\input_helpers.h(4): error C2065: 'p_file' : undeclared identifier
\foo_tutorial1\foobar2000\helpers\input_helpers.h(4): error C2059: syntax error : 'const'
etc.

I believe this is because the projects have been included, but not properly referenced?  However, when I go to foo_tutorial1's properties and try to add references, it's empty. 

Has anyone been able to build in 2012 or 2013?  Am I missing a build step or include?

Thanks!


EDIT:

I'm in the same place, but I approached the build problem differently.  I got a project building in VS2010, then imported it into VS2012.  I updated shared.h and ATLHelpers.h as described.  However, this way, it preserved all project references (except foobar2000_ATL_helpers.csproj, which I don't think would cause missing service_ptr_t errors, which is part of the foobar2000 SDK I thought?)

EDIT 2:

Managed to include foobar2000_ATL_helpers as a VS2010 project (I'm NOT familiar with VS projects...can you tell?) and update the reference.  Same problem.  Is this a build order problem?

Build add-in with VS2012 or VS2013?

Reply #1
I sucessfully compiled foo_tutorial1 on Visual Studio 2012 using the following steps.
  • Unpack the foobar2000 SDK.
  • Unpack the foo_tutorial1 source code inside the foobar2000 directory. The foo_tutorial1 directory should be next to the SDK, helpers, foo_sample, ... directories.
  • Launch Visual Studio 2012.
  • Open foo_tutorial1.vc10express.sln.
  • Choose "Update" when asked whether the compiler toolset should be updated.
  • Replace the <tmschema.h> include with <vssym32.h> in shared.h.
  • Add a reference to pfc to the foo_tutorial1 project.
  • Build solution.

Build add-in with VS2012 or VS2013?

Reply #2
Thanks, Foosion!  That helped a lot.  There was 1 more change that was needed, but it's because I never mentioned I was on Windows Blue (8.1).

Update helpers\CPowerRequest.h line 1 to be
Code: [Select]
#if (_WIN32_WINNT < _WIN32_WINNT_WINBLUE) && !defined(_MINWINBASE)

instead of
Code: [Select]
#if (_WIN32_WINNT < _WIN32_WINNT_WIN7) && !defined(_MINWINBASE)