PDA

View Full Version : Linker Error in Dev-C++ but not VS2005


poita
05-30-2007, 08:14 AM
Ok, so I've just started messing around with some basic DirectX stuff and up till now I've been using VS2005 on my desktop computer. I added the DX SDK include and library paths to the project directories and everything ran nicely; no problems.

However, I now want to be able to continue working on my project on my old laptop. This thing's only got a little 18Gb hard-drive and it's not so fast so I didn't bother with VS2005 and just installed Bloodshed Dev-C++ instead. I also installed the same DX SDK as well (April 2007). I loaded up my project, added the same include and library paths to the project look up directories but now I'm getting linker errors. To be specific:

[Linker error] undefined reference to `timeGetTime@0'
[Linker error] undefined reference to `timeGetTime@0'
[Linker error] undefined reference to `GetStockObject@4'
[Linker error] undefined reference to `Direct3DCreate9@4'
[Linker error] undefined reference to `D3DXCreateTextureFromFileW@12'
[Linker error] undefined reference to `D3DXMatrixLookAtLH@16'
[Linker error] undefined reference to `D3DXMatrixPerspectiveFovLH@20'
[Linker error] undefined reference to `D3DXMatrixTranslation@16'
[Linker error] undefined reference to `D3DXMatrixRotationX@8'
[Linker error] undefined reference to `D3DXMatrixRotationY@8'
[Linker error] undefined reference to `D3DXMatrixMultiply@12'

I also tried installing Dev-C++ on my desktop PC and I get the same errors.

I have no idea what the problem could be. Any help would be greatly appreciated.

Thanks in advance.

.oisyn
05-30-2007, 08:16 AM
Do you link with d3dx9.lib and winmm.lib?

poita
05-30-2007, 09:06 AM
I link with d3dx9.lib from the SDK but I can't find winmm.lib.

Ok, I'm gonna go get winmm.lib from the platform sdk from vs2005. I'll shall post results in a min.

[EDIT]

Nope. Didn't work. I copied over all the platform SDK files (which included winmm.lib) and added the directory that contained winmm.lib to the linker list and nothing changed.

Wade Berkn
06-20-2007, 03:08 AM
Same thing happened to me, I read somewhere that Dev-c++ isnt supporting directX or something related to their devpacks. This made me sad as I like Dev's environment better than VS 2006.

.oisyn
06-20-2007, 03:54 AM
Then you obviously don't have any experience with vs2005's debugger ;)

Dom_152
06-22-2007, 05:35 AM
You can't use DirectX 9 with Dev C++ can you? It won't link hence your errors.
"I like Dev's environment better than VS 2006"

Are you mad?

poita
06-24-2007, 06:09 AM
Oh, I've already given up on Dev-C++. Turns out that VC++ Express Edition runs alright on this lap top and is a easier to use than Dev-C++.

I did a bit more searching and asking around and it turns out that the compiler can only use lib*.a library files. Apparently there is a tool to convert *.lib libraries to lib*.a libraries but to me it seemed more hassle that it was worth so I just went to VC++ Express Edition.

kusma
06-24-2007, 03:31 PM
"I like Dev's environment better than VS 2006"

Are you mad?
Apparently. There is no such thing as VS 2006. VS 2005, perhaps?

kalo
08-21-2007, 12:32 PM
i have many compilers on my pc; VS is the best for windows type programs, which includes compiling with DX9. when ever i compile with Dev-C++ the program is low tech and garbage, or there's a linker error; i say VS is better, but i agree with the fact that Dev-C++ GUI is better then VS.