Results 1 to 7 of 7

Thread: AN ERROR THAT IS REALLY PISSING ME OFF!!!

  1. #1

    Thread Starter
    Hyperactive Member Warmaster199's Avatar
    Join Date
    Aug 2000
    Location
    Canada
    Posts
    306

    Angry

    Ok, this is it! I am trying to create a DirectX 3D Engine, but I am having some problems creating it using VC++ 5.0. My 3 problem functions are:

    D3DXVec3Normalize, D3DXVec3TransformNormal, D3DXMatrixMultiply

    When my program compiles, it complains: "Unresolved External Reference" and the name of the 3 function calls in the file called I3DCorona.cpp. What's going on? How can I fix this?

    D3DX project
    Designer/Programmer of the Comtech Operating System(CTOS)

  2. #2
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    Do you have a header to correspond to those functions, and has it been included into your source file (the one you're calling the functions from)?
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  3. #3

    Thread Starter
    Hyperactive Member Warmaster199's Avatar
    Join Date
    Aug 2000
    Location
    Canada
    Posts
    306
    Yes, it has been declared in an include file. The file is:

    #include<D3DXMaths.h>

    It contains the functions, but I can't use them. I can open the header in Visual C(under external dependencies) and explore it. Those functions are there, and the file IS included.

    do I have to re-declare the sub as external?[EX: extern D3DXVec3Normalize(.......)]?

    I can't use my VC5 compiler to test it right now, my friend is borrowing my CD(burned) for VB5.
    PLEASE HELP!
    Designer/Programmer of the Comtech Operating System(CTOS)

  4. #4
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    It depends...are the function bodies actually in the header file? Or are they in a separate source file?

    If they're separate, then you need to link with the library or an object file for that source code.
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  5. #5

    Thread Starter
    Hyperactive Member Warmaster199's Avatar
    Join Date
    Aug 2000
    Location
    Canada
    Posts
    306
    The functions are called in the include file, ie: Not in file, just called. This is what it looks like in the D3DXMath.h include file:

    Code:
    D3DXVECTOR3* WINAPI D3DXVec3Normalize( D3DXVECTOR3 *pOut, const D3DXVECTOR3 *pV );
    All the functions that worked previously were inline functions that had their "bodies" in the include file. I think I know the problem. I think I've got to include the library too. As I said earier, I can't compile or test anything as my compiler on a CD that I let my friend borrow.

    If this works, Thank you in advance
    Designer/Programmer of the Comtech Operating System(CTOS)

  6. #6

    Thread Starter
    Hyperactive Member Warmaster199's Avatar
    Join Date
    Aug 2000
    Location
    Canada
    Posts
    306
    It works! I'm going to continue working...


    (those little images under my name don't work. How can I upload them?)
    Designer/Programmer of the Comtech Operating System(CTOS)

  7. #7
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    You need a web graphic of 50x50 pixels, under some size limit...You can upload them in your options.
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width