| | |
Including DDRAW.LIB | H into a project
Please support our C++ advertiser: Intel Parallel Studio Home
Thread Solved |
Hey, I've been trying to understand what the hell I'm doing wrong with this code.
At the beginning, I include the DDRAW.H, and the code compiles with no problem, but as soon as I try using a function from that header, I get a linker error.
The function I used was the DirectDrawCreate(NULL, &lpDD, NULL)
And it's the only function I used, before I typed it in it compiled.
(I also made a global pointer, but that too compiled before adding this function)
Error message:
"error LNK2019: unresolved external symbol _DirectDrawCreate@12 referenced in function..."
I'm assuming this error is because the library file hasn't been included somehow into the project? Anyone know what to do?
Tutorials on the subject? Anything that might help me understand how to work with VC++'s linker
I've added the library directory to the linker, I've added the specific library to the linker, and still nothing.
At the beginning, I include the DDRAW.H, and the code compiles with no problem, but as soon as I try using a function from that header, I get a linker error.
The function I used was the DirectDrawCreate(NULL, &lpDD, NULL)
And it's the only function I used, before I typed it in it compiled.
(I also made a global pointer, but that too compiled before adding this function)
Error message:
"error LNK2019: unresolved external symbol _DirectDrawCreate@12 referenced in function..."
I'm assuming this error is because the library file hasn't been included somehow into the project? Anyone know what to do?
Tutorials on the subject? Anything that might help me understand how to work with VC++'s linker
I've added the library directory to the linker, I've added the specific library to the linker, and still nothing.
Last edited by ShadowScripter; May 13th, 2009 at 3:10 pm.
Try to pass the following arguments to your compiler: 
Edit:: Maybe this is also helpful ...
/EHsc /link YourLib.lib 
Edit:: Maybe this is also helpful ...
Last edited by tux4life; May 13th, 2009 at 3:21 pm.
"Never argue with idiots, they just drag you down to their level and then beat you with experience."
•
•
•
•
After a bit of Googling
•
•
•
•
Just go to project properties -> Configuration properties -> Linker.
Go to -> General and set the "Additional Library directories" to point to your lib file directory.
Then go to Linker -> Input and type in your lib file nameDDRAW.LIBin the "Additional Dependencies" field.
Last edited by tux4life; May 13th, 2009 at 3:40 pm.
"Never argue with idiots, they just drag you down to their level and then beat you with experience."
Last edited by tux4life; May 13th, 2009 at 3:57 pm.
"Never argue with idiots, they just drag you down to their level and then beat you with experience."
![]() |
Similar Threads
- Unresolved External !#?%& (C++)
- HGE and Python (Python)
- IT Project/Implementation Consultant for hire (Post your Resume)
- POSIX lib and MS Visual Studio 2005 (C++)
- Lib to add in project->refernces ,Components (Visual Basic 4 / 5 / 6)
- Including header file in project?? (C++)
- using borland lib classes (C++)
Other Threads in the C++ Forum
- Previous Thread: Need help with understanding some functions
- Next Thread: Ogg to Avi converter!
| Thread Tools | Search this Thread |
api array based beginner binary bitmap c++ c/c++ calculator char char* class classes coding compile compiler console conversion count data database delete deploy desktop developer directshow dll dynamiccharacterarray email encryption error file forms fstream function functions game getline givemetehcodez google graph homeworkhelp homeworkhelper iamthwee ifstream input int integer lib linkedlist linux list loop looping loops map math matrix memory multiple news node number numbertoword output parameter pointer problem program programming project proxy python random read recursion recursive reference return rpg sorting string strings struct template templates text tree unix url vector video visual visualstudio win32 windows winsock word wordfrequency wxwidgets






