Game Dev Forum
September 10, 2010, 09:22:11 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Beginning Game Programming 3E is a complete rewrite with all new source code--a good starting point for anyone wanting to learn DirectX.
 
   Home   Help Media Login Register  
Pages: [1]   Go Down
  Print  
Author Topic: DirectX 10 Compile Problems  (Read 75 times)
0 Members and 1 Guest are viewing this topic.
Blahrg
Lurker
*

Karma: 0
Offline Offline

Posts: 18


« on: July 25, 2010, 09:22:02 PM »

I realize this might not be the place to ask this, but I've tried many places and just seem to be ignored, I hope you guys can help.

I'm getting some problems that I can't seem to fix when I try to compile my code.

I get this error:

Quote
error C2660: 'D3DX10CreateEffectFromFileW' : function does not take 12 arguments



And it applies to this line:

Quote
r = D3DX10CreateEffectFromFile(L"../GameLib/DefaultShader.fx", NULL, NULL, "fx_4_0", shaderFlags, 0, m_pDevice, NULL, NULL, &m_pDefaultEffect, &pErrors, NULL);

Now the problem would usually seem obvious, but the problem is that the function actually does take 12 arguments. So I would guess that this error has something to do with the linker error or vise-versa.



I also get this error, which I realize is a linking error but I've linked all the correct libraries.

Quote
error LNK2001: unresolved external symbol _D3DX10CreateTextureFromFileW@20



These are what I have linked

Quote
ws2_32.lib
winmm.lib
dsound.lib
dinput8.lib
d3d10.lib
d3dx10.lib
dxguid.lib
odbc32.lib
odbccp32.lib
d3dx10d.lib
Logged
J. Harbour
Administrator
Expert Member
*****

Karma: 43
Offline Offline

Posts: 1767


WWW
« Reply #1 on: July 26, 2010, 10:20:19 AM »

Is your project configured for multi-byte character set? That looks like a possible cause.
Logged
Blahrg
Lurker
*

Karma: 0
Offline Offline

Posts: 18


« Reply #2 on: July 26, 2010, 02:32:26 PM »

I've tried that, it causes more errors.
Logged
J. Harbour
Administrator
Expert Member
*****

Karma: 43
Offline Offline

Posts: 1767


WWW
« Reply #3 on: July 26, 2010, 06:50:00 PM »

It could be a problem that you link d3dx10.lib and d3dx10d.lib at the same time...the functions will be identical so this may cause an error.
Logged
Blahrg
Lurker
*

Karma: 0
Offline Offline

Posts: 18


« Reply #4 on: July 26, 2010, 08:19:02 PM »

Took out d3dx10d.lib while leaving d3dx10.lib in and still got the errors.

Tried taking out d3dx10.lib while leaving d3dx10d.lib and again still got the errors.

I honestly have no idea what the problem is.
Logged
Blahrg
Lurker
*

Karma: 0
Offline Offline

Posts: 18


« Reply #5 on: July 26, 2010, 08:41:21 PM »

Fixed these errors, stupid me had the library referencing to June 2007 SDK when this is more recent then that.
Logged
J. Harbour
Administrator
Expert Member
*****

Karma: 43
Offline Offline

Posts: 1767


WWW
« Reply #6 on: July 27, 2010, 12:39:45 PM »

r = D3DX10CreateEffectFromFile(L"../GameLib/DefaultShader.fx", NULL, NULL, "fx_4_0", shaderFlags, 0, m_pDevice, NULL, NULL, &m_pDefaultEffect, &pErrors, NULL);


Take out the L in front of the filename, and set the character set of your project to multi-byte.

Logged
Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!