473,399 Members | 3,888 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

Debug version of LIB/DLL isn't linking with caller

Forgive me for re-posting this...in the first post, I replied to myself, and
the self-reply may having sounded like I found the problem, but it was
actually a correction.

-----------------

I have a very strange problem trying to link the debug version of my caller
application with one of my DLL's using .NET 2K5. The linker declares the
following error:

error LNK2001: unresolved external symbol
__imp_?MyExportedObject@@YAXW4MsgCategory@@PB_WK1@ Z
When I perform a 'dumpbin' on the debug version of my DLL and its
corresponding LIB file, MyExportedObject has the following export signature
in both dumps:

?MyExportedObject@@YAXW4MsgCategory@@PBGK1@Z
However, the *release* version of my DLL and its LIB file having the
following signature:

?MyExportedObject@@YAXW4MsgCategory@@PB_WK1@Z

So, I can link the release version of my DLL to both the debug and the
release versions of my caller, but I have no such luck trying to link the
debug version of the DLL. This seems to only be a problem with the .NET 2K5
compiler; I wasn't having this problem with 2K3. It's as if the debug
version isn't using the lib file supplied to it or it's otherwise making a
determination about the symbols that's only compliant with the release
version of the dll. Any thoughts or suggestions would be greatly appreciated.

Thanks,

-Mike

Dec 22 '05 #1
2 1582
"mike2036" <mi******@discussions.microsoft.com> wrote in message
news:A8**********************************@microsof t.com...
I have a very strange problem trying to link the debug version of my
caller
application with one of my DLL's using .NET 2K5. The linker declares the
following error:

error LNK2001: unresolved external symbol
__imp_?MyExportedObject@@YAXW4MsgCategory@@PB_WK1@ Z
When I perform a 'dumpbin' on the debug version of my DLL and its
corresponding LIB file, MyExportedObject has the following export
signature
in both dumps:

?MyExportedObject@@YAXW4MsgCategory@@PBGK1@Z
However, the *release* version of my DLL and its LIB file having the
following signature:

?MyExportedObject@@YAXW4MsgCategory@@PB_WK1@Z

So, I can link the release version of my DLL to both the debug and the


There is a little widget bundled with the compiler that can undecorate
names:

C:\>undname.exe ?MyExportedObject@@YAXW4MsgCategory@@PB_WK1@Z
Microsoft (R) C++ Name Undecorator
Copyright (C) Microsoft Corporation 1981-2001. All rights reserved.

Undecoration of :- "?MyExportedObject@@YAXW4MsgCategory@@PB_WK1@Z "
is :- "void __cdecl MyExportedObject(enum MsgCategory,wchar_t const
*,unsigned l
ong,wchar_t const *)"

C:\>undname ?MyExportedObject@@YAXW4MsgCategory@@PBGK1@Z
Microsoft (R) C++ Name Undecorator
Copyright (C) Microsoft Corporation 1981-2001. All rights reserved.

Undecoration of :- "?MyExportedObject@@YAXW4MsgCategory@@PBGK1@Z"
is :- "void __cdecl MyExportedObject(enum MsgCategory,unsigned short const
*,uns
igned long,unsigned short const *)"

So, I suggest you check your project's settings. It may be that the "Treat
wchar_t as built-in type" option is different between builds.

Regards,
Will
Dec 22 '05 #2
Thanks William. That was it.

-Mike
"William DePalo [MVP VC++]" wrote:
"mike2036" <mi******@discussions.microsoft.com> wrote in message
news:A8**********************************@microsof t.com...
I have a very strange problem trying to link the debug version of my
caller
application with one of my DLL's using .NET 2K5. The linker declares the
following error:

error LNK2001: unresolved external symbol
__imp_?MyExportedObject@@YAXW4MsgCategory@@PB_WK1@ Z
When I perform a 'dumpbin' on the debug version of my DLL and its
corresponding LIB file, MyExportedObject has the following export
signature
in both dumps:

?MyExportedObject@@YAXW4MsgCategory@@PBGK1@Z
However, the *release* version of my DLL and its LIB file having the
following signature:

?MyExportedObject@@YAXW4MsgCategory@@PB_WK1@Z

So, I can link the release version of my DLL to both the debug and the


There is a little widget bundled with the compiler that can undecorate
names:

C:\>undname.exe ?MyExportedObject@@YAXW4MsgCategory@@PB_WK1@Z
Microsoft (R) C++ Name Undecorator
Copyright (C) Microsoft Corporation 1981-2001. All rights reserved.

Undecoration of :- "?MyExportedObject@@YAXW4MsgCategory@@PB_WK1@Z "
is :- "void __cdecl MyExportedObject(enum MsgCategory,wchar_t const
*,unsigned l
ong,wchar_t const *)"

C:\>undname ?MyExportedObject@@YAXW4MsgCategory@@PBGK1@Z
Microsoft (R) C++ Name Undecorator
Copyright (C) Microsoft Corporation 1981-2001. All rights reserved.

Undecoration of :- "?MyExportedObject@@YAXW4MsgCategory@@PBGK1@Z"
is :- "void __cdecl MyExportedObject(enum MsgCategory,unsigned short const
*,uns
igned long,unsigned short const *)"

So, I suggest you check your project's settings. It may be that the "Treat
wchar_t as built-in type" option is different between builds.

Regards,
Will

Dec 23 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: John Mudd | last post by:
When debugging python, I add print statements such as these. print 'i=%s' % `i` print 'foo()=%s' % `foo()` print 'a,b,c=%s' % `a,b,c` I just want to dump the value of a variable or...
1
by: Daveyk0 | last post by:
Hello there, I have a front end database that I have recently made very many changes to to allow off-line use. I keep copies of the databases on my hard drive and link to them rather than the...
1
by: Girish | last post by:
Hi... Hope somebody can help me or point me to a solution! I have a piece of code that I can compile on multiple platforms(using ifdef etc...). I have tried compiling the same with dot net....
5
by: David++ | last post by:
Hi there, I have built a DLL in Visual C++ 6. When I build the DLL it builds fine for the debug version of the DLL (and this DLL works fine), however, I seem unable to build a Release version of...
2
by: Michael | last post by:
Running DB2 v7 UDB ("DB2 v7.1.0.93", "n031208" and "WR21333") on Windows XP, I am unable to find out why the "Build for Debug" option within Stored Procedure Builder is not enabled on Java stored...
1
by: mike2036 | last post by:
I have a very strange problem trying to link the debug version of my caller application with one of my DLL's using .NET 2K5. The linker declares the following error (one of many): error...
4
by: Brett Romero | last post by:
Say I have this setup: public static void SomeMethod() { #if DEBUG .... #endif }
6
by: Andrew Rowley | last post by:
I am having trouble getting debug and release builds to work properly with project references using C++ .NET and Visual Studio 2003. I created a test solution, with a basic Windows form C++...
1
by: moshehaim1 | last post by:
Hi, I am working with C++ code that needs to be maintained both in debug and release versions. The environment is Windows 32 bit with MSVC8. I downloaded the python installation for Win32 and...
2
by: joelkeepup | last post by:
Hi, I made a change this morning and now im getting an error that says either "a is undefined or null" or "e is undefined or null" the microsoft ajax line is below, I have no idea how to...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.