#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2003
    Posts
    2
    Rep Power
    0

    Errors compiling with my header file


    Linking...
    main.obj : error LNK2001: unresolved external symbol "int __cdecl yo(void)" (?yo@@YAHXZ)
    Debug/bitmapDraw.exe : fatal error LNK1120: 1 unresolved externals
    Error executing link.exe.

    That is the error I continue to receive when trying to compile my program. I will place the code for my header and source file below. Any help would be greatly appreciated, this is driving me crazy :) .

    work.h
    ------------------------------------------
    #define KEYDOWN(vk_code) ((GetAsyncKeyState(vk_code) & 0x8000) ? 1 : 0)
    #define KEYUP(vk_code) ((GetAsyncKeyState(vk_code) & 0x8000) ? 0 : 1)

    // initializes a direct draw struct
    #define DDRAW_INIT_STRUCT(ddstruct) { memset(&ddstruct,0,sizeof(ddstruct)); ddstruct.dwSize=sizeof(ddstruct); }


    int yo(void);
    -------------------------------------------

    work.cpp
    -------------------------------------------
    int yo(void)
    {
    return(1);
    }
    -------------------------------------------
  2. #2
  3. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2003
    Posts
    2
    Rep Power
    0
    Disregard the above post :) . As usual I overlooked a minute detail and shot everything to hell. But all is well now in the world again. Signing off untill my next blunder...

IMN logo majestic logo threadwatch logo seochat tools logo