|
Member 12268183 wrote: file:///D:/SoftwareProjects/Help/A%20Primer%20of%20DirectX%20Basics%20and%20the%20DirectX3D%20API%20-%20CodeProject.htm
You do realise we can't access your computer, right? A link to an HTML file stored on your computer is absolutely useless to us.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
|
You should ask your question on the forum at the end of the article. It's the best place to get help.
This space for rent
|
|
|
|
|
|
Changing a header file declaration usually ends in tears, unless you really understand the implications.
|
|
|
|
|
Member 12268183 wrote: I changed the declaration of the following:
extern DirectInput* gDInput;
in static DirectInput* gDInput; Do you think there might be a connection?
This space for rent
|
|
|
|
|
I don't know. If I put extern DirectInput* gDInput I receive the following error during the build process:
1> Generating Code...
1>CubeDemo.obj : error LNK2001: unresolved external symbol "class DirectInput * gDInput" (?gDInput@@3PAVDirectInput@@A)
1>SpriteDemo.obj : error LNK2001: unresolved external symbol "class DirectInput * gDInput" (?gDInput@@3PAVDirectInput@@A)
1>winmain.obj : error LNK2019: unresolved external symbol "class DirectInput * gDInput" (?gDInput@@3PAVDirectInput@@A) referenced in function "public: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > & __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::assign(char const *)" (?assign@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@PBD@Z)
1>D:\SoftwareProjects\C++\book_ex1\Debug\book_ex1.exe : fatal error LNK1120: 1 unresolved externals
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========
|
|
|
|
|
The linker is merely telling you that you forgot to provide a definition of the object that has been declared extern . You need to provide a line such as the following in one (and only one) of your source files:
DirectInput * gDInput =
|
|
|
|
|
Hi
I add extern DirectInput* gDInput; in DirectInput.h file. At the beginning of the file DirectInput.cpp I add DirectInput* gDInput = 0;
After the build process I received no errors. But during the debug process I still have the same error on the line in DirectInput.cpp:
HR(mKeyboard->Acquire());
One message box appears with the following message:
Unexpected error encountered: XFile with two buttons Yes/No
Regards
|
|
|
|
|
Then you need to use your debugger to find out why the error occurred. Randomly changing source code is not a very good way to try and resolve problems.
|
|
|
|
|
 I try to find the error using debug but till the moment it is not successful. The debuger is going in files as output.c, ullrem.asm, ulldiv.asm, vsprintf.c,
The debuger is passing through no source available point and continues till:
book_ex1.exe!DXTraceA(const char*strFile, unsigned long dwLine, HRESULT hr, const char*strMsg, int bPopMsgBox)Line 4828
Source file information:
Locating source for 'e:\temp\193462\obj.x86fre\misc\dxerr\objfre\i386\dxerra.cpp'. Checksum: Mo5 {62 b6 ef ba 67 f9 ac 6 4b 2 ec 8e 70 e7 46 a
The file 'e:\temp\193462\obj.x86fre\misc\dxerr\objfre\i386\dxerra.cpp' does not exist.
Looking in script documents for 'e:\temp\193462\obj.x86fre\misc\dxerr\objfre\i386\dxerra.cpp'...
Looking in the projects for 'e:\temp\193462\obj.x86fre\misc\dxerr\objfre\i386\dxerra.cpp'.
The file was not found in a project.
Looking in directory 'C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\crt\src\'...
Looking in directory 'C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\crt\src\vccorlib\'...
Looking in directory 'C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\atlmfc\src\mfc\'...
Looking in directory 'C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\atlmfc\src\atl\'... E}
Looking in directory 'C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\atlmfc\include'...
Looking in directory 'C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\atlmfc\src\mfc'...
Looking in directory 'C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\atlmfc\src\mfcm'...
Looking in directory 'C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\atlmfc\src\atl'...
|
|
|
|
|
You know where the exception occurs, add a breakpoint soemwhere before that point and run the program. When the breakpoint fires you can single step through the code and check all variables as you proceed, in order to find the offending value.
|
|
|
|
|
It is very difficult to find the error line because I look in Disassembly. I use step into and step out. Do you know better way to check errors in disassembly section.
|
|
|
|
|
Why are you looking in disassembly, when you have the source code?
|
|
|
|
|
Thank you very much for your help. Everythink is working well when I started the application without debuging.
|
|
|
|
|
|
Has anyone else found that a D3D9 full screen app (D3DCREATE_ADAPTERGROUP_DEVICE) that has worked well up to Win 8.1 fails with Windows 10 after the August update? d3d9->CreateDevice fails with D3DERR_INVALIDCALL. As I said... the code works with Win 8.1, Win 8, Win 7, Vista... and with original Windows 10 developer preview... but NOT after August update. Any tiny clue would be appreciated. I'd be happy to post present params, and other support code. Mainly, I'd like to know if anyone else has experienced this?
TwangGuru
www.twangguru.com
|
|
|
|
|
|
Thanks for your reply, but the answer is we're not "starting off". This is a product that has been sold for several years. There is no reason why a D3D9 application should not work on Windows 10... when the same application works fine in 8.1, etc. To redesign this product for D3D11 would take serious time, considering the development, testing and deployment cycles. This is NOT a simple D3D9 app... it's a complex application comprising 10000s of lines of codes and which is used in environment which demands high reliability. The port might be appropriate for a student project, but not the best path for this project.
TwangGuru
www.twangguru.com
|
|
|
|
|
How to paint right angle connecting line
it looks like as visio in mfc.
right angle connecting line
|
|
|
|
|
Use one of the GDI+[^] classes.
|
|
|
|
|
dx1 = u - x1 - x1^3
dx2 = -x2
how to make a diagram to analyze the bifurcation of the function
P.S. the x-axis of bifurcation is u
the y-axis of bifurcation is || X ||
{the amplitude (or norm) of the equilibrium point }
|
|
|
|
|
This is not a C# question. Nor is it a Graphics question.
Software rusts. Simon Stephenson, ca 1994. So does this signature. me, 2012
|
|
|
|
|
dx1 = u - x1 - x1^3
dx2 = -x2
how to make a diagram to analyze the bifurcation of the function
P.S. the x-axis of bifurcation is u
the y-axis of bifurcation is || X ||
{the amplitude (or norm) of the equilibrium point }
|
|
|
|
|
As a warmup for a more complex project, I had started to test doing layouts and rendering of text with DirectWrite. And for a start, I had used the snippets from the Microsoft Dev Center and created a complete minimal test application in my Visual Studio 2015 with Windows 10.
The good part is that I had some rendered text as a result in my window. The bad part is that the result (see this this screenshot) is far away from good readable text.
My understanding of the relating MSDN documentation is that ClearType is enabled by default. The title bar text of the window is obviously set up with text in ClearType. I guess I missed some setting in the DWrite factory but I do not know which one.
Does anybody have an advice for me?
For anybody who wants to take a look at my application: The project can be found here as ZIP file. The coding of my test application was not thought to be an example for a well structured program; its sole purpose was to find out how text rendering in ClearType could be accomplished.
(A short note: I had originally posted this in the Managed C++/CLI forum, and I received the advice that I might be better off in this forum. So I modified my test into a minimal C++ application - with the same sad result -, and I am reposting it here)
|
|
|
|