Thread: DirectX app won't compile on release mode

  1. #1
    Pursuing knowledge confuted's Avatar
    Join Date
    Jun 2002
    Posts
    1,916

    DirectX app won't compile on release mode

    It compiles fine on Debug mode (MSVC 6). I'd post the code but... uh... there's a lot. I think I'm forgetting to link a library or something silly like that anyway, because it's giving me the following link errors:

    Code:
    Linking...
    capplication.obj : error LNK2001: unresolved external symbol _Direct3DCreate9@4
    capplication.obj : error LNK2001: unresolved external symbol _D3DXMatrixPerspectiveFovLH@20
    capplication.obj : error LNK2001: unresolved external symbol __imp__InitCommonControls@0
    main.obj : error LNK2001: unresolved external symbol _D3DXMatrixMultiply@12
    main.obj : error LNK2001: unresolved external symbol _D3DXMatrixTranslation@16
    main.obj : error LNK2001: unresolved external symbol _D3DXMatrixRotationZ@8
    main.obj : error LNK2001: unresolved external symbol _D3DXMatrixRotationY@8
    main.obj : error LNK2001: unresolved external symbol _D3DXMatrixRotationX@8
    main.obj : error LNK2001: unresolved external symbol _D3DXCreateTextureFromFileA@12
    Release/DirectX 9 Engine v00.exe : fatal error LNK1120: 9 unresolved externals
    Error executing link.exe.
    ...what did I forget?
    Away.

  2. #2
    C++ Developer XSquared's Avatar
    Join Date
    Jun 2002
    Location
    Ontario, Canada
    Posts
    2,718
    When you added the libraries to the link tab, you did it only for the Debug configuration. On the dropdown menu, you have to select Release and add the appropriate libraries.
    Naturally I didn't feel inspired enough to read all the links for you, since I already slaved away for long hours under a blistering sun pressing the search button after typing four whole words! - Quzah

    You. Fetch me my copy of the Wall Street Journal. You two, fight to the death - Stewie

  3. #3
    Pursuing knowledge confuted's Avatar
    Join Date
    Jun 2002
    Posts
    1,916
    Thanks, that did it.

    Here, have a screenshot . That took a while, and still needs a lot of work done to make it into anything good.

    edit: changed the link to a picture that's reasonable for you guys on dialup
    Last edited by confuted; 08-02-2003 at 05:39 AM.
    Away.

  4. #4
    Carnivore ('-'v) Hunter2's Avatar
    Join Date
    May 2002
    Posts
    2,879
    Wouldn't it be simpler just to link it in the code?
    Code:
    #pragma comment(lib, "thelibrary.lib")
    Just Google It. √

    (\ /)
    ( . .)
    c(")(") This is bunny. Copy and paste bunny into your signature to help him gain world domination.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. DirectX screenshot via C (app crashes)
    By Delusionz in forum C Programming
    Replies: 6
    Last Post: 01-11-2009, 09:55 AM
  2. Implementing "ls -al"
    By pdstatha in forum Linux Programming
    Replies: 11
    Last Post: 03-20-2002, 04:39 AM
  3. Implementing "ls -al"
    By pdstatha in forum C Programming
    Replies: 7
    Last Post: 03-06-2002, 05:36 PM
  4. opengl code not working
    By Unregistered in forum Windows Programming
    Replies: 4
    Last Post: 02-14-2002, 10:01 PM
  5. Debugging mode selection during compile time
    By YALINI in forum C Programming
    Replies: 1
    Last Post: 09-03-2001, 09:56 AM