Jump to content
  • Advertisement
Sign in to follow this  
Makoy

Weird linking problem

This topic is 5393 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

Hello Gamedev! I have a problem linking the code in Visual C++ 6. It started when I downloaded the code in www.winprog.net's simple directx window tutorial. After I finished downloading it, I compiled and linked it. It works fine. But when I paste the code into a new sheet (Saved it as a window.cpp,) and link it, it displays a link error. Can you guys help me out on this? Thank you in advance.

Share this post


Link to post
Share on other sites
Advertisement
What kind of project did you create? Make sure it is not a console app, even if you save it as window.cpp if you create a console app it won't work!

Share this post


Link to post
Share on other sites
It's not a console app. It's a basic window that I got in winprog.net. I copied and paste it in a new cpp file. I have no problem compiling it but when I linked it, it doesn't work. The strange thing is the downloaded source files works when I linked it.

Share this post


Link to post
Share on other sites
Hi.

Are you using the same project ? Or do you have created another Win32 project ?
If you have created another win32 project, then you have to tell the project which libraries it must link with.
If you just have copy-paste the code into another cpp file, which you have added to the already created project from winprog, then there should be no problems...

Share this post


Link to post
Share on other sites
This thread sounds like the same problem you are having. You have 2 questions to ask yourself?

(1) What type of project did I create? It should be Win32 Project, *not* Win32 Console Project.

(2) Have I told the compiler to link the additional DX libraries? If you use D3D, you will need D3D9.lib.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

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

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!