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: Visual Studio 2010 Exp Setup (Read 15211 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Visual Studio 2010 Exp Setup

Alright i am trying to setup Visual Studio 2010 C++ Express. I have installed the Microsoft Windows SDK for Windows 7 and .NET Framework 3.5 SP1 and Visual Studio 2010 C++ Express. Also downloaded and extracted the foobar SDK. when i open and build the sample it says: Cannot open include file: 'atlbase.h': No such file or directory
Not sure if i am not including the proper include folders or... something.. any help or other topic already answering this?

Visual Studio 2010 Exp Setup

Reply #1
All user interface samples use WTL which requires ATL. Express editions don't have it. You can compile the samples if you remove all components with UIs or comment out the UI code from the samples.


Visual Studio 2010 Exp Setup

Reply #3
ok well i cant figure out how to remove all the stuff from the samples so ive tried setting one up from scratch following these instructions


I'm not sure about Express, but with paid editions of Visual Studio all you need to do is...

1) Create a Win32 DLL project.
2) Include all .vsproj files from the SDK to your solution and make your project dependent on them.
3) Include shared.lib as well.
4) Specify #include directive for either “foobar2000\ATLHelpers\ATLHelpers.h” or “foobar2000\SDK\foobar2000.h” depending on your needs.
5) Use DECLARE_COMPONENT_VERSION and VALIDATE_COMPONENT_FILENAME to define your DLL as an fb2k component.



as soon as i try to include foobar2000.h it throws errors about a lot of the header files either missing identifiers or syntax errors about identifiers. i figure im still missing a file somewhere. i have foobar2000_component_client foobar2000_SDK foobar2000_sdk_helpers and pfc as the projects added and listed as dependents.

Visual Studio 2010 Exp Setup

Reply #4
Please post some of the errors you get.

Visual Studio 2010 Exp Setup

Reply #5
2>d:\programming\visual studio c++\test\test\foobar2000\shared\shared.h(72): error C2065: 'HDROP' : undeclared identifier
.
.
2>d:\programming\visual studio c++\test\test\foobar2000\sdk\playlist.h(741): error C2061: syntax error : identifier 'interface'
.
.
2>d:\programming\visual studio c++\test\test\foobar2000\sdk\ui.h(89): error C2061: syntax error : identifier 'interface'
.
.
2>d:\programming\visual studio c++\test\test\foobar2000\sdk\library_manager.h(191): error C2065: 'IUnknown' : undeclared identifier

to show some..

Visual Studio 2010 Exp Setup

Reply #6
The first one definetely requires deleting this line from stdafx.h:
Quote
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers

Visual Studio 2010 Exp Setup

Reply #7
Thanks that seems to have fixed all those. now im getting something that looks like its related to the ATL stuff i was having problems with before. not sure why as i have not included any graphics stuff that i can think of. i have removed all projects but the test one and foobar2000_SDK
Code: [Select]
1>------ Build started: Project: test, Configuration: Debug Win32 ------
1>  test.cpp
1>  TmSchema.h is obsolete. Please include vssym32.h instead.
1>test.obj : error LNK2019: unresolved external symbol "void __cdecl pfc::myassert(wchar_t const *,wchar_t const *,unsigned int)" (?myassert@pfc@@YAXPB_W0I@Z) referenced in function "public: class pfc::_avltree_node<struct pfc::map_t<struct _GUID,unsigned int,class pfc::comparator_default>::t_storage> * __thiscall pfc::refcounted_object_ptr_t<class pfc::_avltree_node<struct pfc::map_t<struct _GUID,unsigned int,class pfc::comparator_default>::t_storage> >::operator->(void)const " (??C?$refcounted_object_ptr_t@V?$_avltree_node@Ut_storage@?$map_t@U_GUID@@IVcomparator_default@pfc@@@pfc@@@pfc@@@pfc@@QBEPAV?$_avltree_node@Ut_storage@?$map_t@U_GUID@@IVcomparator_default@pfc@@@pfc@@@1@XZ)
1>D:\Programming\Visual Studio C++\test\Debug\test.dll : fatal error LNK1120: 1 unresolved externals
========== Build: 0 succeeded, 1 failed, 1 up-to-date, 0 skipped ==========

Visual Studio 2010 Exp Setup

Reply #8
Quote
i have removed all projects but the test one and foobar2000_SDK

Apparently you also need pfc.vcxproj.
BTW you also need foobar2000_component_client.vcxproj.

Visual Studio 2010 Exp Setup

Reply #9
its happens in either case. i removed them in case they were including something with ATL

Visual Studio 2010 Exp Setup

Reply #10
Ive now tried building the general component tutorial and im getting the same error as above but many more times
Code: [Select]
5>foobar2000_SDK.lib(playable_location.obj) : error LNK2001: unresolved external symbol "void __cdecl pfc::myassert(wchar_t const *,wchar_t const *,unsigned int)" (?myassert@pfc@@YAXPB_W0I@Z)
5>foobar2000_SDK.lib(metadb_handle.obj) : error LNK2001: unresolved external symbol "void __cdecl pfc::myassert(wchar_t const *,wchar_t const *,unsigned int)" (?myassert@pfc@@YAXPB_W0I@Z)
5>foobar2000_SDK.lib(console.obj) : error LNK2001: unresolved external symbol "void __cdecl pfc::myassert(wchar_t const *,wchar_t const *,unsigned int)" (?myassert@pfc@@YAXPB_W0I@Z)
5>foobar2000_SDK.lib(filesystem.obj) : error LNK2001: unresolved external symbol "void __cdecl pfc::myassert(wchar_t const *,wchar_t const *,unsigned int)" (?myassert@pfc@@YAXPB_W0I@Z)


im not experienced enough to have come across this before. i kinda get that its not linking to some object but i dont know how to go about fixing it especially since its not my code or code that ive used.

Visual Studio 2010 Exp Setup

Reply #11
Strange, I checked that the tutorial compiled with VC++ 10 Express before I uploaded it. Try adding a direct project dependeny on pfc for foo_tutorial1.

Visual Studio 2010 Exp Setup

Reply #12
i saw that on one of the posts. makes me think ive set something up wrong. maybe ill try uninstalling everything and starting over.

Visual Studio 2010 Exp Setup

Reply #13
so still getting the myassert errors like before even after uninstalling Windows SDK and VC exp and deleting all foobar files. i have now reinstalled the Windows SDK and VC and reextracted the foobar sdk and gen comp tutorial. should i try using VC 2008?

Visual Studio 2010 Exp Setup

Reply #14
Linker errors are caused by the project setup. They don't magically vanish, if you reinstall the tool chain.

Visual Studio 2010 Exp Setup

Reply #15
I think your problem is the fact that in VS2010 project dependencies must be added via "Add reference" menu entry, not "Project dependecies" (which still exists, but does not do the job now).

Visual Studio 2010 Exp Setup

Reply #16
I think your problem is the fact that in VS2010 project dependencies must be added via "Add reference" menu entry, not "Project dependecies" (which still exists, but does not do the job now).

genius! that is a confusing thing they have. i was def adding the dependencies under the wrong one. after adding pfc it compiled correctly! now i will try the one from scratch as well.

(the way i added it was right clicking on foo_tou project then clicking on references then clicking add new reference in the window that popped up)

Visual Studio 2010 Exp Setup

Reply #17
I am also meet the problem, and have not been solved yet.

In winDDK, there is atlbase.h, I add the path, but there is still some xxx.h not available.

I download WTL7.1, add the file in the include path, the compile error is still there.

I copy the vs2008 atlmfc/include to the vs2010 express, but the compile error are unable to solve.

I am the new one for the foobar2000 SDK, I could nt found the correct guide help me construct the SDK environment.

Is there step by step guide available now?

Visual Studio 2010 Exp Setup

Reply #18
I am also meet the problem, and have not been solved yet.

In winDDK, there is atlbase.h, I add the path, but there is still some xxx.h not available.

I download WTL7.1, add the file in the include path, the compile error is still there.

I copy the vs2008 atlmfc/include to the vs2010 express, but the compile error are unable to solve.

I am the new one for the foobar2000 SDK, I could nt found the correct guide help me construct the SDK environment.

Is there step by step guide available now?


After a bunch of bumbling around I finally got my foo_sample to build. These are the final steps I used to get it working. I am running VS2010.

- Download WTL and extract the folder to any desired location
- Open foo_sample.vcxproj in VS2010
- Point the project to the WTLxx\include directory
   - Right click on foo_sample project -> Configuration Properties -> VC++ Directories -> Include Directories -> <Edit...> -> C:\WTL80\include\
   ( Make sure to use the edit feature instead of just typing in the path. It will automatically add some markup that I think is necessary for it to work. It should look something like this: "C:\WTL80\include\;$(IncludePath)" )
- Add the following existing projects
   - Right click on the Solution foo_sample -> Add -> Existing Project...
      - foobar2000_component_client
      - foobar2000_SDK
      - foobar2000_sdk_helpers
      - pfc
- Add references too all of the recently added projects
   - Right click on foo_sample project -> Common Properties -> Framework and References -> Add New Reference...
- Add the shared library to the additional dependencies
   - Right click on foo_sample project -> Configuration Properties -> Linker -> Input -> Additional Dependencies -> <Edit...> -> ..\shared\shared.lib
   ( Same caution to use edit feature as with the WTL path. Should look something like this: "..\shared\shared.lib;%(AdditionalDependencies)" )
- Build and pray that it works!


I hope this helps.