Sign in to follow this  
Todilo

release version, how?

Recommended Posts

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!

Share this post


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

Share this post


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

Share this post


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

Share this post


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

Share this post


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

Share this post


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

Share this post


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

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this