Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Problem with Win32

Problem with Win32

Scheduled Pinned Locked Moved C / C++ / MFC
helpc++graphicsgame-devdebugging
4 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    Dev578
    wrote on last edited by
    #1

    I made an empty Win32 project in VC++ v7, and then added a C++ file to it. I made an exact copy of one of the Direct3D working tutorials and pasted it into the empty C++ file. I copied all of the DirectX include files and library's into the directories tbat VC++ uses. When I try to build it, it gives me the following errors: Linking... AnotherOne.obj : error LNK2019: unresolved external symbol _Direct3DCreate9@4 referenced in function "long __cdecl InitD3D(struct HWND__ *)" (?InitD3D@@YAJPAUHWND__@@@Z) AnotherOne.obj : error LNK2019: unresolved external symbol _D3DXCreateTextureFromFileA@12 referenced in function "long __cdecl InitGeometry(void)" (?InitGeometry@@YAJXZ) AnotherOne.obj : error LNK2019: unresolved external symbol _D3DXLoadMeshFromXA@32 referenced in function "long __cdecl InitGeometry(void)" (?InitGeometry@@YAJXZ) AnotherOne.obj : error LNK2019: unresolved external symbol _D3DXMatrixPerspectiveFovLH@20 referenced in function "void __cdecl SetupMatrices(void)" (?SetupMatrices@@YAXXZ) AnotherOne.obj : error LNK2019: unresolved external symbol _D3DXMatrixLookAtLH@16 referenced in function "void __cdecl SetupMatrices(void)" (?SetupMatrices@@YAXXZ) AnotherOne.obj : error LNK2019: unresolved external symbol _D3DXMatrixRotationY@8 referenced in function "void __cdecl SetupMatrices(void)" (?SetupMatrices@@YAXXZ) AnotherOne.obj : error LNK2019: unresolved external symbol __imp__timeGetTime@0 referenced in function "void __cdecl SetupMatrices(void)" (?SetupMatrices@@YAXXZ) Debug/AnotherOne.exe : fatal error LNK1120: 7 unresolved externals Yes, I named the project "AnotherOne," this is because of several attempts:) If anyone could help me out, that would be great. -Dev578

    P K J 3 Replies Last reply
    0
    • D Dev578

      I made an empty Win32 project in VC++ v7, and then added a C++ file to it. I made an exact copy of one of the Direct3D working tutorials and pasted it into the empty C++ file. I copied all of the DirectX include files and library's into the directories tbat VC++ uses. When I try to build it, it gives me the following errors: Linking... AnotherOne.obj : error LNK2019: unresolved external symbol _Direct3DCreate9@4 referenced in function "long __cdecl InitD3D(struct HWND__ *)" (?InitD3D@@YAJPAUHWND__@@@Z) AnotherOne.obj : error LNK2019: unresolved external symbol _D3DXCreateTextureFromFileA@12 referenced in function "long __cdecl InitGeometry(void)" (?InitGeometry@@YAJXZ) AnotherOne.obj : error LNK2019: unresolved external symbol _D3DXLoadMeshFromXA@32 referenced in function "long __cdecl InitGeometry(void)" (?InitGeometry@@YAJXZ) AnotherOne.obj : error LNK2019: unresolved external symbol _D3DXMatrixPerspectiveFovLH@20 referenced in function "void __cdecl SetupMatrices(void)" (?SetupMatrices@@YAXXZ) AnotherOne.obj : error LNK2019: unresolved external symbol _D3DXMatrixLookAtLH@16 referenced in function "void __cdecl SetupMatrices(void)" (?SetupMatrices@@YAXXZ) AnotherOne.obj : error LNK2019: unresolved external symbol _D3DXMatrixRotationY@8 referenced in function "void __cdecl SetupMatrices(void)" (?SetupMatrices@@YAXXZ) AnotherOne.obj : error LNK2019: unresolved external symbol __imp__timeGetTime@0 referenced in function "void __cdecl SetupMatrices(void)" (?SetupMatrices@@YAXXZ) Debug/AnotherOne.exe : fatal error LNK1120: 7 unresolved externals Yes, I named the project "AnotherOne," this is because of several attempts:) If anyone could help me out, that would be great. -Dev578

      P Offline
      P Offline
      Prakash Nadar
      wrote on last edited by
      #2

      did you set the lib that needs to be linked to use DirectX. i dont know the lib name, you can either put in the link section in the project settings or

      #pragma comment(lib,"libname.lib")

      in stdafx.h


      MSN Messenger. prakashnadar@msn.com Tip of the day of visual C++ IDE. "We use it before you do! Visual C++ was developed using Visual C++"

      1 Reply Last reply
      0
      • D Dev578

        I made an empty Win32 project in VC++ v7, and then added a C++ file to it. I made an exact copy of one of the Direct3D working tutorials and pasted it into the empty C++ file. I copied all of the DirectX include files and library's into the directories tbat VC++ uses. When I try to build it, it gives me the following errors: Linking... AnotherOne.obj : error LNK2019: unresolved external symbol _Direct3DCreate9@4 referenced in function "long __cdecl InitD3D(struct HWND__ *)" (?InitD3D@@YAJPAUHWND__@@@Z) AnotherOne.obj : error LNK2019: unresolved external symbol _D3DXCreateTextureFromFileA@12 referenced in function "long __cdecl InitGeometry(void)" (?InitGeometry@@YAJXZ) AnotherOne.obj : error LNK2019: unresolved external symbol _D3DXLoadMeshFromXA@32 referenced in function "long __cdecl InitGeometry(void)" (?InitGeometry@@YAJXZ) AnotherOne.obj : error LNK2019: unresolved external symbol _D3DXMatrixPerspectiveFovLH@20 referenced in function "void __cdecl SetupMatrices(void)" (?SetupMatrices@@YAXXZ) AnotherOne.obj : error LNK2019: unresolved external symbol _D3DXMatrixLookAtLH@16 referenced in function "void __cdecl SetupMatrices(void)" (?SetupMatrices@@YAXXZ) AnotherOne.obj : error LNK2019: unresolved external symbol _D3DXMatrixRotationY@8 referenced in function "void __cdecl SetupMatrices(void)" (?SetupMatrices@@YAXXZ) AnotherOne.obj : error LNK2019: unresolved external symbol __imp__timeGetTime@0 referenced in function "void __cdecl SetupMatrices(void)" (?SetupMatrices@@YAXXZ) Debug/AnotherOne.exe : fatal error LNK1120: 7 unresolved externals Yes, I named the project "AnotherOne," this is because of several attempts:) If anyone could help me out, that would be great. -Dev578

        K Offline
        K Offline
        kmy_ra
        wrote on last edited by
        #3

        did you linked the libraries for D3D (in OpenGl : glaux.lib...)

        1 Reply Last reply
        0
        • D Dev578

          I made an empty Win32 project in VC++ v7, and then added a C++ file to it. I made an exact copy of one of the Direct3D working tutorials and pasted it into the empty C++ file. I copied all of the DirectX include files and library's into the directories tbat VC++ uses. When I try to build it, it gives me the following errors: Linking... AnotherOne.obj : error LNK2019: unresolved external symbol _Direct3DCreate9@4 referenced in function "long __cdecl InitD3D(struct HWND__ *)" (?InitD3D@@YAJPAUHWND__@@@Z) AnotherOne.obj : error LNK2019: unresolved external symbol _D3DXCreateTextureFromFileA@12 referenced in function "long __cdecl InitGeometry(void)" (?InitGeometry@@YAJXZ) AnotherOne.obj : error LNK2019: unresolved external symbol _D3DXLoadMeshFromXA@32 referenced in function "long __cdecl InitGeometry(void)" (?InitGeometry@@YAJXZ) AnotherOne.obj : error LNK2019: unresolved external symbol _D3DXMatrixPerspectiveFovLH@20 referenced in function "void __cdecl SetupMatrices(void)" (?SetupMatrices@@YAXXZ) AnotherOne.obj : error LNK2019: unresolved external symbol _D3DXMatrixLookAtLH@16 referenced in function "void __cdecl SetupMatrices(void)" (?SetupMatrices@@YAXXZ) AnotherOne.obj : error LNK2019: unresolved external symbol _D3DXMatrixRotationY@8 referenced in function "void __cdecl SetupMatrices(void)" (?SetupMatrices@@YAXXZ) AnotherOne.obj : error LNK2019: unresolved external symbol __imp__timeGetTime@0 referenced in function "void __cdecl SetupMatrices(void)" (?SetupMatrices@@YAXXZ) Debug/AnotherOne.exe : fatal error LNK1120: 7 unresolved externals Yes, I named the project "AnotherOne," this is because of several attempts:) If anyone could help me out, that would be great. -Dev578

          J Offline
          J Offline
          Jijo Raj
          wrote on last edited by
          #4

          You should specify the directX libs in the project settings. Regards, Jijo. ;) ________________________________ Yesterday is history, Tomorrow is a mystery, But today is a present.

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups