.NET 2005 Project using DirectX can't find _Xran and _Xlen on conversion from .NET 2003

E

Edward Mitchell

I am converting a project that uses DirectX and worked under VS.NET 2003.
Now when I convert the project to .NET 2005, there are linker errors for
_Xran and _Xlen as follows:

dx9.lib(WinConsole.obj) : error LNK2019: unresolved external symbol "public:
void __thiscall std::_String_base::_Xran(void)const " ...
....
dx9.lib(WinConsole.obj) : error LNK2019: unresolved external symbol "public:
void __thiscall std::_String_base::_Xlen(void)const " ...
....

The references are coming from the dx9.lib. I have just installed the
latest DirectX SDK (Augusts 2006).

Am I supposed to add another library reference to my project. I thought
that the installation of the SDK told VS where the libraries and include
files were.

Ed
 
G

Gary Chang[MSFT]

Hi Edward,
The references are coming from the dx9.lib. I have just installed
the latest DirectX SDK (Augusts 2006).

Am I supposed to add another library reference to my project.
I thought that the installation of the SDK told VS where the libraries
and include files were.

The installation of the DirectX SDK will not update the VS2005's VC++
project's directory setting automatically. I suggest you set the "Include
files" and "Library files" setting manually, and make sure place your SDK's
directory at the top of those two lists.(Tools | Options | Projects and
Solutions | VC++ Directories...)
dx9.lib(WinConsole.obj) : error LNK2019: unresolved external
symbol "public: void __thiscall std::_String_base::_Xran(void)const " ...

By the way, the definition of the std::_String_base::_Xran(void)const which
is shipped with the Visual C++ 2005 libraries is a __cdecl function, but
the error message shows it is a __thiscall function. If my first suggestion
doesn't fix the issue, I suggest you can also refer to the following MSDN
forum thread, which discuss a similar problem:

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=79018&SiteID=1

I hope the above information helps, if you have any questions or concerns,
please do not hesitate to let me know. I am standing by to help you.


Thanks for your understanding!

Best regards,

Gary Chang
Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
 
E

Edward Mitchell

Gary,

When I look at the Tools>Options>Projects and Solutions>VC++Directories, I
find that the DirectX SDK install has actually entered:

C:\Program Files\Microsoft DirectX SDK (August 2006)\Lib\x86

at the top of the list for the libraries. There is a similar entry for the
executables and includes.

However, when I looked in the x86 folder, there isn't a dx9.lib. There is a
d3dx9.lib and other similar .lib files. It turned out that the dx9.lib was
part of the overall solution that I was building - an imported 3rd party
demo project that I had expected to build directly. In fact it had built
successfully using .NET 2003 so the dx9.lib was left over from that build.

Rebuilding the local dx9.lib file under .NET 2005 solved the problem :)

Thanks for the feedback that lead to the solution.

Ed

"Gary Chang[MSFT]" said:
Hi Edward,
The references are coming from the dx9.lib. I have just installed
the latest DirectX SDK (Augusts 2006).

Am I supposed to add another library reference to my project.
I thought that the installation of the SDK told VS where the libraries
and include files were.

The installation of the DirectX SDK will not update the VS2005's VC++
project's directory setting automatically. I suggest you set the "Include
files" and "Library files" setting manually, and make sure place your
SDK's
directory at the top of those two lists.(Tools | Options | Projects and
Solutions | VC++ Directories...)
dx9.lib(WinConsole.obj) : error LNK2019: unresolved external
symbol "public: void __thiscall std::_String_base::_Xran(void)const " ...

By the way, the definition of the std::_String_base::_Xran(void)const
which
is shipped with the Visual C++ 2005 libraries is a __cdecl function, but
the error message shows it is a __thiscall function. If my first
suggestion
doesn't fix the issue, I suggest you can also refer to the following MSDN
forum thread, which discuss a similar problem:

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=79018&SiteID=1

I hope the above information helps, if you have any questions or concerns,
please do not hesitate to let me know. I am standing by to help you.


Thanks for your understanding!

Best regards,

Gary Chang
Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no
rights.
 
G

Gary Chang[MSFT]

That's great, Ed!

I am glad to know you have already found out the root cause and fixed it. :)

Good Luck!

Best regards,

Gary Chang
Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top