Board index » cppbuilder » DirectDraw: <ddraw.h> and Linking Error

DirectDraw: <ddraw.h> and Linking Error


2006-02-03 06:40:31 AM
cppbuilder16
Hello,
I've typed in a simple DirectDraw example program found in the book "Borland
C++ Builder 4 Unleashed". The source code compliles without a problem, but
I receive the following linking error:
Unresolved external 'DirectDrawCreate' referenced from
D:\PROJECTS\DIRECTDRAW\SAMPLE01\SDMAIN.OBJ
In the course of looking for why this might be happening, I came across
basically the same program example in the following directory:
"$(BCB)\Examples\DDraw\DDraw1a"
When I loaded/compiled this project it I didn't receive the linking error
and the program ran. I've looked at the source code(C++ and Header files)
of both projects and haven't found any differences(except for comment
lines). I've also looked at the Options dialog for both projects and
haven't found any differences.
Anyway, why does the project I've entered in manually generate the linking
error while the project found in Examples directory build without a hitch?
Thanks,
James OBrien
 
 

Re:DirectDraw: <ddraw.h> and Linking Error

"James O'Brien" < XXXX@XXXXX.COM >wrote in message
Quote
I've typed in a simple DirectDraw example program found in the book
"Borland C++ Builder 4 Unleashed". The source code compliles without
a problem, but I receive the following linking error:
You probably did not add ddraw.lib to your project.
Quote
In the course of looking for why this might be happening, I came
across basically the same program example in the following directory:

"$(BCB)\Examples\DDraw\DDraw1a"

When I loaded/compiled this project it I didn't receive the linking error
and the program ran.
Compare the library references between your project file and the demo
project file.
Quote
I've looked at the source code(C++ and Header files) of both projects
and haven't found any differences(except for comment lines).
You are looking in the wrong place. You need to look at the project files
themselves, not the source files that they include.
Quote
Anyway, why does the project I've entered in manually generate the
linking error while the project found in Examples directory build without
a hitch?
Because your project is not linking to something that the demo project does.
Gambit
 

Re:DirectDraw: <ddraw.h> and Linking Error

Hi James,
don't bother wasting your time, try our components instead...
bcb-tools.com
"RAD DirectX for Borland C++ Builder"
- darren
"James O'Brien" < XXXX@XXXXX.COM >wrote in message
Quote
Hello,

I've typed in a simple DirectDraw example program found in the book
"Borland
C++ Builder 4 Unleashed". The source code compliles without a problem,
but
I receive the following linking error:

Unresolved external 'DirectDrawCreate' referenced from
D:\PROJECTS\DIRECTDRAW\SAMPLE01\SDMAIN.OBJ

In the course of looking for why this might be happening, I came across
basically the same program example in the following directory:

"$(BCB)\Examples\DDraw\DDraw1a"

When I loaded/compiled this project it I didn't receive the linking error
and the program ran. I've looked at the source code(C++ and Header
files)
of both projects and haven't found any differences(except for comment
lines). I've also looked at the Options dialog for both projects and
haven't found any differences.

Anyway, why does the project I've entered in manually generate the linking
error while the project found in Examples directory build without a
hitch?

Thanks,
James OBrien



 

{smallsort}