Deploying with D3DX

This topic is 2388 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

Recommended Posts

[font=Verdana, Arial, Helvetica, sans-serif][size=2]
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.

Share on other sites
Hello

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

Share on other sites

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.

Share on other sites
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

Share on other sites
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?

Share on other sites

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.

Share on other sites

[quote name='Jason Z' timestamp='1312617136' post='4845351']
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.
[/quote]
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?

Share on other sites
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.

Share on other sites
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.

Share on other sites
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.

Share on other sites
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.

Share on other sites
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 ?

Share on other sites
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

Share on other sites

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.
[/quote]

Share on other sites
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)
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.