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

Which library do I need to add?

167 views
Skip to first unread message

Michael

unread,
May 21, 2010, 5:35:01 AM5/21/10
to
Hi, I am trying to link a very old console program written in 1992 as I've
got to fix a bug (I haven't made any changes to it yet, just trying to build
the original source). I'm using Visual C++ 6.0 on Windows XP.

I'm getting the following unresolved externals:
--------------------Configuration: make1 - Win32 Debug--------------------
Microsoft (R) Program Maintenance Utility Version 6.00.8168.0
Copyright (C) Microsoft Corp 1988-1998. All rights reserved.
link /RELEASE /NODEFAULTLIB /INCREMENTAL:NO /PDB:NONE /RELEASE /NOLOGO
-subsystem:console,4.0 lpr.obj lp.obj -out:lpr.exe libc.lib oldnames.lib
kernel32.lib wst.lib wsock32.lib advapi32.lib
lpr.obj : error LNK2001: unresolved external symbol __ctime64
lpr.obj : error LNK2001: unresolved external symbol __time64
lpr.obj : error LNK2001: unresolved external symbol ___security_cookie
lpr.obj : error LNK2001: unresolved external symbol @__security_check_cookie@4
lpr.obj : error LNK2001: unresolved external symbol ___iob_func
lpr.obj : error LNK2001: unresolved external symbol __findnext64i32
lpr.obj : error LNK2001: unresolved external symbol __findfirst64i32
lpr.exe : fatal error LNK1120: 7 unresolved externals
NMAKE : fatal error U1077: 'link' : return code '0x460'
Stop.
Error executing NMAKE.

make1.exe - 9 error(s), 0 warning(s)


Any idea what libraries I need to add / change to resolve these? I've tried
internet searches but haven't found anything helpful.

I have compiled and linked this before succesfully, but that was 4 years ago
and an older PC, so something's changed in the mean time. I did try a build
in VS2010 but got *lots* of errors and warnings.

Thanks,

Michael

David Lowndes

unread,
May 21, 2010, 6:19:09 AM5/21/10
to
>Hi, I am trying to link a very old console program written in 1992 as I've
>got to fix a bug (I haven't made any changes to it yet, just trying to build
>the original source). I'm using Visual C++ 6.0 on Windows XP.
>
>I'm getting the following unresolved externals:
>--------------------Configuration: make1 - Win32 Debug--------------------
>Microsoft (R) Program Maintenance Utility Version 6.00.8168.0
>Copyright (C) Microsoft Corp 1988-1998. All rights reserved.
> link /RELEASE /NODEFAULTLIB /INCREMENTAL:NO /PDB:NONE /RELEASE /NOLOGO
>-subsystem:console,4.0 lpr.obj lp.obj -out:lpr.exe libc.lib oldnames.lib
>kernel32.lib wst.lib wsock32.lib advapi32.lib
>lpr.obj : error LNK2001: unresolved external symbol __ctime64
>lpr.obj : error LNK2001: unresolved external symbol __time64
>lpr.obj : error LNK2001: unresolved external symbol ___security_cookie
>lpr.obj : error LNK2001: unresolved external symbol @__security_check_cookie@4
>lpr.obj : error LNK2001: unresolved external symbol ___iob_func
>lpr.obj : error LNK2001: unresolved external symbol __findnext64i32
>lpr.obj : error LNK2001: unresolved external symbol __findfirst64i32

Michael,

From the presence of those "64" symbols it would appear that something
in your project has perhaps been built with a more recent version of
VS - I don't remember VC6 having the "64" variants of those library
functions.

Dave

Michael

unread,
May 21, 2010, 9:33:01 AM5/21/10
to
You were right, I'd previously attempted a build using a newer version of
Visual Studio and was getting lots of errors + warnings about deprecated
functions. I then remember it was built with the old version so I switched
back. But it had left "new" object files behind and those were failing to
link under the old version, since I hadn't made any changes to the source the
object files hadn't got regenerated. Deleting everything and doing a
Rebuild all has fixed the problem and I'm now able to build the executable.

So now I can go ahead and try and fix the bug that started all this!

Thanks for your help.

Michael
"David Lowndes" wrote:

> .
>

0 new messages