Help - Search - Members - Calendar
Full Version: Can't compile anything
Hydrogenaudio Forums > Hosted Forums > foobar2000 > Development - (fb2k)
lav-chan
I figured i'd give Visual Studio a try and see if i can't figure out this whole programming thing as i go. I'm not really a programmer (i've only taken a few high-school-level classes), though, so if this seems completely silly that's why.


Anyway um. I can't seem to compile anything. I got the foobar SDK, and the Columns UI SDK, and the Windows Platform SDK, and Visual Studio Express.

I'm not really changing anything yet, i'm just trying to see if i can get stuff to compile. But whenever i try to build anything i get a bajillion errors like this:

CODE
c:\documents and settings\lav\my documents\foobar sdk\foobar2000\ui_extension\ui_extension.h(97) : error C2146: syntax error : missing ';' before identifier 'name'
c:\documents and settings\lav\my documents\foobar sdk\foobar2000\ui_extension\ui_extension.h(97) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\documents and settings\lav\my documents\foobar sdk\foobar2000\ui_extension\ui_extension.h(97) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\documents and settings\lav\my documents\foobar sdk\foobar2000\ui_extension\ui_extension.h(98) : error C2146: syntax error : missing ';' before identifier 'category'
c:\documents and settings\lav\my documents\foobar sdk\foobar2000\ui_extension\ui_extension.h(98) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\documents and settings\lav\my documents\foobar sdk\foobar2000\ui_extension\ui_extension.h(98) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\documents and settings\lav\my documents\foobar sdk\foobar2000\ui_extension\ui_extension.h(105) : error C2504: 'ptr_list_autodel_t' : base class undefined
c:\documents and settings\lav\my documents\foobar sdk\foobar2000\ui_extension\ui_extension.h(105) : error C2143: syntax error : missing ',' before '<'
c:\documents and settings\lav\my documents\foobar sdk\foobar2000\ui_extension\ui_extension.h(112) : error C2061: syntax error : identifier 'string_base'
c:\documents and settings\lav\my documents\foobar sdk\foobar2000\ui_extension\ui_extension.h(118) : error C2065: 'ptr_list_t' : undeclared identifier
c:\documents and settings\lav\my documents\foobar sdk\foobar2000\ui_extension\ui_extension.h(118) : error C2275: 'ui_extension_info_simple' : illegal use of this type as an expression
c:\documents and settings\lav\my documents\foobar sdk\foobar2000\ui_extension\ui_extension.h(94) : see declaration of 'ui_extension_info_simple'
c:\documents and settings\lav\my documents\foobar sdk\foobar2000\ui_extension\ui_extension.h(118) : error C2039: 'sort' : is not a member of '`global namespace''
c:\documents and settings\lav\my documents\foobar sdk\foobar2000\ui_extension\ui_extension.h(118) : error C2065: 'sortproc' : undeclared identifier
c:\documents and settings\lav\my documents\foobar sdk\foobar2000\ui_extension\ui_extension.h(118) : error C3861: 'sort': identifier not found
c:\documents and settings\lav\my documents\foobar sdk\foobar2000\ui_extension\helpers.h(4) : fatal error C1189: #error : Deprecated - use ui_extension_with_helpers.h instead

Blah blah blah, you get the point. That happens with the static panel dealie from musicmusic's site (40 errors) and also with the albumart panel (250-something errors). I don't get what the problem is.

It couldn't find windows.h earlier, so i went and manually put in the path to it in the search path thingie (even though i ran the little deal that comes with the Platform SDK that's supposed to register all that junk)... but the fact that i had to do that makes me wonder if maybe none of those paths got registered at all? Do i have to go through and set those all myself, or could it be something else? :/
oshah
You did download the correct columns UI SDK from http://music.morbo.org/download/columns_ui-sdk.7z, and not from http://music.morbo.org/download/developmen...xtension_sdk.7z (which is for fb2k 0.8.3 only)?
prawns
If you haven't already found them, you might find foosion's tutorials useful.
lav-chan
QUOTE(oshah @ May 18 2006, 10:07) *
You did download the correct columns UI SDK from http://music.morbo.org/download/columns_ui-sdk.7z, and not from http://music.morbo.org/download/developmen...xtension_sdk.7z (which is for fb2k 0.8.3 only)?

Oh. Yeah, you're right. Whoops.

Now i have another problem though. I try to compile the 'foo_uie_console' example deal (without changing anything) and i get this.

CODE
------ Build started: Project: foo_uie_console, Configuration: Debug Win32 ------
Compiling...
main.cpp
c:\documents and settings\lav\my documents\foobar sdk\foobar2000\sdk\filesystem_helper.h(216) : warning C4244: 'argument' : conversion from 't_size' to 'const t_uint32', possible loss of data
c:\documents and settings\lav\my documents\foobar sdk\foobar2000\helpers\win32_dialog.h(103) : warning C4312: 'reinterpret_cast' : conversion from 'LONG' to 'dialog_helper::dialog_modeless_v2 *' of greater size
c:\documents and settings\lav\my documents\foobar sdk\foobar2000\columns_ui-sdk\columns_ui.h(98) : warning C4244: 'initializing' : conversion from 't_size' to 'unsigned int', possible loss of data
c:\documents and settings\lav\my documents\foobar sdk\foobar2000\foo_uie_console\main.cpp(162) : warning C4244: 'initializing' : conversion from 't_size' to 'unsigned int', possible loss of data
c:\documents and settings\lav\my documents\foobar sdk\foobar2000\foo_uie_console\main.cpp(189) : warning C4244: 'initializing' : conversion from 't_size' to 'unsigned int', possible loss of data
c:\documents and settings\lav\my documents\foobar sdk\foobar2000\foo_uie_console\main.cpp(200) : warning C4244: 'initializing' : conversion from 't_size' to 'unsigned int', possible loss of data
c:\documents and settings\lav\my documents\foobar sdk\foobar2000\foo_uie_console\main.cpp(223) : warning C4244: 'initializing' : conversion from 't_size' to 'unsigned int', possible loss of data
c:\documents and settings\lav\my documents\foobar sdk\foobar2000\foo_uie_console\main.cpp(280) : warning C4244: 'argument' : conversion from 'LPARAM' to 'LONG', possible loss of data
c:\documents and settings\lav\my documents\foobar sdk\foobar2000\foo_uie_console\main.cpp(282) : warning C4244: 'argument' : conversion from 'LPARAM' to 'LONG', possible loss of data
c:\documents and settings\lav\my documents\foobar sdk\foobar2000\foo_uie_console\main.cpp(282) : warning C4312: 'type cast' : conversion from 'LONG' to 'WNDPROC' of greater size
c:\documents and settings\lav\my documents\foobar sdk\foobar2000\foo_uie_console\main.cpp(294) : warning C4244: 'initializing' : conversion from 't_size' to 'unsigned int', possible loss of data
c:\documents and settings\lav\my documents\foobar sdk\foobar2000\foo_uie_console\main.cpp(346) : warning C4312: 'reinterpret_cast' : conversion from 'LONG' to 'console_window *' of greater size
Compiling manifest to resources...
Linking...
LINK : fatal error LNK1104: cannot open file 'uuid.lib'
Build log was saved at "file://c:\Documents and Settings\lav\My Documents\foobar sdk\foobar2000\foo_uie_console\Debug\BuildLog.htm"
foo_uie_console - 1 error(s), 12 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========


Now what'd i do wrong? :/
oshah
QUOTE(lav-chan @ May 18 2006, 20:36) *

Now i have another problem though. I try to compile the 'foo_uie_console' example deal (without changing anything) and i get this.

Linking...
LINK : fatal error LNK1104: cannot open file 'uuid.lib'


Don't want to use the provided project in vc8\foo_uie_console.vcproj, eh? Note, if you're not going to use the provided foo_uie_console.vcproj, you'll have to add two lines to the top of main.cpp:

CODE
#pragma comment(lib, "comctl32")
#pragma comment(lib, "../shared/shared.lib")


But your uuid.lib linker error is caused by something else, namely the Platform SDK isn't properly integrated to Visual C++. You said that you had to fiddle with the include paths to get windows.h to be seen. To get uuid.lib to be seen, you need to fiddle with Visual studio again. This time you need to fiddle with the lib paths. I suggest you follow the full instructions to integrate the PSDK with Visual C++ Express.
musicmusic
I would check you have PSDK libraries folder listed in VC++ Directories for Library files. (You can check and edit the directories in VC++ Options, the folder should be something like "%programfiles%\Microsoft Platform SDK for Windows Server 2003 R2\Lib").

If it is there, I would wonder where Uuid.lib from your PSDK went..

As for warnings, you can fix most of the ones in main.cpp ( "unsigned n, count" -> "t_size n, count" ). But included foo_uie_console project didn't have /Wp64 enabled anyway..
lav-chan
QUOTE(oshah @ May 18 2006, 14:43) *
Don't want to use the provided project in vc8\foo_uie_console.vcproj, eh?

Oh. I guess i wouldn't have thought to look for a file related to foo_uie_console anywhere other than... in the foo_uie_console directory. Heh.

QUOTE(oshah @ May 18 2006, 14:43) *
But your uuid.lib linker error is caused by something else, namely the Platform SDK isn't properly integrated to Visual C++. You said that you had to fiddle with the include paths to get windows.h to be seen. To get uuid.lib to be seen, you need to fiddle with Visual studio again. This time you need to fiddle with the lib paths. I suggest you follow the full instructions to integrate the PSDK with Visual C++ Express.

OK, thanks, i thought that might be it but i didn't want to go changing too much in there without knowing what i was doing.

I can now compile 'step 1' of foosion's tutorial without any errors or anything.

However, i still can't compile foo_uie_albumart, foo_uie_console, or foo_uie_example. In the case of foo_uie_albumart it's more of the same stuff i had last time (tons of errors about conversions and 'possible loss of data' and so on). In the case of foo_uie_example and foo_uie_console (using the .vcproj files from the vc8 directory this time) i get this junk:

CODE
------ Build started: Project: foo_uie_example, Configuration: Debug Win32 ------
Linking...
main.obj : error LNK2001: unresolved external symbol "public: static struct _GUID const ui_extension::window::class_guid" (?class_guid@window@ui_extension@@2U_GUID@@B)
main.obj : error LNK2019: unresolved external symbol "public: __thiscall ui_helpers::container_window::container_window(void)" (??0container_window@ui_helpers@@QAE@XZ) referenced in function "public: __thiscall ui_extension::container_ui_extension_t<class ui_helpers::container_window,class ui_extension::window>::container_ui_extension_t<class ui_helpers::container_window,class ui_extension::window>(void)" (??0?& #036;container_ui_extension_t@Vcontainer_window@ui_helpers@@Vwindow@ui_extension@@@ui_extension@@QAE
@XZ)
main.obj : error LNK2019: unresolved external symbol "struct HINSTANCE__ * __cdecl core_api::get_my_instance(void)" (?get_my_instance@core_api@@YAPAUHINSTANCE__@@XZ) referenced in function "private: virtual long __thiscall example_window::on_message(struct HWND__ *,unsigned int,unsigned int,long)" (?on_message@example_window@@EAEJPAUHWND__@@IIJ@Z)
main.obj : error LNK2019: unresolved external symbol "public: struct HWND__ * __thiscall ui_helpers::container_window::create(struct HWND__ *,void *,class ui_helpers::window_position_t const &)" (?create@container_window@ui_helpers@@QAEPAUHWND__@@PAU3@PAXABVwindow_position_t@2@@Z) referenced in function "private: virtual struct HWND__ * __thiscall ui_extension::container_ui_extension_t<class ui_helpers::container_window,class ui_extension::window>::create_or_transfer_window(struct HWND__ *,class service_ptr_t<class ui_extension::window_host> const &,class ui_helpers::window_position_t const &)" (?create_or_transfer_window@?& #036;container_ui_extension_t@Vcontainer_window@ui_helpers@@Vwindow@ui_extension@@@ui_extension@@EAE
PAUHWND__@@PAU3@ABV?$service_ptr_t@Vwindow_host@ui_extension@@@@ABVwindow_position_t@ui_helpers@@@Z)
main.obj : error LNK2019: unresolved external symbol "public: struct HWND__ * __thiscall ui_helpers::container_window::get_wnd(void)const " (?get_wnd@container_window@ui_helpers@@QBEPAUHWND__@@XZ) referenced in function "private: virtual struct HWND__ * __thiscall ui_extension::container_ui_extension_t<class ui_helpers::container_window,class ui_extension::window>::create_or_transfer_window(struct HWND__ *,class service_ptr_t<class ui_extension::window_host> const &,class ui_helpers::window_position_t const &)" (?create_or_transfer_window@?& #036;container_ui_extension_t@Vcontainer_window@ui_helpers@@Vwindow@ui_extension@@@ui_extension@@EAE
PAUHWND__@@PAU3@ABV?$service_ptr_t@Vwindow_host@ui_extension@@@@ABVwindow_position_t@ui_helpers@@@Z)
main.obj : error LNK2019: unresolved external symbol "public: void __thiscall ui_helpers::container_window::destroy(void)" (?destroy@container_window@ui_helpers@@QAEXXZ) referenced in function "private: virtual void __thiscall ui_extension::container_ui_extension_t<class ui_helpers::container_window,class ui_extension::window>::destroy_window(void)" (?destroy_window@?& #036;container_ui_extension_t@Vcontainer_window@ui_helpers@@Vwindow@ui_extension@@@ui_extension@@EAE
XXZ)
main.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 service_obscure_refcounting<class ui_extension::window_host> * __thiscall service_ptr_t<class ui_extension::window_host>::operator->(void)const " (??C?$service_ptr_t@Vwindow_host@ui_extension@@@@QBEPAV?$service_obscure_refcounting@Vwindow_host@ui_extension@@@@XZ)
main.obj : error LNK2001: unresolved external symbol "public: static struct _GUID const componentversion::class_guid" (?class_guid@componentversion@@2U_GUID@@B)
main.obj : error LNK2019: unresolved external symbol "char const * __cdecl core_api::get_my_file_name(void)" (?get_my_file_name@core_api@@YAPBDXZ) referenced in function "public: virtual void __thiscall componentversion_impl_simple::get_file_name(class pfc::string_base &)" (?get_file_name@componentversion_impl_simple@@UAEXAAVstring_base@pfc@@@Z)
main.obj : error LNK2019: unresolved external symbol "bool __cdecl core_api::are_services_available(void)" (?are_services_available@core_api@@YA_NXZ) referenced in function "protected: __thiscall service_factory_base::~service_factory_base(void)" (??1service_factory_base@@IAE@XZ)
main.obj : error LNK2001: unresolved external symbol "public: static class service_factory_base * service_factory_base::__internal__list" (?__internal__list@service_factory_base@@2PAV1@A)
./Debug\foo_uie_example.dll : fatal error LNK1120: 11 unresolved externals
Build log was saved at "file://c:\Documents and Settings\lav\My Documents\foobar sdk\foobar2000\vc8\Debug\foo_uie_example\BuildLog.htm"
foo_uie_example - 12 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========


sigh
kode54
It looks as if you're not including all the necessary dependencies in your second project.
lav-chan
As in they don't exist, or i'm not linking to them?
kode54
Check project dependencies. The correct libraries will be kept up to date and linked automatically if you run a normal "Build" on your project. The above errors would seem to indicate that you either missed the foobar2000 SDK and UI Extension SDK, or something screwy is going on.

Wait, scratch that, missing dependencies should have a lot more missing symbols than that.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.