# Resolved: VC++ 2005 Express Beta and DX9 linker error

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

## Recommended Posts

Greetings, Upon attempting to build the AntiAlias_2005 project from DX9 SDK August 2005 with Visual C++ 2005 Express Edition Beta, I recieve the accompanying linker errors, of which I would like help in correcting. I am new to windows program and setting up the compiler. I download and installed the Microsoft Platform SDK and followed the instructions given at http://lab.msdn.microsoft.com/express/visualc/usingpsdk/default.aspx After searching on the Internet for quite some time I didn't find any step-by-step tutorial for configuring VC++ 2005 for DX9. I assume there must be one in existence, however I couldn't locate one. Since the problem is a linker error, I assumed the specific .lib files for DX9 were not being linked to, even though I set the directory in a similar manner to the platform one (I followed the same procedure for DX9 as I did for the platform SDK). It would be easy to include the files by a menu system, but the portion that I see to use in VC++ won't list any directories when selected to. This is my first post and I hope that enough information was provided. If not, please let me know and I'll provide more. I'd appreciate any help with links to configuring my windows system to be a good environment for building DX9 applications. As it stands now the sample programs won't compile at all. Here is the specific linker errors that VC++ 2005 outputs: ------ Build started: Project: AntiAlias, Configuration: Debug Win32 ------ Linking... DXUTgui.obj : error LNK2019: unresolved external symbol __imp__RegCloseKey@4 referenced in function "protected: static void __cdecl CDXUTIMEEditBox::GetReadingWindowOrientation(unsigned long)" (?GetReadingWindowOrientation@CDXUTIMEEditBox@@KAXK@Z) DXUTmisc.obj : error LNK2001: unresolved external symbol __imp__RegCloseKey@4 DXUTgui.obj : error LNK2019: unresolved external symbol __imp__RegQueryValueExW@24 referenced in function "protected: static void __cdecl CDXUTIMEEditBox::GetReadingWindowOrientation(unsigned long)" (?GetReadingWindowOrientation@CDXUTIMEEditBox@@KAXK@Z) DXUTmisc.obj : error LNK2001: unresolved external symbol __imp__RegQueryValueExW@24 DXUTgui.obj : error LNK2019: unresolved external symbol __imp__RegOpenKeyExW@20 referenced in function "protected: static void __cdecl CDXUTIMEEditBox::GetReadingWindowOrientation(unsigned long)" (?GetReadingWindowOrientation@CDXUTIMEEditBox@@KAXK@Z) DXUTmisc.obj : error LNK2001: unresolved external symbol __imp__RegOpenKeyExW@20 DXUTmisc.obj : error LNK2019: unresolved external symbol __imp__RegSetValueExW@24 referenced in function "void __cdecl DXUTDisplaySwitchingToREFWarning(void)" (?DXUTDisplaySwitchingToREFWarning@@YAXXZ) Debug\AntiAlias.exe : fatal error LNK1120: 4 unresolved externals Build log was saved at "file://c:\Program Files\Microsoft DirectX 9.0 SDK (August 2005)\Samples\C++\Direct3D\AntiAlias\Debug\BuildLog.htm" AntiAlias - 8 error(s), 0 warning(s) ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ========== [Edited by - AdamTheStudent on September 1, 2005 6:43:28 AM]

##### Share on other sites
Did you tryed to compile a simple windows application?
If your VS compiles only console application then you didnt set up your VS 2005 correctly . There are two ways to make VS 2005 Beta2 compile windows app:
1. The way described on the page you mentioned.
2. Assuming that you have installed VS in the Programe Files directory, create a directory "PlatformSDK" under "ProgramFiles\Microsoft Visual Studio 8\VC". Copy the "bin", "include" and "lib" directory from the PlatformSDK-installation into this directory.

For more details check this link:
http://forums.microsoft.com/msdn/ShowPost.aspx?PostID=2995

##### Share on other sites

I can build both win32 console applications and win32 windows applications. The latter being made through the win32 wizard, which results in a window with an "about box" and file->exit menu.

I'll uninstall everything and try it the second method that you propose.

I'll let you know if it works out! :)

##### Share on other sites
I dont think you have to reinstall VS or PlatformSDK . If you are able to compile windows aplications most probably your VS is configured with PlatformSDK correctly.
Unfortunately I dont have the August SDK installed on my machine. Maybe someone around here can compile that sample code and give you a hand with this problem.

[Edited by - Calin on August 31, 2005 7:45:18 AM]

##### Share on other sites
Hey there,

The problem is solved (at least so far as compiling DX9 programs). The sample programs tend not to compile due to the compiler using unicode, which I haven't figured how to have it use ANSI instead.

The solution was to create include, and lib system variables and then assign the associated directories to those. Then those variables were used as include and lib sources for the VC++ environment.

Thanks for the help!

##### Share on other sites
I just remembered I had the same problem when I started using VS Express Beta 2 ( a month ago). Too bad it didnt cross my mind initially.
Anyways Im glad you solved your problem.
BTW: I have read your blog. Interesting I just started to make a terrain engine too.

[Edited by - Calin on September 1, 2005 2:16:00 PM]

##### Share on other sites
Quote:
 Original post by CalinI just remembered I had the same problem when I started using VS Express Beta 2 ( a month ago). Too bad it didnt cross my mind initially. Anyways I`m glad you solved your problem. BTW: I have read your blog. Interesting I just started to make a terrain engine too.

Maybe we can share ideas about our progress with our respective terrain engines?

You are free to comment on the blog. I hope to start uploading pictures of my progress soon.

Thanks.

1. 1
2. 2
3. 3
Rutin
22
4. 4
frob
18
5. 5

• 33
• 13
• 10
• 10
• 12
• ### Forum Statistics

• Total Topics
632569
• Total Posts
3007121

×