Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

unreslove external problem.. 1

Status
Not open for further replies.

Singaporean

Technical User
May 20, 2004
1
SG
Hi and firstly thanks to all who bothered with this,

So here it goes...

When I tried to compile my program, it has no errors but when I tried to run it, the error messages that appeared are

1) unresolved external symbol "void __cdecl
DisplaySalRange (int,int)" (?DisplaySalRange@@YAXHH@Z)

2) error LNK2001: unresolved external symbol "void __cdecl
GetGrossSal(int,int)" (?GetGrossSal@@YAXHH@Z)

3) LIBCD.lib(wincrt0.obj) : error LNK2001: unresolved
external symbol _WinMain@16

To all kind souls, may I know what are these three pests (espeically the last one cos i've had it many times already) and how may I resolve these, thanks again...

 
I'm from Argentina and I Know that my english is not
good, sorry about this!.

The problem is that any file of your project is not
included very well.

If you are working with MFC you must delete all
included lines in cpp files whit the format
#include "filename.h" and you must copy to StdAfx.h file,
being sure that the new inclusion have the correct order.
The unique inclusion that you must to keep in each cpp file
of your project is: #include "StdAfx.h"
Sorry newly for my english.

 
I'm from Argentina and I Know that my english is not
good, sorry about this!.

The problem is that any file of your project have preblems
with the order of included files.

If you are working with MFC you must cut all
included lines in cpp files whit the format
#include "filename.h" and you must copy to StdAfx.h file,
being sure that the new inclusion have the correct order.
The unique inclusion that you must to keep in each cpp file
of your project is: #include "StdAfx.h"
Sorry newly for my english.

 
Hey holamax...

Thanks for replying ...but seriously...what you mean is to include in my every .cpp files the StdAfx.h is it?...
But is this an existing header file cos it can't be found...!!
 
hi,singaporean :
maybe your project was not created through MFC.
So you need to create an windows entry function:WinMain(...) all by yourself.

And the below two functions is unreslove externals:
DisplaySalRange (int,...)
GetGrossSal(int,int),
maybe you just include the header files(*.h) that only declaim their protypes and need their implement files(*.cpp) be added to your project.
Also maybe you should add a library in project/setting
that implements these functions for you.

 
I recently ran into this problem also. How I resolved the problem is that I was missing a specific library file in the linking process. I'm using MS C++ 6.0 and I found by include in the options settings under link, that I could include the appropriate library file.

I found the appropriate library by following through the MSDN search database for the function that was giving me the problem. Locating the function in the documentation knowledge base, usually it contains at the bottom of the page the appropriate header files, and library.

It worked for me, but I worked for days trying to figure out what was causing this error.

Hope this helps.

Scott.
 
Hi everyone, actually I'm singaporean, don't know why but I ended up with 2 names....kinda blur...anyway...

firstly thanks to all who've replied but this reply is specially directed to sjn(scott)...

Dear friend...

Is the function that you've mentioned above that is giving you problem a pre defined fucntion?
And the MSDN search database that you've mentioned is it the HELP in MS VC++ 6.0? Because due to something, I've loaded in my MS VC++ without any help...

And also you said that you located the function that was giving you problems in the documentation knowledege database...What's this documentation knowledge base thing? Is it in the MS VC++ help?....

God bless...
Chris...
 
Hi yuppie

You said "MSDN search database that you've mentioned is it the HELP in MS VC++ 6.0? Because due to something, I've loaded in my MS VC++ without any help..."

If you go to Help|Search you can search for functions causing errors and find libs and *.h files needed to stop linking errors.

Once you find the needed *.lib files go to Project|Settings|Link and simply add the *lib(s)....

Sounds like you didn't install the 'documentation knowledege database (V++ help)'. Need to install this, it's got lots of info, though I don't understand much of it as I'm very new the C++....

Time Out
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top