release version, how?

Started by
8 comments, last by Aiursrage2k 18 years, 5 months ago
I use microsoft visual c++ to make my dx9 programs. I can easily make fully working debug version but others can't use/test those. When I try to make a release version I get lots of "unresolved external symbols" meaning that some libraries or files is not included I guess. I have added a lot of .lib(dx onces) to the project settings but not in the project folder, do I have to do that or is there another way, and will that even work?` Thank you for reading!
Advertisement
Visual Studio has separate project settings for the release and debug configurations. A common error is to just added the libraries to one of them, especially since you only edit the active configuration by default.
Did you add the .libs to the correct configuration in the project settings dialog box? In the top left of the dialog you can change the configuration that you are changing the settings for.

[EDIT]Beaten when my crappy internet service cut out for a minute.
hmm I copied my line which is as follows:
odbc32.lib odbccp32.lib libcp.lib ddraw.lib d3d9.lib d3dx9.lib d3dx9d.lib dinput.lib dplayx.lib dsound.lib dxguid.lib winmm.lib
into input>>additional dependencies

but I still get two unresolves
Draw2D error LNK2019: unresolved external symbol "struct _D3DLIGHT9 __cdecl d3d::InitDirectionalLight(struct D3DXVECTOR3 *,struct D3DXCOLOR *)" (?InitDirectionalLight@d3d@@YA?AU_D3DLIGHT9@@PAUD3DXVECTOR3@@PAUD3DXCOLOR@@@Z) referenced in function "bool __cdecl Setup(void)" (?Setup@@YA_NXZ)

is one of them. That is an #included file, d3dUtility.cpp (homemade).
ok I got it to work but the user still need d3dx9_26.dll ....
Since the DirectX SDK started using .dll's for D3DX components, it has been up to applicaiton developers to make sure that end-users have the correct version of D3DX on their machine. The easiest way to do this is to include the appropriate files from the Redist package.

Take a look at Installing DirectX with DirectSetup in the SDK docs. The short version is that you will have to include a few extra files with your game. The files can be found under SDKRoot/Redist/DirectX9.

neneboricua
I prefer using #pragma directives to each project configurations, as long as you code it right in the source file, you don't have to worry about it when moving to another projects or switch between configurations. An example of including necessary libraries is:

#pragma comment (lib, "SomeLib.lib")

Just like 'Included headers' feature in project configuration settings, I don't use 'Included libraries' for the same reason.

V@T
--> The great thing about Object Oriented code is that it can make small, simple problems look like large, complex ones <--
Quote:Original post by Skeleton_V@T
I prefer using #pragma directives to each project configurations, as long as you code it right in the source file, you don't have to worry about it when moving to another projects or switch between configurations. An example of including necessary libraries is:

#pragma comment (lib, "SomeLib.lib")

Just like 'Included headers' feature in project configuration settings, I don't use 'Included libraries' for the same reason.

V@T


I do this as well, and if I want to use special debug versions for debug, I just use an #ifdef.

#ifdef _DEBUG
#pragma comment (lib, "SomeLib_d.lib")
#else
#pragma comment (lib, "SomeLib.lib")
#endif

Sometimes I'll add new build stuff other than just Debug and Release. Using #pragma's for linking libs, I dont have to keep specifying the same exact thing over and over again.
Quote:Original post by Todilo
ok I got it to work but the user still need d3dx9_26.dll ....

The OP is saying this now. He's got the problem with the libraries and such figured out. But when he tries to run it on another machine, the .dll error comes up.

The reason for this is because the other machine is probably not a prgramming machine and doesn't have the DX SDK installed. As in my previous post, you need to include the proper files from the Redist package. In the best case, you'll only have to increase the size of your project by a little more than a megabyte.

neneboricua
I am having the same problem, which is odd since I was not having problems when I was using the command line compiler. I think you just need to link the libaries (d3dx9.lib and such).
Insufficent Information: we need more infromationhttp://staff.samods.org/aiursrage2k/

This topic is closed to new replies.

Advertisement