Board index » cppbuilder » Re: Newbie at Work: Unresolved External WinMain???

Re: Newbie at Work: Unresolved External WinMain???


2007-05-28 12:38:19 AM
cppbuilder20
Maybe something's wrong with how I installed the DX9 SDK. Is this the
correct way to add toolkits and similar packages?
Tools>Options>Environment Options>C++ Options>Paths and Directories
Quote
Search Path
Am I supposed to use something else?
"Abcidefugian" < XXXX@XXXXX.COM >wrote in message
Quote
Yes, that's it. I still would like to know what is causing this error
message.

The only time I get the linker error is when the call to the function is
not commented out.

I'll try DX9.

"Bob Gonder" < XXXX@XXXXX.COM >wrote in message
news: XXXX@XXXXX.COM ...
>Abcidefugian wrote:
>
>>The strange thing is that when I comment out the call to the function, it
>>compiles properly. Then the application crashes.
>
>Best guess is that your code relys on that function creating a device,
>and crashes because it doesn't have a device to work with.
>
>>Can anybody figure out what is happening?
>>
>>[Linker Error] Error: Unresolved external 'D3D10CreateDeviceAndSwapChain'
>
>You might need to use DirectX 9 instead of 10.
>
>


 
 

Re:Re: Newbie at Work: Unresolved External WinMain???

Abcidefugian wrote:
Quote
Maybe something's wrong with how I installed the DX9 SDK. Is this the
correct way to add toolkits and similar packages?
This is getting technical.
You should probably ask this in the cppbuilder.ide group where folks
who know this stuff hang out.
 

Re:Re: Newbie at Work: Unresolved External WinMain???

Windows has two modes, GUI mode which is the graphical look that you are
used to and Console mode which is a text mode. The command I showed you is
for Console mode.
- Either press Alt-Esc or click the Start button.
- Find the menu entry labeled Command Prompt and click it
- If you cannot find that menu entry then click on Run, type in
CMD and press Enter (for Win95/98/ME type in COMMAND)
When you are done you can close this window by typing the
word EXIT or by clicking the X button in the upper right (on
Win95 I do not thing the X will work - you need to type EXIT).
- Change directory to the one in which the project is located. The
name of that directory is the one you selected when you created
the project in the IDE. A typical project directory name might be
c:\program files\borland\cbuilder6\projects\myproject
where 'c:' indicates the disk drive used and each element following
a backslash (a '\') is the name of a directory.
You change the directory with the command CD as in
CD c:\program files\borland\cbuilder6\projects\myproject
(for Win95/98/ME enclose what follows CD in quotes)
Windows also accepts the command CHDIR to do the
same as the command CD
- If you successfully executed the change directory command
then the prompt (the text the operating system shows on the
last line) will be the directory name followed by a greater than
sign, a '>', as in
C:\Program Files\Borland\CBuilder6\Projects\myproject>
- Now type this command and afterwards press the Enter key
tdump filename.obj | grep -i WInMain
(the '|' is a vertical bar. On my keyboard it is the uppercase
char on the key which also has a backslash, a '\')
Tdump.exe is a program provided with the compiler. It shows
information about a file. Grep.exe is another program that
came with the compiler. It filters text, showing only those
lines of the text it is given which match a pattern that you
give. In this command the '-i' means to ignore upper vs lower
case and the WinMain is the pattern.
. Ed
Quote
Abcidefugian wrote in message
news: XXXX@XXXXX.COM ...

How do I edit command lines?

I'm still new to all of this.

>That is a command line. Tdump.exe and grep.exe are tools supplied with
>the compiler and that command line invokes them.
 

{smallsort}

Re:Re: Newbie at Work: Unresolved External WinMain???

Abcidefugian wrote:
Quote
Maybe something's wrong with how I installed the DX9 SDK.
Is this the correct way to add toolkits and similar packages?

Tools>Options>Environment Options>C++ Options>
Paths and Directories>Search Path
That does not add anything to your project - it sets the ide to find
files in that location if they are added to or called by any project.
Basically it adds to paths listed there to the include and library
paths for all projects.
It appears that your problem is that you are calling a function from a
library that has not been added to your project. To use a third-party
library, usually you need to do two things (assuming the library and
include pats are already set).
Your code should include the appropriate header file(s):
#include "TheLibrary.h";
And the library must be added to the project:
Project | Add to project | TheLibrary.lib
It appears that you have done the first part, but not the second.
- Leo