Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

carb

Can't Link w/ DX9 - Help!

This topic is 5761 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I''ve tried running just about every tutorial I can find (particularly those that come with DX9), and I keep getting this error (or something like it) when I try to build the project. I''ve added the library and header files, and bumped the up to #1 on the lists - there must be something I''m missing. Ideas? Linking... CreateDevice.obj : error LNK2001: unresolved external symbol _Direct3DCreate9@4 LIBCD.lib(crt0.obj) : error LNK2001: unresolved external symbol_main Debug/CreateDevice.exe : fatal error LNK1120: 2 unresolved externals Error executing link.exe Also, I prefer to use Bloodshed''s Dev-C++ than Visual C++. Anyone successfully compiling DX9 with Dev-C++ please tell me how ;p Thanks, - carb

Share this post


Link to post
Share on other sites
Advertisement
Are you defining #define INITGUID after the headers. In your linker options are you setting it /subsystem: windows
Generally check though the linker options to see if u have the right options

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
you need to make a win32 application and not a win32 console application

and you just need to add


#pragma comment(lib, "d3d9.lib"
#pragma comment(lib, "d3dx9.lib"


to one of your .cpp files in the project

Share this post


Link to post
Share on other sites
You might try the DirectX 9 AppWizard from within the Visuall C IDE usually when you type new from your File section its under projects.

I tried the teapot example sort of like the old C/C++ hello world. It did compile and link in the DX9 lib and ran ok.

Might be a good example you can look at so you can determine why your program is not compiling and linking the DX9 librarys or you could use the code thats generated as staring point to get a working program up and running.

Just a thought.

Doug

Share this post


Link to post
Share on other sites
I suppose I didn''t link the files explicitly in the project settings e.g. C:\DXSDK\Lib\*.lib ... So now I know how to do it with Visual C++, but what about the Bloodshed compiler? Anyone here writing DX apps with Dev-C/C++?

- carb

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!