Windows XP Forums


Reply
Thread Tools Display Modes

error LNK2001: unresolved external symbol "unsigned int (__stdcall*

 
 
Sankaran
Guest
Posts: n/a
 
      11th December 2009
Hello Everyone,

I am trying to create a .DLL using VS 2005. While linking, I am
getting the following error;
-----------------------------------------------------------------------------------------------------------
error LNK2001: unresolved external symbol "unsigned int (__stdcall*
ATL::g_pfnGetThreadACP)(void)" (?g_pfnGetThreadACP@ATL@@3P6GIXZA)
-----------------------------------------------------------------------------------------------------------
I searched and found few answers like "all the dependent modules
should be built with VS 2005", "Link atls.lib".
I have tried the above steps and tried including few Windows header
files as suggested in few forums as an answer to the
same issue. Unfortunately, nothing works out !

To brief: I have few .LIB files, which will be linked and finally I
will be getting a .DLL file. I am building these modules (.LIB
and .DLL) in VS 2005. This is a non-MFC DLL.

Any suggestions are really appreciable!

Best regards,
Sankaran
 
Reply With Quote
 
 
 
 
Burkhardt Braun
Guest
Posts: n/a
 
      11th December 2009
Hello!
On Dec 11, 12:20*pm, Sankaran <psank...@gmail.com> wrote:
> Hello Everyone,
>
> I am trying to create a .DLL using VS 2005. While linking, I am
> getting the following error;
> -----------------------------------------------------------------------------------------------------------
> error LNK2001: unresolved external symbol "unsigned int (__stdcall*
> ATL::g_pfnGetThreadACP)(void)" (?g_pfnGetThreadACP@ATL@@3P6GIXZA)
> -----------------------------------------------------------------------------------------------------------
> I searched and found few answers like "all the dependent modules
> should be built with VS 2005", "Link atls.lib".
> I have tried the above steps and tried including few Windows header
> files as suggested in few forums as an answer to the
> same issue. Unfortunately, nothing works out !
>
> To brief: I have few .LIB files, which will be linked and finally I
> will be getting a .DLL file. I am building these modules (.LIB
> and .DLL) in VS 2005. This is a non-MFC DLL.
>
> Any suggestions are really appreciable!

1. So I wrote a program like this
#include <atlbase.h>
#include <stdio.h>
int main( void )
{
printf( "%p\n", g_pfnGetThreadACP );
return( 0 );
}

2. I compiled it with cl test.cpp -link /verbose:lib

3. It produced the following output:
00401083

So the program works fine.

4. Now: The searched libraries should be the same as in your
environment. They are:
Searching libraries
Searching D:\Program Files\Microsoft Visual Studio 8\VC\LIB
\uuid.lib:
Searching D:\Program Files\Microsoft Visual Studio 8\VC\ATLMFC\LIB
\atls.lib:
Searching D:\Program Files\Microsoft Visual Studio 8\VC\LIB
\kernel32.lib:
Searching D:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK
\lib\user32.lib:
Searching D:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK
\lib\advapi32.lib:
Searching D:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK
\lib\ole32.lib:
Searching D:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK
\lib\shell32.lib:
Searching D:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK
\lib\oleaut32.lib:
Searching D:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK
\lib\shlwapi.lib:
Searching D:\Program Files\Microsoft Visual Studio 8\VC\LIB
\LIBCMT.lib:
Searching D:\Program Files\Microsoft Visual Studio 8\VC\LIB
\OLDNAMES.lib:
Searching D:\Program Files\Microsoft Visual Studio 8\VC\LIB
\uuid.lib:
Searching D:\Program Files\Microsoft Visual Studio 8\VC\ATLMFC\LIB
\atls.lib:
Searching D:\Program Files\Microsoft Visual Studio 8\VC\LIB
\kernel32.lib:
Searching D:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK
\lib\user32.lib:
Searching D:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK
\lib\advapi32.lib:
Searching D:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK
\lib\ole32.lib:
Searching D:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK
\lib\shell32.lib:
Searching D:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK
\lib\oleaut32.lib:
Searching D:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK
\lib\shlwapi.lib:

It is a good idea that you try produce the same steps as above and to
approximate
the above source and compiler flags to your code.

Kind regards
Burkhardt Braun



 
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Error on page symbol on certain web pages " help please" Huggy Windows XP Networking 0 25th July 2005 07:13 PM
Manual "Windows Update" produces "ActiveX/active scripting" error message even with "LOW" security level setting in "Trusted" Zone Ray2 Windows XP Help and Support 1 14th November 2003 05:50 PM
"at" symbol lee Windows XP New Users 1 12th October 2003 03:57 PM
Unresolved error CTSNZ Windows XP Security 0 19th August 2003 11:29 PM
Reading an "unsigned driver" Bill Freed Windows XP Hardware 0 17th July 2003 06:18 PM


All times are GMT. The time now is 05:05 AM.
Windows XP Forums is an independent website and is not affiliated with Microsoft Corporation.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26