"the specified procedure could not be found"
I got that error when i was calling D3D10CreateDeviceAndSwapChain function and I read when i ggogled that problem that problem is with linking .lib (i got it with GetLAstError() on runtime)
i linked 3 libraries
this is from dependency walker
Warning: At least one delay-load dependency module was not found.
Warning: At least one module has an unresolved import due to a missing export function in a delay-load dependent module.
file that is not linked:
IESHIMS.DLL
message next to that file in dependency walker:
"Error opening file. The system cannot find the file specified (2)"
Please note that I do not think this is the cause of your problem (every program compiled with VS 2010 for example shows that warning in depedency walker).
If you get the error at runtime then there is no way that a missing library could be the issue, the linker will complain.
The #pragma comment(lib, "XXX") pre-processor command is a run-time link, so the error will not appear when the user compiles the application. I hate that MSDN encourages this behavior, but it is a simple way of telling the user what to link to, and in what order.
@OP: If you have downloaded the .exe and you are still getting that error then the answer is obvious, you don't have the required file, or you don't have the required version of the file. Run Windows updates if you have to and\or download the latest Windows SDK and set the search path to point to it. Then let us know if this worked.
The #pragma comment(lib, "XXX") pre-processor command is a run-time link, so the error will not appear when the user compiles the application. I hate that MSDN encourages this behavior, but it is a simple way of telling the user what to link to, and in what order.
If "XXX" library is not found then you will get a fatal error from the linker and the program will not build, it is the same behavior as adding the library under project properties IDE settings.
Where do you hear this ? It is incorrect.
The #pragma comment(lib, "XXX") pre-processor command is a run-time link, so the error will not appear when the user compiles the application
lib
Places a library-search record in the object file. This comment type must be accompanied by a commentstring parameter containing the name (and possibly the path) of the library that you want the linker to search. The library name follows the default library-search records in the object file; the linker searches for this library just as if you had named it on the command line provided that the library is not specified with /nodefaultlib. You can place multiple library-search records in the same source file; each record appears in the object file in the same order in which it is encountered in the source file.
Maybe I gave the impression that I meant you could link to libraries at run-time but I meant the DLL. I think the OP has the right lib file but either doesn't have the right DLL or they have the wrong version of the required DLL. This would explain why they can compile just fine (because he isn't statically linking, the lib they are using is inserting an address to check in the DLL at run-time) but when he goes to execute it, it throws an error.
EDIT: I could be wrong, I don't use MSVS but the other alternative is that whatever tutorial the OP is using is linking to run-time link version of the libraries. In which case my theory that they are missing or have the wrong DLL files is still correct.
I installed windows SDK
error is still up
but now when i compile my code, in debug notes stands this:
First-chance exception at 0x768afc56 in direct x10.exe: Microsoft C++ exception: _com_error at memory location 0x003beae8..
First-chance exception at 0x768afc56 in direct x10.exe: Microsoft C++ exception: [rethrow] at memory location 0x00000000..
this is getting annoying...
anyway i got error message from _com_error (guess what):
unknown error 0x887A004
this is hilarious, 4 days passed and i still got error
i am beginner programmer but i never had fatal error for a quite long period
is this normal in programmers life?
even google doesn't say anything about this error
i have a bad feeling about this
If you're a beginner, I believe it's best to stay away from toolkits.
If you're stubborn and really want to use a toolkit, then you have to expect there to be errors. I have rejected multiple toolkits simply because they were not easy to use. I'm still only use the standard library and the boost libraries since I keep having issues with toolkits originally designed for POSIX systems.
I tried reinstalling DXSDK: didn't help
I tried to create swapchain and device separated and i got linking errors in while compiling (application didn't run)
I switched back to old code, and now I got these errors while compiling (application doesn't run)
D3DClass.obj : error LNK2019: unresolved external symbol _D3DXMatrixOrthoLH@20 referenced in function "public: bool __thiscall D3DClass::Initialize(int,int,bool,struct HWND__ *,bool,float,float)" (?Initialize@D3DClass@@QAE_NHH_NPAUHWND__@@0MM@Z)
D3DClass.obj : error LNK2019: unresolved external symbol _D3DXMatrixPerspectiveFovLH@20 referenced in function "public: bool __thiscall D3DClass::Initialize(int,int,bool,struct HWND__ *,bool,float,float)" (?Initialize@D3DClass@@QAE_NHH_NPAUHWND__@@0MM@Z)
D3DClass.obj : error LNK2019: unresolved external symbol _D3D10CreateDeviceAndSwapChain@32 referenced in function "public: bool __thiscall D3DClass::Initialize(int,int,bool,struct HWND__ *,bool,float,float)" (?Initialize@D3DClass@@QAE_NHH_NPAUHWND__@@0MM@Z)
D3DClass.obj : error LNK2019: unresolved external symbol _CreateDXGIFactory@8 referenced in function "public: bool __thiscall D3DClass::Initialize(int,int,bool,struct HWND__ *,bool,float,float)" (?Initialize@D3DClass@@QAE_NHH_NPAUHWND__@@0MM@Z)