Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

LNK2001 error after upgrade to VS2008 and XP64 from VS2005 and XP32

Posted on 2008-10-24
3
Medium Priority
?
2,240 Views
Last Modified: 2013-11-26
I have a Win32 DLL project which builds perfectly on my VS2005(pro) machine running XP32(pro). On a newer machine with VS2008(standard)  running XP64 the same code fails to link with the following errors:

asl.lib(AAFAlgorithm2.obj) : error LNK2001: unresolved external symbol "unsigned int (__stdcall* ATL::g_pfnGetThreadACP)(void)" (?g_pfnGetThreadACP@ATL@@3P6GIXZA)
...
asl.lib(AAFInfo.obj) : error LNK2001: unresolved external symbol "unsigned int (__stdcall* ATL::g_pfnGetThreadACP)(void)" (?g_pfnGetThreadACP@ATL@@3P6GIXZA)

where asl.lib is a third-party 32bit library.
I can register the successfully built DLL on the newer machine and it works fine, but I can't seem to build it on the newer machine. I don't know if this is a XP32-XP64 issue, or a VS05-VS08 issue. I've read a lot of advice from the internet about these LNK2001 errors, but nothing has worked yet. I'm open to all suggestions no matter how obvious they may seem.

Thanks
Compiler command line:
/Od /I "..\..\Inc" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "WINVER=0x0501" /D "_CRT_SECURE_NO_DEPRECATE" /D "_VC80_UPGRADE=0x0600" /D "_WINDLL" /D "_MBCS" /Gm /EHsc /RTC1 /MTd /Yu"stdafx.h" /Fp".\Debug/AlgorithmDLL.pch" /Fo".\Debug/" /Fd".\Debug/" /W3 /nologo /c /ZI /errorReport:prompt
 
 
Link command line:
/OUT:"Debug/ColorFilter.dll" /INCREMENTAL /NOLOGO /LIBPATH:"..\..\lib\debug" /LIBPATH:"..\..\lib" /DLL /MANIFEST /MANIFESTFILE:".\Debug\ColorFilter.dll.intermediate.manifest" /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /NODEFAULTLIB:"libc" /NODEFAULTLIB:"nafxcw" /NODEFAULTLIB:"msvcrt" /NODEFAULTLIB:"mfc42" /NODEFAULTLIB:"mfcs42" /NODEFAULTLIB:"libcmt" /NODEFAULTLIB:"libcd" /DEF:".\AlgorithmDLL.def" /DELAYLOAD:"OleAcc.dll" /DEBUG /PDB:".\Debug/ColorFilter.pdb" /SUBSYSTEM:WINDOWS /DYNAMICBASE:NO /IMPLIB:".\Debug/ColorFilter.lib" /MACHINE:X86 /ERRORREPORT:PROMPT libtiff.lib base.lib ail.lib winmm.lib wsock32.lib asl.lib lcmsd.lib DelayImp.lib

Open in new window

0
Comment
Question by:Croow
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 19

Accepted Solution

by:
drichards earned 2000 total points
ID: 22806171
Unforunately, g_pfnGetThreadACP is removed from VS2008.  Since you say asl.lib is third party, you'll need to keep building with VS2005, get a newer version of the third party library that is built with VS2008, build a custom version of ATL, or modify the third party source code yourself if that is an option.

Look at the differences between the two version of atlconv.h at the
 "#if(n)def _CONVERSION_DONT_USE_THREAD_LOCALE"
to see the differences.  Logic was greatly simplified in VS2008 and g_pfnGetThreadACP was obsoleted.
0
 
LVL 19

Expert Comment

by:drichards
ID: 22806178
Since it looks like you are building the third party library, you could just change the call or replicate the old g_pfnGetThreadACP  function in a library of your own and add the new library to the link dependency list of the third party library.
0
 
LVL 1

Author Comment

by:Croow
ID: 22806503
It's a big relief to confirm this isn't an XP64 issue.
I will keep working with VS05 until our vendor provides a new library.

Thanks
0

Featured Post

Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It seems a simple enough task, yet I see repeated questions asking how to do it: how to pass data between two forms. In this article, I will show you the different mechanisms available for you to do just that. This article is directed towards the .N…
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

670 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question