Page 1 of 2 12 LastLast
Results 1 to 15 of 28
  1. #1
    -Dimensions-'s Avatar
    Join Date
    Jul 2010
    Gender
    male
    Posts
    243
    Reputation
    2
    Thanks
    161
    My Mood
    Aggressive

    Error LNK2001: unresolved external symbol _D3DXCreateFont@48

    [HTML]1>------ Build started: Project: MenuHack, Configuration: Release Win32 ------
    1>Compiling...
    1>Linking...
    1>Base.obj : error LNK2001: unresolved external symbol _D3DXCreateFont@48
    1>C:\Documents and Settings\***\Desktop\CaBase\Release\CaBase.dll : fatal error LNK1120: 1 unresolved externals
    ==========
    Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped
    =========/HTML]

    I searched on MPGH and Google. These are my Includes:

    [HTML]#include <windows.h>
    #include <Winuser.h>
    #include <stdio.h>
    #include <d3d9.h>
    #include <d3dx9.h>
    #include <fstream>
    #include <stdio.h>[/HTML]

    I tried 3 different bases all day and all of them gave me this error!

  2. #2
    markoj's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    s
    Posts
    1,067
    Reputation
    60
    Thanks
    407
    My Mood
    Bored
    where are you creating the font?
    Dont ban me

  3. #3
    Void's Avatar
    Join Date
    Sep 2009
    Gender
    male
    Location
    Inline.
    Posts
    3,193
    Reputation
    205
    Thanks
    1,438
    My Mood
    Mellow
    You didn't link d3dx9.lib.

  4. The Following User Says Thank You to Void For This Useful Post:

    J (08-11-2010)

  5. #4
    -Dimensions-'s Avatar
    Join Date
    Jul 2010
    Gender
    male
    Posts
    243
    Reputation
    2
    Thanks
    161
    My Mood
    Aggressive
    Yes I did

    [html]#pragma comment(lib, "d3dx9.lib")[/html]

    and the font is in the RenderFrame
    [html]
    if( !Base.bSet.bInit )
    {
    D3DXCreateFont(pDevice, 15, 0, FW_BOLD, 1, 0, DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, DEFAULT_QUALITY, DEFAULT_PITCH | FF_DONTCARE, "Arial", &Directx.pFont);
    Base.bSet.bInit = true;
    }

    if( Directx.pFont == NULL )
    Directx.pFont->OnLostDevice();
    else
    {
    Directx.DrawString(10, 22, D3DCOLOR_ARGB(255, 255, 0, 0), Directx.pFont, "<<-Public Menu Dimensions->>");
    Menu.RenderMenu();
    }[/html]

    Edit: This is happening to everything, not just 1 menu.

    "I tried 3 different bases all day and all of them gave me this error! "

  6. #5
    Void's Avatar
    Join Date
    Sep 2009
    Gender
    male
    Location
    Inline.
    Posts
    3,193
    Reputation
    205
    Thanks
    1,438
    My Mood
    Mellow
    Well then it's not finding it. Did you add the libraries directory in your project options?

  7. #6
    -Dimensions-'s Avatar
    Join Date
    Jul 2010
    Gender
    male
    Posts
    243
    Reputation
    2
    Thanks
    161
    My Mood
    Aggressive
    No, I never got this ever, this is just random....

    Where and what do I have to add to the libraries directory?

    Edit:: What do I have to, not where, I all ready know.

    Translated: I all ready know where I can add library Directories, just what is the directory I have to add?
    Last edited by -Dimensions-; 08-11-2010 at 11:51 AM.

  8. #7
    Revolvium's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Posts
    32
    Reputation
    10
    Thanks
    12
    http://msdn.microsoft.com/en-us/libr...8VS.85%29.aspx

    #include "D3dx9core.h"
    #pragma comment(lib, "d3dx9.lib")

    Edit: it looks like you've added your includes, but not your library files. Go to Tools->Options-> Projects and Solutions-> vC++ Directories -> Library Files-> New Path

    Then browse through and find your directx sdk lib folder and choose x86 orr x64 based on your Operating system architecture.
    Last edited by Revolvium; 08-11-2010 at 12:24 PM.

  9. #8
    -Dimensions-'s Avatar
    Join Date
    Jul 2010
    Gender
    male
    Posts
    243
    Reputation
    2
    Thanks
    161
    My Mood
    Aggressive
    Quote Originally Posted by Revolvium View Post
    D3DXCreateFont Function (Windows)

    #include "D3dx9core.h"
    #pragma comment(lib, "d3dx9.lib"

    Edit: it looks like you've added your includes, but not your library files. Go to Tools->Options-> Projects and Solutions-> vC++ Directories -> Library Files-> New Path

    Then browse through and find your directx sdk lib folder and choose x86 orr x64 based on your Operating system architecture.
    I feel like moving everything from C:\Program Files\Microsoft DirectX SDK (June 2010)\Include to my project.

    and by the way....

    [html]#include "D3dx9core.h"
    #pragma comment(lib, "d3dx9.lib"[/html]

    Must have been typed incorrectly.

  10. #9
    Revolvium's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Posts
    32
    Reputation
    10
    Thanks
    12
    Quote Originally Posted by -Dimensions- View Post
    I feel like moving everything from C:\Program Files\Microsoft DirectX SDK (June 2010)\Include to my project.

    and by the way....

    [html]#include "D3dx9core.h"
    #pragma comment(lib, "d3dx9.lib"[/html]

    Must have been typed incorrectly.

    Oopies, forgot the bracket at the end on there. Fixed now.

  11. #10
    -Dimensions-'s Avatar
    Join Date
    Jul 2010
    Gender
    male
    Posts
    243
    Reputation
    2
    Thanks
    161
    My Mood
    Aggressive
    Still, not working. I tried probably every way.

  12. #11
    markoj's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    s
    Posts
    1,067
    Reputation
    60
    Thanks
    407
    My Mood
    Bored
    Quote Originally Posted by -Dimensions- View Post
    Still, not working. I tried probably every way.
    What bases have you tried it in, because i got a similar error in Hybrid, bu tin my own I didn't, i was drawing sprites for both.
    Dont ban me

  13. #12
    CodeDemon's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    vagina
    Posts
    1,074
    Reputation
    50
    Thanks
    936
    My Mood
    Fine
    Have you tried manually adding the libraries to the project like Void mentioned?

  14. #13
    -Dimensions-'s Avatar
    Join Date
    Jul 2010
    Gender
    male
    Posts
    243
    Reputation
    2
    Thanks
    161
    My Mood
    Aggressive
    Yes, I have, and I tried TopBase. It worked 3 times, then I got Error LNK2001: unresolved external symbol _D3DXCreateFont@48 . The only thing I changed was text. So I re-extracted TopBase and I tried again and still Error LNK2001: unresolved external symbol _D3DXCreateFont@48 . I am going to re-install my DirectX SDK and Visual Studio C++ . I'll let everyone know if that worked.

  15. #14
    TheFallenOwns's Avatar
    Join Date
    Oct 2009
    Gender
    male
    Posts
    149
    Reputation
    10
    Thanks
    43
    you ethier did not link the lib
    did not add its source and lib
    or added more than one of its sources/libs

    btw i fixed by only linking the x86 lib of the sdk
    Last edited by TheFallenOwns; 08-12-2010 at 05:31 AM.

  16. #15
    Zoom's Avatar
    Join Date
    May 2009
    Gender
    male
    Location
    Your going on my 24/7 DDoS hit list.
    Posts
    8,561
    Reputation
    127
    Thanks
    5,912
    My Mood
    Happy
    Google is full of answers...
    -Rest in peace leechers-

    Your PM box is 100% full.

Page 1 of 2 12 LastLast

Similar Threads

  1. [Help Request] error LNK2001 | fatal error LNK1120
    By johwsouza in forum Combat Arms BR Coding Help
    Replies: 6
    Last Post: 10-17-2011, 08:25 PM
  2. [Solved] External Hack Error sensitivity
    By Mrfloppie11 in forum Call of Duty Black Ops Help
    Replies: 1
    Last Post: 08-07-2011, 02:27 PM
  3. [Help] Unresolved External Symbols
    By ♪~ ᕕ(ᐛ)ᕗ in forum C++/C Programming
    Replies: 4
    Last Post: 06-17-2011, 04:08 AM
  4. Unresolved external symbol linker error
    By VvITylerIvV in forum C++/C Programming
    Replies: 3
    Last Post: 06-02-2011, 06:44 PM
  5. Hellbreath Int Error?
    By RebornAce in forum General
    Replies: 10
    Last Post: 03-06-2009, 10:04 PM