Weird linking problem

Started by
4 comments, last by circlesoft 19 years, 6 months ago
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.
Flamers are worst than Newbies
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!
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.
Flamers are worst than Newbies
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...
You might try giving us more information than "it doesn't work".
Stay Casual,KenDrunken Hyena
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.
Dustin Franklin ( circlesoft :: KBase :: Mystic GD :: ApolloNL )

This topic is closed to new replies.

Advertisement