Overclock.net › Forums › Software, Programming and Coding › Coding and Programming › Application Programming › [C++]Linking error (im pretty sre iv got right libraries linked)
New Posts  All Forums:Forum Nav:

[C++]Linking error (im pretty sre iv got right libraries linked)

post #1 of 8
Thread Starter 
Quote:
Error1error LNK2001: unresolved external symbol "bool __cdecl BuildVertexBuffer(struct IDirect3DVertexBuffer9 * * *,struct strVertex *,int)" (?BuildVertexBuffer@@YA_NPAPAPAUIDirect3DVertexBuf fer9@@PAUstrVertex@@H@Z)
Any ideas? I'm updating someones directx8 app to DX9, using
Code:
#pragma comment(lib,"d3d9.lib")
#pragma comment(lib,"d3dx9.lib")
#pragma comment(lib, "tokamak.lib")
#pragma comment(lib, "winmm.lib")
to add the .libs

Any ideas?

Thanks, FiX
    
CPUMotherboardGraphicsGraphics
FX-8350 Asus Crosshair V MSI GTX460 Hawk 1gb MSI GTX460 Hawk 1gb 
RAMHard DriveHard DriveHard Drive
Kingston HyperX 8gb (2x4gb) Crucial M4 64GB Samsung F3 1TB Western Digital 320GB 
CoolingOSMonitorMonitor
Custom WC Windows 7 Ultimate X64 Dell E2311H Dell E2311H 
MonitorKeyboardPowerCase
LH 23EN43 Ducky Year of the Dragon 2012 SilverStone Strider 1000W-P Corsair 800D 
Audio
Asus Xonar Essence STX 
  hide details  
Reply
    
CPUMotherboardGraphicsGraphics
FX-8350 Asus Crosshair V MSI GTX460 Hawk 1gb MSI GTX460 Hawk 1gb 
RAMHard DriveHard DriveHard Drive
Kingston HyperX 8gb (2x4gb) Crucial M4 64GB Samsung F3 1TB Western Digital 320GB 
CoolingOSMonitorMonitor
Custom WC Windows 7 Ultimate X64 Dell E2311H Dell E2311H 
MonitorKeyboardPowerCase
LH 23EN43 Ducky Year of the Dragon 2012 SilverStone Strider 1000W-P Corsair 800D 
Audio
Asus Xonar Essence STX 
  hide details  
Reply
post #2 of 8
Thread Starter 
Bump
    
CPUMotherboardGraphicsGraphics
FX-8350 Asus Crosshair V MSI GTX460 Hawk 1gb MSI GTX460 Hawk 1gb 
RAMHard DriveHard DriveHard Drive
Kingston HyperX 8gb (2x4gb) Crucial M4 64GB Samsung F3 1TB Western Digital 320GB 
CoolingOSMonitorMonitor
Custom WC Windows 7 Ultimate X64 Dell E2311H Dell E2311H 
MonitorKeyboardPowerCase
LH 23EN43 Ducky Year of the Dragon 2012 SilverStone Strider 1000W-P Corsair 800D 
Audio
Asus Xonar Essence STX 
  hide details  
Reply
    
CPUMotherboardGraphicsGraphics
FX-8350 Asus Crosshair V MSI GTX460 Hawk 1gb MSI GTX460 Hawk 1gb 
RAMHard DriveHard DriveHard Drive
Kingston HyperX 8gb (2x4gb) Crucial M4 64GB Samsung F3 1TB Western Digital 320GB 
CoolingOSMonitorMonitor
Custom WC Windows 7 Ultimate X64 Dell E2311H Dell E2311H 
MonitorKeyboardPowerCase
LH 23EN43 Ducky Year of the Dragon 2012 SilverStone Strider 1000W-P Corsair 800D 
Audio
Asus Xonar Essence STX 
  hide details  
Reply
post #3 of 8
Which compiler are you using? It sounds to me like the compiler doesn't know where the DX9 includes and library files are.

Do you have the DirectX SDK installed? If not, you'll need it.
http://msdn.microsoft.com/en-us/directx/aa937788
Edited by lordikon - 5/12/11 at 8:42pm
Foldatron
(17 items)
 
Mat
(10 items)
 
Work iMac
(9 items)
 
CPUMotherboardGraphicsGraphics
i7 950 EVGA x58 3-way SLI EVGA GTX 660ti GTX 275 
RAMHard DriveHard DriveHard Drive
3x2GB Corsair Dominator DDR3-1600 80GB Intel X25-M SSD 2TB WD Black 150GB WD Raptor 
Hard DriveOSMonitorKeyboard
2x 150GB WD V-raptor in RAID0 Win7 Home 64-bit OEM 55" LED 120hz 1080p Vizio MS Natural Ergonomic Keyboard 4000 
PowerCase
750W PC P&C Silencer CoolerMaster 690 
CPUGraphicsRAMHard Drive
Intel Core i5 2500S AMD 6770M 8GB (2x4GB) at 1333Mhz 1TB, 7200 rpm 
Optical DriveOSMonitorKeyboard
LG 8X Dual-Layer "SuperDrive" OS X Lion 27" iMac screen Mac wireless keyboard 
Mouse
Mac wireless mouse 
CPUGraphicsRAMHard Drive
i7-2600K AMD 6970M 1GB 16GB PC3-10600 DDR3 1TB 7200rpm 
Hard DriveOptical DriveOSMonitor
256GB SSD 8x DL "SuperDrive" OS X 10.7 Lion 27" 2560x1440 iMac display 
Monitor
27" Apple thunderbolt display 
  hide details  
Reply
Foldatron
(17 items)
 
Mat
(10 items)
 
Work iMac
(9 items)
 
CPUMotherboardGraphicsGraphics
i7 950 EVGA x58 3-way SLI EVGA GTX 660ti GTX 275 
RAMHard DriveHard DriveHard Drive
3x2GB Corsair Dominator DDR3-1600 80GB Intel X25-M SSD 2TB WD Black 150GB WD Raptor 
Hard DriveOSMonitorKeyboard
2x 150GB WD V-raptor in RAID0 Win7 Home 64-bit OEM 55" LED 120hz 1080p Vizio MS Natural Ergonomic Keyboard 4000 
PowerCase
750W PC P&C Silencer CoolerMaster 690 
CPUGraphicsRAMHard Drive
Intel Core i5 2500S AMD 6770M 8GB (2x4GB) at 1333Mhz 1TB, 7200 rpm 
Optical DriveOSMonitorKeyboard
LG 8X Dual-Layer "SuperDrive" OS X Lion 27" iMac screen Mac wireless keyboard 
Mouse
Mac wireless mouse 
CPUGraphicsRAMHard Drive
i7-2600K AMD 6970M 1GB 16GB PC3-10600 DDR3 1TB 7200rpm 
Hard DriveOptical DriveOSMonitor
256GB SSD 8x DL "SuperDrive" OS X 10.7 Lion 27" 2560x1440 iMac display 
Monitor
27" Apple thunderbolt display 
  hide details  
Reply
post #4 of 8
I can't find any documentation for a function called BuildVertexBuffer(). But I don't know DXx programming.

Try CreateVertexBuffer()?
http://msdn.microsoft.com/en-us/libr...(v=vs.85).aspx
Jillian
(11 items)
 
  
CPUMotherboardGraphicsRAM
Intel Core i5 2500K MSI P67A-G45 B3 MSI GeForce GTX560 Ti GSKILL F3-10666CL9D-8GBRL 
CoolingOSKeyboardPower
Cooler Master Hyper 212 Plus Windows 7 Professional 64-bit Razer Lycosa Corsair 520HX 
CaseMouse
Cooler Master Stacker 830 Razer Mamba 
  hide details  
Reply
Jillian
(11 items)
 
  
CPUMotherboardGraphicsRAM
Intel Core i5 2500K MSI P67A-G45 B3 MSI GeForce GTX560 Ti GSKILL F3-10666CL9D-8GBRL 
CoolingOSKeyboardPower
Cooler Master Hyper 212 Plus Windows 7 Professional 64-bit Razer Lycosa Corsair 520HX 
CaseMouse
Cooler Master Stacker 830 Razer Mamba 
  hide details  
Reply
post #5 of 8
Would you mind posting your source code?
Edited by Tig-O-Bitties - 5/14/11 at 8:39am
    
CPUMotherboardGraphicsRAM
Athlon(tm) II X4 640 Msi 880GM-E41 EVGA 9800 GT G.SKILL Ripjaws 4GB 
Hard DriveOptical DriveOSOS
Seagate Unknown Windows 7 Professional (64-Bit) Ubuntu 11.10 x86 (Debian Linux) 
MonitorKeyboardPowerCase
Dell Logitech G15 Kingwin 730-Watt Rosewell 
Mouse
Trust Predator 
  hide details  
Reply
    
CPUMotherboardGraphicsRAM
Athlon(tm) II X4 640 Msi 880GM-E41 EVGA 9800 GT G.SKILL Ripjaws 4GB 
Hard DriveOptical DriveOSOS
Seagate Unknown Windows 7 Professional (64-Bit) Ubuntu 11.10 x86 (Debian Linux) 
MonitorKeyboardPowerCase
Dell Logitech G15 Kingwin 730-Watt Rosewell 
Mouse
Trust Predator 
  hide details  
Reply
post #6 of 8
If you would mind, could you post the source code? I'm also sorry about the double post. Firefox crashed

EDIT: I just noticed that it was someone else's code so posting it might not work. That being said I will take a shot in the dark. I have had this error pop for one of two reasons. 1. I declare a function such as:
VOID Foo()
{
//Code here
}

I then call the function from say WinMain;
INT WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
{
foo();
}

from what I take the reason it complains of this is because I declare foo as Foo and call it as foo, thus causing the symbol error. 2. I have had this error pop if I A: Don't have an environment variable set for the DXSDK (it's supposed to set one by default) or if your friend send you the project files and he has it linked to his computer vs. the Environment variable.

To fix 1 just check the code is right. To fix 2A open cmd and type :

set DXSDK_DIR

It should come out with a path to the SDK, if not then type setx PATH_TO_SDK. To fix number 2 just set the include and source fields to the variable. If you need more help I will need source code.

Hope this helps,
Tig
Edited by Tig-O-Bitties - 5/14/11 at 8:42am
    
CPUMotherboardGraphicsRAM
Athlon(tm) II X4 640 Msi 880GM-E41 EVGA 9800 GT G.SKILL Ripjaws 4GB 
Hard DriveOptical DriveOSOS
Seagate Unknown Windows 7 Professional (64-Bit) Ubuntu 11.10 x86 (Debian Linux) 
MonitorKeyboardPowerCase
Dell Logitech G15 Kingwin 730-Watt Rosewell 
Mouse
Trust Predator 
  hide details  
Reply
    
CPUMotherboardGraphicsRAM
Athlon(tm) II X4 640 Msi 880GM-E41 EVGA 9800 GT G.SKILL Ripjaws 4GB 
Hard DriveOptical DriveOSOS
Seagate Unknown Windows 7 Professional (64-Bit) Ubuntu 11.10 x86 (Debian Linux) 
MonitorKeyboardPowerCase
Dell Logitech G15 Kingwin 730-Watt Rosewell 
Mouse
Trust Predator 
  hide details  
Reply
post #7 of 8
As far as I know, there is no BuildVertexBuffer function in the library anyway (neither d3d or d3dx).

This would mean that rather than it being a linker problem, it is just something that doesn't exist. If it's your own function, you may have defined its prototype in a header without ever writing the function itself, or mismatched the parameters, or spelled it differently, etc.
Serene Power
(13 items)
 
  
CPUMotherboardGraphicsRAM
Dual Xeon E5620 Supermicro X8DAL-i EVGA 570HD SC 8GiB Corsair DDR3 1333 ECC-R 
Hard DriveOptical DriveOSMonitor
OCZ Agility 3 120GB SSD (+16TB NAS) LG 10x Blu-Ray Windows 7 x64 / Debian x64 Dell 2408WFP, P2411H 
PowerCase
850W CoolerMaster SilentPro M CoolerMaster Cosmos Pure 
  hide details  
Reply
Serene Power
(13 items)
 
  
CPUMotherboardGraphicsRAM
Dual Xeon E5620 Supermicro X8DAL-i EVGA 570HD SC 8GiB Corsair DDR3 1333 ECC-R 
Hard DriveOptical DriveOSMonitor
OCZ Agility 3 120GB SSD (+16TB NAS) LG 10x Blu-Ray Windows 7 x64 / Debian x64 Dell 2408WFP, P2411H 
PowerCase
850W CoolerMaster SilentPro M CoolerMaster Cosmos Pure 
  hide details  
Reply
post #8 of 8
Quote:
Originally Posted by ghell View Post
As far as I know, there is no BuildVertexBuffer function in the library anyway (neither d3d or d3dx).

This would mean that rather than it being a linker problem, it is just something that doesn't exist. If it's your own function, you may have defined its prototype in a header without ever writing the function itself, or mismatched the parameters, or spelled it differently, etc.
I just realized this. Are you sure your not intending to use

Code:
HRESULT CreateVertexBuffer(
  [in]           UINT Length,
  [in]           DWORD Usage,
  [in]           DWORD FVF,
  [in]           D3DPOOL Pool,
  [out, retval]  IDirect3DVertexBuffer9 **ppVertexBuffer,
  [in]           HANDLE *pSharedHandle
);
    
CPUMotherboardGraphicsRAM
Athlon(tm) II X4 640 Msi 880GM-E41 EVGA 9800 GT G.SKILL Ripjaws 4GB 
Hard DriveOptical DriveOSOS
Seagate Unknown Windows 7 Professional (64-Bit) Ubuntu 11.10 x86 (Debian Linux) 
MonitorKeyboardPowerCase
Dell Logitech G15 Kingwin 730-Watt Rosewell 
Mouse
Trust Predator 
  hide details  
Reply
    
CPUMotherboardGraphicsRAM
Athlon(tm) II X4 640 Msi 880GM-E41 EVGA 9800 GT G.SKILL Ripjaws 4GB 
Hard DriveOptical DriveOSOS
Seagate Unknown Windows 7 Professional (64-Bit) Ubuntu 11.10 x86 (Debian Linux) 
MonitorKeyboardPowerCase
Dell Logitech G15 Kingwin 730-Watt Rosewell 
Mouse
Trust Predator 
  hide details  
Reply
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Application Programming
Overclock.net › Forums › Software, Programming and Coding › Coding and Programming › Application Programming › [C++]Linking error (im pretty sre iv got right libraries linked)