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: foo_sample.sln for dummies (Read 4816 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

foo_sample.sln for dummies

I'm trying to build the sample solution bundled with the 2017 SDK, but I get the following warnings:

Code: [Select]
1>j:\foobar2000\development\sdk\foobar2000\atlhelpers\atlhelperslean.h(12): fatal error C1083: Cannot open include file: 'atlapp.h': No such file or directory
1>Done building project "foobar2000_ATL_helpers.vcxproj" -- FAILED.
Code: [Select]
6>j:\foobar2000\development\sdk\foobar2000\atlhelpers\atlhelperslean.h(12): fatal error C1083: Cannot open include file: 'atlapp.h': No such file or directory
6>Done building project "foo_sample.vcxproj" -- FAILED.

The same problem has been reported by another user who apparently solved it by following these crystal clear instructions.
I did the same, but nothing changed: i get the exact same warnings and failed to build the project.

I'm new to C++ and visual studio, but everytime I resolve to get into it, I'm discouraged by the gap between tutorials and reality.
Any help to move on would be much appreciated.
I'm late

Re: foo_sample.sln for dummies

Reply #1
Once you have downloaded and extracted WTL somewhere I recommend adding the WTL include directory to Visual Studio's include directory listing permanently. You can do in properties dialog of Microsoft.Cpp.Win32.user you can open in Property Manager.




Re: foo_sample.sln for dummies

Reply #2
I did the same

Try to clear the solution, then rebuild.
If it won't help then you should describe what you did exactly ( I hope you didn't just wrote "Z:\WTL91_5321_Final\Include;" ?)


Re: foo_sample.sln for dummies

Reply #3
I did the same, but nothing changed
Then you did definitely something wrong. What is the path where you extracted the WTL archive and what is the setting for the include directories? It would be the best, if you would post screen shots with the relevant information here.

 

Re: foo_sample.sln for dummies

Reply #4
WTL is available via vcpkg so you may find it easier to use that to install it: https://github.com/Microsoft/vcpkg

(Note that it installs WTL 10 and not WTL 9.1; I don't know what versions of WTL the foobar2000 SDK is compatible with as I don't use the WTL parts.)
.

Re: foo_sample.sln for dummies

Reply #5
Try to clear the solution, then rebuild.
If it won't help then you should describe what you did exactly ( I hope you didn't just wrote "Z:\WTL91_5321_Final\Include;" ?)

So, here's what I'm doing, step by step, as detailed as I can:

  • download the SDK-2018-03-06.zip
  • extract the content of the SDK-2018-03-06.zip to the "J:\foobar2000\development\SDK-2018-03-06" directory***
  • download the WTL10_7336.zip from here
  • extract the content of the WTL10_7336.zip to the "J:\foobar2000\development\WTL10_7336" directory
  • launch the WTL App Wizard Set Up and install the app wizard on visual studio 2017
  • open the foo_sample.sln in visual studio 2017
  • open the foo_sample Property Pages window and add the "J:\foobar2000\development\WTL10_7336\Include" path to the included VC++ directories as shown in the attached picture
  • open the foobar2000_ATL_helpers Property Pages window and repeat the above step
  • click on the Build Solution button in the Build menu
  • sadly read the following warnings in the output window:
    Code: [Select]
    1>j:\foobar2000\development\sdk-2018-03-06\foobar2000\atlhelpers\atlhelperslean.h(12): fatal error C1083: Cannot open include file: 'atlapp.h': No such file or directory
    1>Done building project "foobar2000_ATL_helpers.vcxproj" -- FAILED.

    [...]

    6>j:\foobar2000\development\sdk-2018-03-06\foobar2000\atlhelpers\atlhelperslean.h(12): fatal error C1083: Cannot open include file: 'atlapp.h': No such file or directory
    6>Done building project "foo_sample.vcxproj" -- FAILED.
    ========== Build: 4 succeeded, 2 failed, 0 up-to-date, 0 skipped ==========





___________________________________________________________________
***The J:\foobar2000 directory is not the executable directory, it is just a folder were I keep all foobar2000 related stuff
I'm late

Re: foo_sample.sln for dummies

Reply #6
Once you have downloaded and extracted WTL somewhere I recommend adding the WTL include directory to Visual Studio's include directory listing permanently. You can do in properties dialog of Microsoft.Cpp.Win32.user you can open in Property Manager.

Thanks, I'm going to try this immediately.


I'm late

Re: foo_sample.sln for dummies

Reply #7
10. sadly read the following warnings in the output window

Well, all I can think of is:  maybe you changed "Include Directories" settings for Release configuration, but then you tried to build Debug configuration.

Re: foo_sample.sln for dummies

Reply #8
Well, all I can think of is:  maybe you changed "Include Directories" settings for Release configuration, but then you tried to build Debug configuration.

You nailed it. I erroneously believed the Debug->Start Debugging command to be for the debug configuration. I changed the settings in the Configuration Manager dialog and rebuilt the solution. Now the atlapp.h warnings are gone, but I got a new one:
Code: [Select]
6>foo_sample.rc(10): fatal error RC1015: cannot open include file 'afxres.h'.
6>
6>Done building project "foo_sample.vcxproj" -- FAILED.
========== Rebuild All: 5 succeeded, 1 failed, 0 skipped ==========

N.B.
I can't find an afxres.h file in neither of the SDK or WTL folders.
I'm late

Re: foo_sample.sln for dummies

Reply #9
Well, all I can think of is:  maybe you changed "Include Directories" settings for Release configuration, but then you tried to build Debug configuration.
You nailed it. I erroneously believed the Debug->Start Debugging command to be for the debug configuration. I changed the settings in the Configuration Manager dialog and rebuilt the solution. Now the atlapp.h warnings are gone,
So you didn't add the WTL include directory in the Property Manager. It would have affected both debug and release builds not only for this sample project but for all future projects too.

I got a new one:
Code: [Select]
6>foo_sample.rc(10): fatal error RC1015: cannot open include file 'afxres.h'.
6>
6>Done building project "foo_sample.vcxproj" -- FAILED.
========== Rebuild All: 5 succeeded, 1 failed, 0 skipped ==========

N.B.
I can't find an afxres.h file in neither of the SDK or WTL folders.
You need to install Visual C++ ATL and MFC for x86 and x64 in Visual Studio installer's "Individual Components" list. Or edit the resource filr foo_sample.rc to not require the extra header.

I attached edited version here:

Re: foo_sample.sln for dummies

Reply #10
You can check out VGMStream on Github, it also includes files which automate the full building process, which are there mainly for the buildbot.

The projects there all include the WTL include path directly from each relevant project, as do all of my other more recently updated components. I no longer resort to using global paths.

Some people may love these build scripts' impact on servers, as they download fresh copies of entirely everything, including the foobar2000 SDK, every time a commit is pushed to the repository. All automatically.

Re: foo_sample.sln for dummies

Reply #11
Well, all I can think of is:  maybe you changed "Include Directories" settings for Release configuration, but then you tried to build Debug configuration.
You nailed it. I erroneously believed the Debug->Start Debugging command to be for the debug configuration. I changed the settings in the Configuration Manager dialog and rebuilt the solution. Now the atlapp.h warnings are gone,
So you didn't add the WTL include directory in the Property Manager. It would have affected both debug and release builds not only for this sample project but for all future projects too.

Sure I did, but I switched to the release build right after, and didn't have a chance to test the debug build with the new include directory added, which I did now and can confirm it also works, so you both nailed it.  :)


I got a new one:
Code: [Select]
6>foo_sample.rc(10): fatal error RC1015: cannot open include file 'afxres.h'.
6>
6>Done building project "foo_sample.vcxproj" -- FAILED.
========== Rebuild All: 5 succeeded, 1 failed, 0 skipped ==========

N.B.
I can't find an afxres.h file in neither of the SDK or WTL folders.
You need to install Visual C++ ATL and MFC for x86 and x64 in Visual Studio installer's "Individual Components" list. Or edit the resource filr foo_sample.rc to not require the extra header.

I attached edited version here:

Thanks! I tried both your edited foo_sample.rc file with the basic C++ desktop development features, and the original foo_sample.rc file after installing the MFC Visual C++ (ATL Visual C++ was already included in the desktop development package). Both ways work, and eventually I managed to see the foo_sample component and component page in the preferences. At last I have something concrete to exercise on while learning C++!

I've got just one more slightly off topic question: I installed the component by manually dragging the dll on the component page, but how do you turn it into a fb2k-component file? Is it just a different filename extension or is it a proper file format?
I'm late

Re: foo_sample.sln for dummies

Reply #12
The fb2k-component is just renamed zip. Once your component is ready compress its dll and any additional files it may require into a zip and rename the extension.

Re: foo_sample.sln for dummies

Reply #13
The fb2k-component is just renamed zip. Once your component is ready compress its dll and any additional files it may require into a zip and rename the extension.

I tried that, which made it browsable by the foobar2000 component installer, but not loadable. I guess the trick is in the "additional files it may require"...
I'm late