Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

unresolved external symbols (eg, _strupr)

193 views
Skip to first unread message

James Hurst

unread,
Jun 10, 1999, 3:00:00 AM6/10/99
to
I'm trying to build a console App that I'd ported from DOS/OS2, and get
a
slew of linker errors, for things that I would think should be included
by the runtime-library.
I'm specifying that MSVCRTD.lib, MSVCPRTD.lib, & MSVCIRTD.lib be linked
in, but that doesn't help. It's complaining of things
like:
error LNK2001: unresolved external symbol _strupr
error LNK2001: unresolved external symbol __imp__strupr
error LNK2001: unresolved external symbol __imp__filelength
error LNK2001: unresolved external symbol __imp_sopen
error LNK2001: unresolved external symbol __imp_itoa
error LNK2001: unresolved external symbol __afxForceEXCLUDE
plus it whines about all the calls to the CString member functions.
Does anyone know what could cause this problem? I'm compiling as a
multi-threaded debug app, but have tried compiling as single-threaded
too.
I'm using Visual C++ 5.0

Thank you,

James Hurst
jhu...@designforge.com

Vijay Kumar Reddy J

unread,
Jun 10, 1999, 3:00:00 AM6/10/99
to
Hi James,

Have you checked the Header file. These functions are defined in
"stdlib.h". In your application these functions may be defined in some other
file so that Compiler may not be able to find the appropriate lib file for
that.
Go to General tab under Project->Settings and choose "Use MFC in a
static library" or "Use MFC in a shared dll" to solve your CString problem.

Regards,
-Vijay


--
~~~~~~~~~~~~~~~
Vijay Kumar Reddy
www.E-Supportpoint.com

James Hurst <jhu...@designforge.com> wrote in message
news:375F386F...@designforge.com...

James Hurst

unread,
Jun 10, 1999, 3:00:00 AM6/10/99
to
Thank you Vijay, I appreciate your help. Unfortunately, choosing "Use MFC in a
shared dll" or static library didn't help with the CString complaints. It's
giving..
<some module> : error LNK2001: unresolved external symbol "public: " and then
__thiscall CString::~CString,
__thiscall CString::operator char const *(void)const
etc. (ie, for everything I'm using in the CString class).
I did try doing a Clean & Rebuild-All.

Thanks, any help will be appreciated,
James Hurst

James Hurst

unread,
Jun 10, 1999, 3:00:00 AM6/10/99
to
That did the trick. Thank you Vijay! I appreciate your help.

James Hurst


Vijay Kumar Reddy J

unread,
Jun 11, 1999, 3:00:00 AM6/11/99
to
Hey James,

It's ok. In earlier message you wrote you were having some problems with
linking to CString functions. What about them? Are you able to get rid of
them?

-Vijay

--
~~~~~~~~~~~~~~~
Vijay Kumar Reddy
www.E-Supportpoint.com

James Hurst <jhu...@designforge.com> wrote in message

news:3760345F...@designforge.com...

James Hurst

unread,
Jun 11, 1999, 3:00:00 AM6/11/99
to
Yes, your suggestion fixed that too. The only problem now is that when I run
the program, BoundsChecker whines of a bad parameter in CString::AssignCopy,
before it begins executing main. I have no file-scope CString declarations,
and evidently the problem is that the 2nd parameter in memcpy is zero.
Thanks,
James Hurst

Vijay Kumar Reddy J wrote:

0 new messages