Jump to content

  • Log In with Google      Sign In   
  • Create Account

Awesome job so far everyone! Please give us your feedback on how our article efforts are going. We still need more finished articles for our May contest theme: Remake the Classics

Deploying with D3DX


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
14 replies to this topic

#1 Xtro   Members   -  Reputation: 106

Like
0Likes
Like

Posted 05 August 2011 - 03:43 PM


I am developing my application using d3dx functions. but when I deploy it to a fresh PC (which has no SDK installation) it doesn't run. And I saw an information in directx SDK that says that :

"The D3DX library included in this release is dependant on the Direct3D runtimes that shipped with this SDK. Applications linking against the version of D3DX in this release must also redistribute the runtime from this SDK."

I don't know how to redistribute the sdk runtime. I am installing redistributable files and it doesn't work. Then I am copying developer runtime dlls to application folder or system32 folder manually but it still doesn't work.
It only works when I install the SDK to the fresh PC. But I can't install the huge SDK to all my clients' computers.

I wonder how you guys are deploying your application which is using d3dx functions.

please help. Thank you.


Sponsor:

#2 Tournicoti   Members   -  Reputation: 490

Like
1Likes
Like

Posted 05 August 2011 - 03:50 PM

Hello

Personnally, I have to run the dx installer and install vcredist at install so that my program runs on other computers

#3 mhagain   Members   -  Reputation: 3827

Like
1Likes
Like

Posted 05 August 2011 - 06:02 PM

Hello

Personnally, I have to run the dx installer and install vcredist at install so that my program runs on other computers


This, basically. Always use the proper installers, manually copying and pasting DLLs will only end in tears.

It appears that the gentleman thought C++ was extremely difficult and he was overjoyed that the machine was absorbing it; he understood that good C++ is difficult but the best C++ is well-nigh unintelligible.


#4 Xtro   Members   -  Reputation: 106

Like
0Likes
Like

Posted 05 August 2011 - 08:18 PM

Guys, Thank you for your answers but I am still very confused. Because Neither Redist files from SDK nor web installer installs some of required DLLs like D3D10SDKLayers.DLL or D3DX10d_42.dll. They are named as "Developer" runtime and end-user installers doesn't install them. Right....

But !!! As it is written in the SDK documentation... If you are using D3DX10 or 11, I mean if you are linking against lib files which their name has a "d" letter at the end, you have to install developer runtime from the SDK.

When I compile my application, it asks for d3dx10d.lib file because I am including D3DX10.h header file in the code. I don't know why but even if I build as Release version from Visual Studio, linker asks for developer lib files. So, compiled exe needs developer dlls.

I think I need to find a way to compile my application without developer lib files. I tried to remove developer lib files from my lib source folder, It didn't help because linker is asking for those files. Then I defined the compiler directive D3D10_IGNORE_SDK_LAYERS at the beginning of my application but linker is still asking for developer lib files :( :(

#5 Jason Z   GDNet+   -  Reputation: 2370

Like
0Likes
Like

Posted 06 August 2011 - 01:52 AM

In my engine, I use the following library statements:

// Library imports
#pragma comment( lib, "d3d11.lib" )
#pragma comment( lib, "d3dx11.lib" )
#pragma comment( lib, "d3dx10.lib" )
#pragma comment( lib, "DXGI.lib" )
#pragma comment( lib, "d3d9.lib" )

Is there a reason you need to link only to the debug version of the library in a release build? Perhaps you have a debug flag defined somewhere in your code?
Jason Zink :: DirectX MVP
Check out our (now available) D3D11 book: Practical Rendering and Computation with Direct3D 11
Check out my Direct3D 11 engine on CodePlex: Hieroglyph 3
Check out our free online D3D10 book: Programming Vertex, Geometry, and Pixel Shaders
Lunar Rift :: Dual-Paraboloid Mapping Article :: Parallax Occlusion Mapping Article :: Fast Silhouettes Article

#6 ryan20fun   Members   -  Reputation: 334

Like
0Likes
Like

Posted 06 August 2011 - 04:19 AM

In my engine, I use the following library statements:

// Library imports
#pragma comment( lib, "d3d11.lib" )
#pragma comment( lib, "d3dx11.lib" )
#pragma comment( lib, "d3dx10.lib" )
#pragma comment( lib, "DXGI.lib" )
#pragma comment( lib, "d3d9.lib" )

Is there a reason you need to link only to the debug version of the library in a release build? Perhaps you have a debug flag defined somewhere in your code?


but is'nt that the same as adding those :ib's to the linker option in VS ?
but just on the file level.
Never say Never, Because Never comes too soon. - ryan20fun

Disclaimer: Each post of mine is intended as an attempt of helping and/or bringing some meaningfull insight to the topic at hand. Due to my nature, my good intentions will not always be plainly visible. I apologise in advance and assure you I mean no harm and do not intend to insult anyone.

#7 Jason Z   GDNet+   -  Reputation: 2370

Like
0Likes
Like

Posted 06 August 2011 - 04:26 AM


In my engine, I use the following library statements:

// Library imports
#pragma comment( lib, "d3d11.lib" )
#pragma comment( lib, "d3dx11.lib" )
#pragma comment( lib, "d3dx10.lib" )
#pragma comment( lib, "DXGI.lib" )
#pragma comment( lib, "d3d9.lib" )

Is there a reason you need to link only to the debug version of the library in a release build? Perhaps you have a debug flag defined somewhere in your code?


but is'nt that the same as adding those :ib's to the linker option in VS ?
but just on the file level.

I'm pretty sure it is the same thing - my point in showing them is that I don't use the debug versions of the libraries at all.

I took a quick look through D3DX10.h, but didn't see anything requiring the library to include that the OP specified. Do you know more precisely which portion of the header file requires you to include that library?
Jason Zink :: DirectX MVP
Check out our (now available) D3D11 book: Practical Rendering and Computation with Direct3D 11
Check out my Direct3D 11 engine on CodePlex: Hieroglyph 3
Check out our free online D3D10 book: Programming Vertex, Geometry, and Pixel Shaders
Lunar Rift :: Dual-Paraboloid Mapping Article :: Parallax Occlusion Mapping Article :: Fast Silhouettes Article

#8 Xtro   Members   -  Reputation: 106

Like
0Likes
Like

Posted 06 August 2011 - 01:39 PM

I think this runtime problem is not only my problem. I mean I don't think I am doing something wrong.

I compiled Tutorial02 from SDK (both debug and release) then copied the bin folders to a fresh windows 7. it didn't work either. Tutorial02 doesn't use and SDK specific media file. So, I think it should work on fresh windows 7 without SDK installed.

a)Debug version is showing a message box saying D3DX10d_42.dll is missing. and it closes the application instantly after that message.
b)Release version doesn't show the message box and it automatically closes the application window.
c)I copied the DLL into debug bin folder manually. Debug version didn't show the error message again but closed instantly like Release version.

I think I need to solve that problem before I fix my own application. Because my project is writing a DX wrapper library for .NET environment like SlimDX or other. And I am implementing SDK tutorials(with C#) in my project to prove that my library can run DK tutorials. But now, I am suspending my project. Because I don't want to deal with .net or other problems.

*** My current problem is to deploy any C++ D3DX application to a fresh windows.

1) How can I run the Tutorial02 on a fresh windows 7 ? Btw, fresh windows has dx end-user web installer installed.
2) Can anyone create a very simple project deployable for me ? I would be happy if you send me the vs2008 project folder and I can build it and I can try it on fresh windows. The Project can be simple as Tutorial02.

thank you.

#9 Martins Mozeiko   Members   -  Reputation: 1151

Like
0Likes
Like

Posted 06 August 2011 - 01:47 PM

Does Tutorial02 need to load some additional files like texture or hlsl shaders? Maybe it simply can't find them?
Try adding "printf/msgbox debugging" - add few printfs or message boxes between statements to see where program terminates/crashes.

#10 MJP   Moderators   -  Reputation: 5419

Like
1Likes
Like

Posted 06 August 2011 - 01:48 PM

You need to install the Visual C++ end-user runtimes for the version you're using. For a 32-bit app built with VS 2008 without service pack 1, you need to install this. With SP1, you need this.

#11 Xtro   Members   -  Reputation: 106

Like
0Likes
Like

Posted 06 August 2011 - 02:09 PM

I am sorry but that didn't help. :(

I installed vs2008 sp1 c++ end user but Tutorial02 still is not working. Release version closes, Debug version shows the same error.

Tutorial02 is using an additional file which is fx file. I have this file in the output bin folder but, Not to be confused... I am going to Tutorial01 which has no addition file or something.

Tutorial01 is also automatically closes on a windows 7 which has directx end-user and vc++ end-user installed.
I dont want to install visual studio to that windows. I don't know how I am gonna debug this auto closing problem.

A simple project which is made by you and running on fresh windows would be very helpful. So I can test it and see the differences.

#12 Xtro   Members   -  Reputation: 106

Like
0Likes
Like

Posted 06 August 2011 - 02:48 PM

Tutorial01 get a DXGI_ERROR_UNSUPPORTED error on fresh windows 7 while caling

hr = D3D10CreateDeviceAndSwapChain( NULL, g_driverType, NULL, createDeviceFlags, D3D10_SDK_VERSION, &sd, &g_pSwapChain, &g_pd3dDevice );

then it closes.

But I have installed dx runtime with web installer. Any idea ?



#13 ankhd   Members   -  Reputation: 385

Like
0Likes
Like

Posted 06 August 2011 - 09:19 PM

Well I think you may have to removed the debug .dll from the project and then link with the release .dlls and then use cv++ end-user runtimes

and the sdk end-user runtimes

#14 ryan20fun   Members   -  Reputation: 334

Like
0Likes
Like

Posted 06 August 2011 - 11:59 PM

Tutorial01 get a DXGI_ERROR_UNSUPPORTED error on fresh windows 7 while caling

hr = D3D10CreateDeviceAndSwapChain( NULL, g_driverType, NULL, createDeviceFlags, D3D10_SDK_VERSION, &sd, &g_pSwapChain, &g_pd3dDevice );

then it closes.

But I have installed dx runtime with web installer. Any idea ?



looks like you have found the problem, what about changing the device params ?

DX Docs on Devic Creation

DXGI_ERROR_UNSUPPORTED is returned whenever the application requests to create a well-known counter, but the current device does not support it.


Never say Never, Because Never comes too soon. - ryan20fun

Disclaimer: Each post of mine is intended as an attempt of helping and/or bringing some meaningfull insight to the topic at hand. Due to my nature, my good intentions will not always be plainly visible. I apologise in advance and assure you I mean no harm and do not intend to insult anyone.

#15 Xtro   Members   -  Reputation: 106

Like
1Likes
Like

Posted 07 August 2011 - 01:44 AM

Ok guys,

After working very hard for 2 or 3 days... I have solved my whole deployment problem. Thank you for your help.

These installations are required to deploy and run an application (which is including D3DX10.h header) on a fresh windows vista or windows 7 :

1) DirectX end-user runtime (can be installed from your directx sdk folder or from web installer. http://www.microsoft.com/download/en/details.aspx?id=35 )
2) Microsoft Visual C++ Redistributable Package (version can vary according to your development environment (vs2008 or vs2010) and target platform (x86 or x64)
2008 SP1 x86 : http://www.microsoft.com/download/en/details.aspx?id=5582
2008 SP1 x64 : http://www.microsoft.com/download/en/details.aspx?id=2092
2010 SP1 x86 : http://www.microsoft.com/download/en/details.aspx?id=8328
2010 SP1 x64 : http://www.microsoft.com/download/en/details.aspx?id=13523
3) if you are gonna switch into REF device, you need to have D3D10Ref.DLL in your application folder or in System32 folder.
4) if you are gonna create debug device, you need to have D3D10SDKLayers.DLL too.

And don't forget to have correct version (x86 and x64) of the DLLs in step 3 and 4. They are in C:\Program Files (x86)\Microsoft DirectX SDK (August 2009)\Developer Runtime folder.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS