473,385 Members | 1,769 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,385 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 1579
"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: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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: 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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.