Visual 2012上的DirectX 10 [英] DirectX 10 on Visual 2012

查看:80
本文介绍了Visual 2012上的DirectX 10的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我的代码:


#include< iostream>

#include< D3D10.h>

#include< D3DX10math.h>



using namespace std;



$
//重载"<<<<"操作员,以便我们可以通过输出D3DXVECTOR3对象来输出


ostream& operator<(&ostream& os,D3DXVECTOR3& v)

{

     os<< "("<<<<<<""<<<< vy<<""<<< vz<<""""" />
     return os;

}



int main()

{

     //使用构造函数,D3DXVECTOR3(FLOAT X,FLOAT Y,FLOAT Z);

     D3DXVECTOR3 u(1.0f,2.0f,3.0f);



     //使用构造函数,D3DXVECTOR(CONST FLOAT *);

    浮动x [3] = {-2.0f,1.0f,-3.0f};

     D3DXVECTOR3 v(x);



     //使用构造函数,D3DXVECTOR3(){}

     D3DXVECTOR3 a,b,c,d,e;



     //向量添加:D3DXVECTOR3运算符+

     a = u + v;



     //矢量减法:D3DXVECTOR3运营商 -

     b = u - v;



     //标量乘法:D3DXVECTOR3运算符*

     c = u * 10;



     // || u ||

     float L = D3DXVec3Length(& u);



     // d = u / || u ||

     D3DXVec3Normalize(& d,& u);



     // s = u dot v
$
     float s = D3DXVec3Dot(& u,& v);



     // e = u x v

     D3DXVec3Cross(& e,& u,& v);



     cout<< " U&NBSP;&NBSP; &NBSP;&NBSP;&NBSP; &NBSP;&NBSP;&NBSP; &NBSP;&NBSP;&NBSP;   =" <<你<<结束;

     cout<< " V&NBSP;&NBSP; &NBSP;&NBSP;&NBSP; &NBSP;&NBSP;&NBSP; &NBSP;&NBSP;&NBSP;   =" << v<<结束;

     cout<< "a = u + v      =" << a<<结束;

     cout<< "b = u - v      =" << b<<结束;

     cout<< "c = u * 10     =" << b<<结束;

     cout<< "d = u / || u ||  =" << d<<结束;

     cout<< "e = u x v      =" << e<<结束;

     cout<< "L = || u ||      =" << L<<结束;

     cout<< " s = u.v        =" << s<<结束;



    返回0;
$


}


这是我的输出:


1> ------重建全部已启动:项目:第1部分 - 向量操作,配置:调试Win32 ------
$
1> Build build 9/24/2012 9:57:下午38点。

1> _PrepareForClean:

1> 删除文件"Debug\Part1 - Vector Operations.lastbuildstate"。

1> InitializeBuildStatus:

1> 触摸"Debug\Part1 - Vector Operations.unsuccessfulbuild"。

1> ClCompile:

1>  main.cpp中

1> F:\program文件(86)\microsoft DirectX SDK中(2010年6月)\include\dxgitype.h(12):警告C4005: 'DXGI_STATUS_OCCLUDED':宏观重新定义

1>          c:\program files(x86)\windows kits\8.0\include\shared\winerror.h(49449):参见'DXGI_STATUS_OCCLUDED'的先前定义


1> f: \program文件(86)\microsoft DirectX SDK中(2010年6月)\include\dxgitype.h(13):警告C4005: 'DXGI_STATUS_CLIPPED':宏重新定义

1>&NBSP;&NBSP ;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP; c:\program files(x86)\windows kits\8.0\include\shared\winerror.h(49458):参见先前的'DXGI_STATUS_CLIPPED'定义

1> f: \program文件(86)\microsoft DirectX SDK中(2010年6月)\include\dxgitype.h(14):警告C4005: 'DXGI_STATUS_NO_REDIRECTION':宏重新定义

1>&NBSP;&NBSP ;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP; c:\program files(x86)\windows kits\8.0\include\shared\winerror.h(49467):参见先前的'DXGI_STATUS_NO_REDIRECTION'定义

1> f: \program文件(86)\microsoft DirectX SDK中(2010年6月)\include\dxgitype.h(15):警告C4005: 'DXGI_STATUS_NO_DESKTOP_ACCESS':宏重新定义

1>&NBSP;&NBSP ;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP; C:\program文件(86)\windows kits\8.0\include\shared\winerror.h(49476):见 'DXGI_STATUS_NO_DESKTOP_ACCESS'

1>的先前定义; F: \program文件(86)\microsoft DirectX SDK中(2010年6月)\include\dxgitype.h(16):警告C4005: 'DXGI_STATUS_GRAPHICS_VIDPN_SOURCE_IN_USE':宏重新定义

1>&NBSP;&NBSP ;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP; C:\program文件(86)\windows kits\8.0\include\shared\winerror.h(49485):见 'DXGI_STATUS_GRAPHICS_VIDPN_SOURCE_IN_USE'

1>以前的定义; F: \program文件(86)\microsoft DirectX SDK中(2010年6月)\include\dxgitype.h(17):警告C4005: 'DXGI_STATUS_MODE_CHANGED':宏重新定义

1>&NBSP;&NBSP ;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP; c:\program files(x86)\windows kits\8.0\include\shared\winerror.h(49494):参见先前的'DXGI_STATUS_MODE_CHANGED'定义

1> f: \program文件(86)\microsoft DirectX SDK中(2010年6月)\include\dxgitype.h(18):警告C4005: 'DXGI_STATUS_MODE_CHANGE_IN_PROGRESS':宏重新定义

1>&NBSP;&NBSP ;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP; c:\program files(x86)\windows kits\8.0\include\shared\winerror.h(49503):参见先前的'DXGI_STATUS_MODE_CHANGE_IN_PROGRESS'定义

1> f: \program文件(86)\microsoft DirectX SDK中(2010年6月)\include\dxgitype.h(21):警告C4005: 'DXGI_ERROR_INVALID_CALL':宏重新定义

1>&NBSP;&NBSP ;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP; c:\program files(x86)\windows kits\8.0\include\shared\winerror.h(49518):参见先前对'DXGI_ERROR_INVALID_CALL'的定义

1> f: \program文件(86)\microsoft DirectX SDK中(2010年6月)\include\dxgitype.h(22):警告C4005: 'DXGI_ERROR_NOT_FOUND':宏重新定义

1>&NBSP;&NBSP ;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP; c:\program files(x86)\windows kits\8.0\include \shared \winerror.h(49527):参见先前的'DXGI_ERROR_NOT_FOUND'定义

1> f: \program文件(86)\microsoft DirectX SDK中(2010年6月)\include\dxgitype.h(23):警告C4005: 'DXGI_ERROR_MORE_DATA':宏重新定义

1>&NBSP;&NBSP ;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP; c:\program files(x86)\windows kits\8.0\include \shared \winerror.h(49536):参见先前的'DXGI_ERROR_MORE_DATA'定义

1> f: \program文件(86)\microsoft DirectX SDK中(2010年6月)\include\dxgitype.h(24):警告C4005: 'DXGI_ERROR_UNSUPPORTED':宏重新定义

1>&NBSP;&NBSP ;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP; c:\program files(x86)\windows kits\8.0\include\shared\winerror.h(49545):参见先前的'DXGI_ERROR_UNSUPPORTED'定义

1> f: \program文件(86)\microsoft DirectX SDK中(2010年6月)\include\dxgitype.h(25):警告C4005: 'DXGI_ERROR_DEVICE_REMOVED':宏重新定义

1>&NBSP;&NBSP ;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP; c:\program files(x86)\windows kits\8.0\include \shared \winerror.h(49554):参见先前的'DXGI_ERROR_DEVICE_REMOVED'定义

1> f: \program文件(86)\microsoft DirectX SDK中(2010年6月)\include\dxgitype.h(26):警告C4005: 'DXGI_ERROR_DEVICE_HUNG':宏重新定义

1>&NBSP;&NBSP ;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP; c:\program files(x86)\windows kits\8.0\include \shared \winerror.h(49563):参见先前对'DXGI_ERROR_DEVICE_HUNG'的定义


1> f: \program文件(86)\microsoft DirectX SDK中(2010年6月)\include\dxgitype.h(27):警告C4005: 'DXGI_ERROR_DEVICE_RESET':宏重新定义

1>&NBSP;&NBSP ;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP; c:\program files(x86)\windows kits\8.0\include\shared\winerror.h(49573):参见先前的'DXGI_ERROR_DEVICE_RESET'定义

1> f: \program文件(86)\microsoft DirectX SDK中(2010年6月)\include\dxgitype.h(28):警告C4005: 'DXGI_ERROR_WAS_STILL_DRAWING':宏重新定义

1>&NBSP;&NBSP ;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP; c:\program files(x86)\windows kits\8.0\include \shared \winerror.h(49582):参见先前的'DXGI_ERROR_WAS_STILL_DRAWING'定义

1> f: \program文件(86)\microsoft DirectX SDK中(2010年6月)\include\dxgitype.h(29):警告C4005: 'DXGI_ERROR_FRAME_STATISTICS_DISJOINT':宏重新定义

1>&NBSP;&NBSP ;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP; C:\program文件(86)\windows kits\8.0\include\shared\winerror.h(49592):见 'DXGI_ERROR_FRAME_STATISTICS_DISJOINT'

1>的先前定义; F: \program文件(86)\microsoft DirectX SDK中(2010年6月)\include\dxgitype.h(30):警告C4005: 'DXGI_ERROR_GRAPHICS_VIDPN_SOURCE_IN_USE':宏重新定义

1>&NBSP;&NBSP ;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP; C:\program文件(86)\windows kits\8.0\include\shared\winerror.h(49601):见 'DXGI_ERROR_GRAPHICS_VIDPN_SOURCE_IN_USE'

1>以前的定义; F: \program文件(86)\microsoft DirectX SDK中(2010年6月)\include\dxgitype.h(31):警告C4005: 'DXGI_ERROR_DRIVER_INTERNAL_ERROR':宏重新定义

1>&NBSP;&NBSP ;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP; c:\program files(x86)\windows kits\8.0\include \shared \winerror.h(49611):参见先前的'DXGI_ERROR_DRIVER_INTERNAL_ERROR'定义

1> f: \program文件(86)\microsoft DirectX SDK中(2010年6月)\include\dxgitype.h(32):警告C4005: 'DXGI_ERROR_NONEXCLUSIVE':宏重新定义

1>&NBSP;&NBSP ;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP; c:\program files(x86)\windows kits\8.0\include \shared \winerror.h(49620):参见先前的'DXGI_ERROR_NONEXCLUSIVE'定义

1> f: \program文件(86)\microsoft DirectX SDK中(2010年6月)\include\dxgitype.h(33):警告C4005: 'DXGI_ERROR_NOT_CURRENTLY_AVAILABLE':宏重新定义

1>&NBSP;&NBSP ;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP; c:\program files(x86)\windows kits\8.0\include\shared\winerror.h(49629):参见先前对'DXGI_ERROR_NOT_CURRENTLY_AVAILABLE'的定义

1> f: \program文件(86)\microsoft DirectX SDK中(2010年6月)\include\dxgitype.h(34):警告C4005: 'DXGI_ERROR_REMOTE_CLIENT_DISCONNECTED':宏重新定义

1>&NBSP;&NBSP ;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP; c:\program files(x86)\windows kits\8.0\include \shared \winerror.h(49639):参见先前对'DXGI_ERROR_REMOTE_CLIENT_DISCONNECTED'的定义'

1> f: \program文件(86)\microsoft DirectX SDK中(2010年6月)\include\dxgitype.h(35):警告C4005: 'DXGI_ERROR_REMOTE_OUTOFMEMORY':宏重新定义

1>&NBSP;&NBSP ;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP; c:\program files(x86)\windows kits\8.0\include\shared\winerror.h(49648):参见先前的'DXGI_ERROR_REMOTE_OUTOFMEMORY'定义

1> f: \program文件(86)\microsoft DirectX SDK中(2010年6月)\include\d3d10.h(608):警告C4005: 'D3D10_ERROR_TOO_MANY_UNIQUE_STATE_OBJECTS':宏重新定义

1>&NBSP;&NBSP ;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP; C:\program文件(86)\windows kits\8.0\include\shared\winerror.h(49793):见 'D3D10_ERROR_TOO_MANY_UNIQUE_STATE_OBJECTS'

1>以前的定义; F: \program文件(86)\microsoft DirectX SDK中(2010年6月)\include\d3d10.h(609):警告C4005: 'D3D10_ERROR_FILE_NOT_FOUND':宏重新定义

1>&NBSP;&NBSP ;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP; c:\program files(x86)\windows kits\8.0\include\shared\winerror.h(49802):参见先前对'D3D10_ERROR_FILE_NOT_FOUND'的定义。
1> main。 OBJ:错误LNK2019:解析外部符号_D3DXVec3Normalize @ 8函数引用_main

1> MSVCRTD.LIB(crtexew.obj):错误LNK2019:解析外部符号_WinMain @在函数引用16 ___ tmainCRTStartup

1> D:\ IOT-2DAE游戏Dev\Semester 1 \图形编程1 \书籍项目\第1章\第1部分 - Vector Operations \Debug \ Part1 - Vector Operations.exe:致命错误LNK1120:2个未解析的外部因素

1>

1> Build FAILED。

1>

1>时间流逝00:00:01.98

==========重建全部:0成功,1失败,0跳过==========


我在控制台链接器子系统中,所以这不是问题。 = S


此外,如果我把平台工具集放到2010年,我只得到:
$
1> ------重建全部开始:项目:第1部分 - 矢量操作(Visual Studio 2010),配置:调试Win32 ------

1> Build build 9/24/2012 10:04:55 PM。

1> _PrepareForClean:

1> 删除文件"Debug\Part1 - Vector Operations.lastbuildstate"。

1> InitializeBuildStatus:

1> 触摸"Debug\Part1 - Vector Operations.unsuccessfulbuild"。

1> ClCompile:

1>  main.cpp

1> main.obj:错误LNK2019:未解析的外部符号_D3DXVec3Normalize @ 8在函数_main中引用_
1> D:\ IOT-2DAE Game Dev \\ \\学期1 \图形编程1 \书籍项目\第1章\第1部分 - 矢量操作\调试\第1部分 - 矢量Operations.exe:致命错误LNK1120:1个未解析的外部因素

1>

1> Build FAILED。

1>

1>时间流逝00:00:05.48

== ========重建全部:0成功,1失败,0跳过==========


解决方案

您好,


感谢您的帖子。


根据您的描述,我认为最好在DirectX主题的论坛中提出这个问题。也许这个论坛更适合您的问题:
http://xboxforums.create。 msdn.com/forums/50.aspx


您的理解将不胜感激。


的问候,

This is my code:

#include <iostream>
#include <D3D10.h>
#include <D3DX10math.h>

using namespace std;


// Overload the "<<" operators so that we can uyse cout to
// output D3DXVECTOR3 objects.

ostream& operator<<(ostream& os, D3DXVECTOR3& v)
{
    os << "(" << v.x << ", " << v.y << ", " << v.z << ")";
    return os;
}

int main()
{
    // Using constructor, D3DXVECTOR3(FLOAT X, FLOAT Y, FLOAT Z);
    D3DXVECTOR3 u(1.0f, 2.0f, 3.0f);

    // Using constructor, D3DXVECTOR(CONST FLOAT *);
    float x[3] = {-2.0f, 1.0f, -3.0f};
    D3DXVECTOR3 v(x);

    // Using constructor, D3DXVECTOR3() {}
    D3DXVECTOR3 a, b, c, d, e;

    // Vector addition: D3DXVECTOR3 operator +
    a = u + v;

    // Vector substraction: D3DXVECTOR3 operator -
    b = u - v;

    // Scalar multiplication: D3DXVECTOR3 operator *
    c = u * 10;

    // ||u||
    float L = D3DXVec3Length(&u);

    // d = u / ||u||
    D3DXVec3Normalize(&d, &u);

    // s = u dot v
    float s = D3DXVec3Dot(&u, &v);

    // e = u x v
    D3DXVec3Cross(&e, &u, &v);

    cout << "u                = " << u << endl;
    cout << "v                = " << v << endl;
    cout << "a = u + v      = " << a << endl;
    cout << "b = u - v      = " << b << endl;
    cout << "c = u * 10     = " << b << endl;
    cout << "d = u / ||u||  = " << d << endl;
    cout << "e = u x v      = " << e << endl;
    cout << "L = ||u||      = " << L << endl;
    cout << "s = u.v        = " << s << endl;

    return 0;

}

And this is my Output:

1>------ Rebuild All started: Project: Part1 - Vector Operations, Configuration: Debug Win32 ------
1>Build started 9/24/2012 9:57:38 PM.
1>_PrepareForClean:
1>  Deleting file "Debug\Part1 - Vector Operations.lastbuildstate".
1>InitializeBuildStatus:
1>  Touching "Debug\Part1 - Vector Operations.unsuccessfulbuild".
1>ClCompile:
1>  main.cpp
1>f:\program files (x86)\microsoft directx sdk (june 2010)\include\dxgitype.h(12): warning C4005: 'DXGI_STATUS_OCCLUDED' : macro redefinition
1>          c:\program files (x86)\windows kits\8.0\include\shared\winerror.h(49449) : see previous definition of 'DXGI_STATUS_OCCLUDED'
1>f:\program files (x86)\microsoft directx sdk (june 2010)\include\dxgitype.h(13): warning C4005: 'DXGI_STATUS_CLIPPED' : macro redefinition
1>          c:\program files (x86)\windows kits\8.0\include\shared\winerror.h(49458) : see previous definition of 'DXGI_STATUS_CLIPPED'
1>f:\program files (x86)\microsoft directx sdk (june 2010)\include\dxgitype.h(14): warning C4005: 'DXGI_STATUS_NO_REDIRECTION' : macro redefinition
1>          c:\program files (x86)\windows kits\8.0\include\shared\winerror.h(49467) : see previous definition of 'DXGI_STATUS_NO_REDIRECTION'
1>f:\program files (x86)\microsoft directx sdk (june 2010)\include\dxgitype.h(15): warning C4005: 'DXGI_STATUS_NO_DESKTOP_ACCESS' : macro redefinition
1>          c:\program files (x86)\windows kits\8.0\include\shared\winerror.h(49476) : see previous definition of 'DXGI_STATUS_NO_DESKTOP_ACCESS'
1>f:\program files (x86)\microsoft directx sdk (june 2010)\include\dxgitype.h(16): warning C4005: 'DXGI_STATUS_GRAPHICS_VIDPN_SOURCE_IN_USE' : macro redefinition
1>          c:\program files (x86)\windows kits\8.0\include\shared\winerror.h(49485) : see previous definition of 'DXGI_STATUS_GRAPHICS_VIDPN_SOURCE_IN_USE'
1>f:\program files (x86)\microsoft directx sdk (june 2010)\include\dxgitype.h(17): warning C4005: 'DXGI_STATUS_MODE_CHANGED' : macro redefinition
1>          c:\program files (x86)\windows kits\8.0\include\shared\winerror.h(49494) : see previous definition of 'DXGI_STATUS_MODE_CHANGED'
1>f:\program files (x86)\microsoft directx sdk (june 2010)\include\dxgitype.h(18): warning C4005: 'DXGI_STATUS_MODE_CHANGE_IN_PROGRESS' : macro redefinition
1>          c:\program files (x86)\windows kits\8.0\include\shared\winerror.h(49503) : see previous definition of 'DXGI_STATUS_MODE_CHANGE_IN_PROGRESS'
1>f:\program files (x86)\microsoft directx sdk (june 2010)\include\dxgitype.h(21): warning C4005: 'DXGI_ERROR_INVALID_CALL' : macro redefinition
1>          c:\program files (x86)\windows kits\8.0\include\shared\winerror.h(49518) : see previous definition of 'DXGI_ERROR_INVALID_CALL'
1>f:\program files (x86)\microsoft directx sdk (june 2010)\include\dxgitype.h(22): warning C4005: 'DXGI_ERROR_NOT_FOUND' : macro redefinition
1>          c:\program files (x86)\windows kits\8.0\include\shared\winerror.h(49527) : see previous definition of 'DXGI_ERROR_NOT_FOUND'
1>f:\program files (x86)\microsoft directx sdk (june 2010)\include\dxgitype.h(23): warning C4005: 'DXGI_ERROR_MORE_DATA' : macro redefinition
1>          c:\program files (x86)\windows kits\8.0\include\shared\winerror.h(49536) : see previous definition of 'DXGI_ERROR_MORE_DATA'
1>f:\program files (x86)\microsoft directx sdk (june 2010)\include\dxgitype.h(24): warning C4005: 'DXGI_ERROR_UNSUPPORTED' : macro redefinition
1>          c:\program files (x86)\windows kits\8.0\include\shared\winerror.h(49545) : see previous definition of 'DXGI_ERROR_UNSUPPORTED'
1>f:\program files (x86)\microsoft directx sdk (june 2010)\include\dxgitype.h(25): warning C4005: 'DXGI_ERROR_DEVICE_REMOVED' : macro redefinition
1>          c:\program files (x86)\windows kits\8.0\include\shared\winerror.h(49554) : see previous definition of 'DXGI_ERROR_DEVICE_REMOVED'
1>f:\program files (x86)\microsoft directx sdk (june 2010)\include\dxgitype.h(26): warning C4005: 'DXGI_ERROR_DEVICE_HUNG' : macro redefinition
1>          c:\program files (x86)\windows kits\8.0\include\shared\winerror.h(49563) : see previous definition of 'DXGI_ERROR_DEVICE_HUNG'
1>f:\program files (x86)\microsoft directx sdk (june 2010)\include\dxgitype.h(27): warning C4005: 'DXGI_ERROR_DEVICE_RESET' : macro redefinition
1>          c:\program files (x86)\windows kits\8.0\include\shared\winerror.h(49573) : see previous definition of 'DXGI_ERROR_DEVICE_RESET'
1>f:\program files (x86)\microsoft directx sdk (june 2010)\include\dxgitype.h(28): warning C4005: 'DXGI_ERROR_WAS_STILL_DRAWING' : macro redefinition
1>          c:\program files (x86)\windows kits\8.0\include\shared\winerror.h(49582) : see previous definition of 'DXGI_ERROR_WAS_STILL_DRAWING'
1>f:\program files (x86)\microsoft directx sdk (june 2010)\include\dxgitype.h(29): warning C4005: 'DXGI_ERROR_FRAME_STATISTICS_DISJOINT' : macro redefinition
1>          c:\program files (x86)\windows kits\8.0\include\shared\winerror.h(49592) : see previous definition of 'DXGI_ERROR_FRAME_STATISTICS_DISJOINT'
1>f:\program files (x86)\microsoft directx sdk (june 2010)\include\dxgitype.h(30): warning C4005: 'DXGI_ERROR_GRAPHICS_VIDPN_SOURCE_IN_USE' : macro redefinition
1>          c:\program files (x86)\windows kits\8.0\include\shared\winerror.h(49601) : see previous definition of 'DXGI_ERROR_GRAPHICS_VIDPN_SOURCE_IN_USE'
1>f:\program files (x86)\microsoft directx sdk (june 2010)\include\dxgitype.h(31): warning C4005: 'DXGI_ERROR_DRIVER_INTERNAL_ERROR' : macro redefinition
1>          c:\program files (x86)\windows kits\8.0\include\shared\winerror.h(49611) : see previous definition of 'DXGI_ERROR_DRIVER_INTERNAL_ERROR'
1>f:\program files (x86)\microsoft directx sdk (june 2010)\include\dxgitype.h(32): warning C4005: 'DXGI_ERROR_NONEXCLUSIVE' : macro redefinition
1>          c:\program files (x86)\windows kits\8.0\include\shared\winerror.h(49620) : see previous definition of 'DXGI_ERROR_NONEXCLUSIVE'
1>f:\program files (x86)\microsoft directx sdk (june 2010)\include\dxgitype.h(33): warning C4005: 'DXGI_ERROR_NOT_CURRENTLY_AVAILABLE' : macro redefinition
1>          c:\program files (x86)\windows kits\8.0\include\shared\winerror.h(49629) : see previous definition of 'DXGI_ERROR_NOT_CURRENTLY_AVAILABLE'
1>f:\program files (x86)\microsoft directx sdk (june 2010)\include\dxgitype.h(34): warning C4005: 'DXGI_ERROR_REMOTE_CLIENT_DISCONNECTED' : macro redefinition
1>          c:\program files (x86)\windows kits\8.0\include\shared\winerror.h(49639) : see previous definition of 'DXGI_ERROR_REMOTE_CLIENT_DISCONNECTED'
1>f:\program files (x86)\microsoft directx sdk (june 2010)\include\dxgitype.h(35): warning C4005: 'DXGI_ERROR_REMOTE_OUTOFMEMORY' : macro redefinition
1>          c:\program files (x86)\windows kits\8.0\include\shared\winerror.h(49648) : see previous definition of 'DXGI_ERROR_REMOTE_OUTOFMEMORY'
1>f:\program files (x86)\microsoft directx sdk (june 2010)\include\d3d10.h(608): warning C4005: 'D3D10_ERROR_TOO_MANY_UNIQUE_STATE_OBJECTS' : macro redefinition
1>          c:\program files (x86)\windows kits\8.0\include\shared\winerror.h(49793) : see previous definition of 'D3D10_ERROR_TOO_MANY_UNIQUE_STATE_OBJECTS'
1>f:\program files (x86)\microsoft directx sdk (june 2010)\include\d3d10.h(609): warning C4005: 'D3D10_ERROR_FILE_NOT_FOUND' : macro redefinition
1>          c:\program files (x86)\windows kits\8.0\include\shared\winerror.h(49802) : see previous definition of 'D3D10_ERROR_FILE_NOT_FOUND'
1>main.obj : error LNK2019: unresolved external symbol _D3DXVec3Normalize@8 referenced in function _main
1>MSVCRTD.lib(crtexew.obj) : error LNK2019: unresolved external symbol _WinMain@16 referenced in function ___tmainCRTStartup
1>D:\IOT-2DAE Game Dev\Semester 1\Graphics Programming 1\Book Projects\Chapter1\Part1 - Vector Operations\Debug\Part1 - Vector Operations.exe : fatal error LNK1120: 2 unresolved externals
1>
1>Build FAILED.
1>
1>Time Elapsed 00:00:01.98
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========

I am in console Linker Substystem so that is not the problem. =S

Also if i put the platform toolset to 2010, i only get:
1>------ Rebuild All started: Project: Part1 - Vector Operations (Visual Studio 2010), Configuration: Debug Win32 ------
1>Build started 9/24/2012 10:04:55 PM.
1>_PrepareForClean:
1>  Deleting file "Debug\Part1 - Vector Operations.lastbuildstate".
1>InitializeBuildStatus:
1>  Touching "Debug\Part1 - Vector Operations.unsuccessfulbuild".
1>ClCompile:
1>  main.cpp
1>main.obj : error LNK2019: unresolved external symbol _D3DXVec3Normalize@8 referenced in function _main
1>D:\IOT-2DAE Game Dev\Semester 1\Graphics Programming 1\Book Projects\Chapter1\Part1 - Vector Operations\Debug\Part1 - Vector Operations.exe : fatal error LNK1120: 1 unresolved externals
1>
1>Build FAILED.
1>
1>Time Elapsed 00:00:05.48
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========

解决方案

Hello,

Thanks for your post.

According to your description, I think it is better to raise this question in a forum for DirectX topics. Maybe this forum is more appropriate for your issue: http://xboxforums.create.msdn.com/forums/50.aspx

Your understanding will be appreciated.

Regards,


这篇关于Visual 2012上的DirectX 10的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆