# DirectX 9.0c and VS2005 Express

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

## Recommended Posts

##### Share on other sites
Digging an old project, these are passed to the linker:
dxguid.lib dinput8.lib d3dx9d.lib d3d9.lib winmm.lib odbc32.lib odbccp32.lib

I didn't have to ignore any libs.

##### Share on other sites
I am just loading up the sample EmptyProject that comes with DirectX 9.0c. I assume it already has the libraries set correctly, but I checked it anyway and found these.

dxerr9.lib dxguid.lib d3dx9dt.lib d3d9.lib winmm.lib comctl32.lib

This all lokks fine, and as you can expect, there is no reference to libcp.lib as I assume it is being refrenced somewhere in D3DX. The odd thing about it is that this library does not exist. I have done a fresh install of VS2005 Express along with the latest Platform SDK and this library is nowhere to be found.

It does exist with VC6, but it looks like you cannot use it. I am just stumped as to why I can't just install Visual Studio, install DirectX, update my Platform SDK, open up one of the DirectX sample projects and compile it without error? Perhaps I'm asking too much?

##### Share on other sites
I'm getting really frustrated with this. I have taken desperate measures with no results. Here's what I did.

1. Formated my whole hard drive.
2. Installed Windows XP Pro.
3. Installed Windows XP Service Pack 2.
4. Installed Visual Studio 2005 Express.
5. Updated my Platform SDK (installed the whole thing from the MS website).
6. Installed DirectX 9.0c.
7. Opened Visual C++ 2005 and checked all the directories.
8. Loaded the sample EmptyProject that comes with DirectX 9.0c.
9. Clicked on the "Build" button.

...and it still gives me that some error!!!
LINK : fatal error LNK1104: cannot open file 'libcp.lib'

I managed to find libcp.lib in an obscure directory within the Platform SDK, but if I try to link to it VS throws me about 132 unresolved external symbol errors.

Surely somebody has managed to compile one of the DirectX 9.0c samples without error. If so, please list the steps you took to do it. At this rate I'm going to have to go back to 9.0b and VS6 :(

##### Share on other sites
I remember seeing something like this on the DirectXDev mailing list. The question over there was whether VS2005 Beta could do shader debugging.

Although the question is different than yours, the response from the DirectX team might help. They said that since the VS2005 Beta shipped after DX9.0c, DX9.0c has no direct support for the VS2005 Beta. Support will be added in a future SDK release.

My guess is that by the time VS2005 is ready, a new SDK release should be close as well. This doesn't mean that you shouldn't be able to compile an empty DX9 project with it; I'm just mentioning this to let you know that you aren't the only one to have problems with DX9.0c and VS2005 Beta.

neneboricua

##### Share on other sites
libcp.lib is one of the standard c runtime libraries and is required for all of the standard c routines. ie printf If you have included stdio.h or another such header you will need this.

Make sure you add the directory you found in the platform sdk directories that contains this file to your library path and all should be ok.

##### Share on other sites
Quote:
 Original post by sandyI managed to find libcp.lib in an obscure directory within the Platform SDK, but if I try to link to it VS throws me about 132 unresolved external symbol errors.

What this likely means is that now that it has found libcp it's continuing on and is showing you other errors. So you might have been fine by just ignoring that library.

You have to calmly deal with the issues in front of you and not jump to conclusions. For example, you listed that GetWindowRect wasn't found. If you check MSDN it shows that User32.lib is required for GetWindowRect. So add User32.lib to your library list and rebuild. Then handle those errors.

I haven't built the SDK samples but I have compiled my own DX code with VS2005 Express.

##### Share on other sites
Try this link, I had some very similar problems and this got it working for me.

the site

##### Share on other sites
DrunkenHyena, you are a life saver!!!

I was on the verge of a nervous breakdown because of this. I was going to format my hardrive again just because it feels good to punish the computer. It's the same feeling you get when you throw your monitor :)

Your encouraging words helped me to stop flailing my arms about, calm down, take a deep breath and start working through the unresolved external symbols.

In my efforts I have discovered that in order to compile the sample EmptyProject from DirectX 9.0c with VS2005 you need to tell the compiler to ignore libcp.lib and then add the following libraries:

Don't ask me what they do (or anything else technical like that) as I am likely to start flailing my arms again.

After compiling I received the following error.

Merging manifest files...mt.exe:Manifest Authoring error c1010001:Attribute values in different manifest snippets not equal.mt.exe exited with error - A device attached to the system is not functioning.Project : error PRJ0002 : Error result 1 returned from 'C:\Program Files\Microsoft Visual Studio 8\VC\bin\mt.exe'.

I tried running the program and it ran just fine however the above error persist every time I press compile. Does anyone have any idea what this might be, or where I should look to find more information?

##### Share on other sites
You beat me to it johnnyBravo, great link!

It basicly covers what I said. I will follow the instructions there though as that way I won't have to add these libraries every time I create a new application.

It doesn't talk about the merging manifest files error though. I will continue my search, but any ideas anyone?

##### Share on other sites

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

## Create an account

Register a new account

• ### Forum Statistics

• Total Topics
628715
• Total Posts
2984360

• 24
• 11
• 10
• 13
• 14