taglib-devel Digest, Vol 76, Issue 4

Kris Gustafson kris3927gus at hotmail.com
Tue Oct 12 01:58:02 CEST 2010


Thanks for addressing my issue so quickly.

I re-ran CMake with "/Zc:wchar_t-" *removed* from the CMakeLists.txt file,
recompiled the taglib BUILD_ALL project , recompiled my MFC application
(using the new lib and dll tablib files) and ran it.  The project rebuilds
without errors (compiler or linker), but when I run the MFC application I
get system error message:

	"The procedure entry point ??0FileName at TagLig@@QAE at PB_W@Z could not
be located in the dynamic link library tagd.dll.

Yes, I rebuilt both the release and debug versions of taglib project (after
running CMake to generate the VS solution file).

When I change the CMakeLists.txt file back  to "/Zc:wchar_t-", run CMake
again, batch-build BUILD_ALL, bring up the MFC project in VC  and change the
MFC project to the same setting, the MFC application shows neither link
errors not the system error at run time (woot!)

One problem solved, but the memory leak persists.  I will try to narrow down
the leak source. I would also be happy to make available the VS 2008 project
source, it that would help.

Thanks again for your suggestions.

Regards,
Kris Gustafson

-----Original Message-----
From: taglib-devel-request at kde.org [mailto:taglib-devel-request at kde.org] 
Sent: Sunday, October 10, 2010 3:00 AM
To: taglib-devel at kde.org
Subject: taglib-devel Digest, Vol 76, Issue 4

Send taglib-devel mailing list submissions to
	taglib-devel at kde.org

To subscribe or unsubscribe via the World Wide Web, visit
	https://mail.kde.org/mailman/listinfo/taglib-devel
or, via email, send a message with subject or body 'help' to
	taglib-devel-request at kde.org

You can reach the person managing the list at
	taglib-devel-owner at kde.org

When replying, please edit your Subject line so it is more specific than
"Re: Contents of taglib-devel digest..."


Today's Topics:

   1. Get link errors when I try to use UNICODE version of TagLib
      calls (Kris Gustafson)
   2. Re: Get link errors when I try to use UNICODE version of
      TagLib calls (Luk?? Lalinsk?)


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

Message: 1
Date: Sat, 9 Oct 2010 12:11:34 -0700
From: Kris Gustafson <kris3927gus at hotmail.com>
Subject: Get link errors when I try to use UNICODE version of TagLib
	calls
To: <taglib-devel at kde.org>
Message-ID: <SNT122-DS1A5691E8BB36944E6C81AA2510 at phx.gbl>
Content-Type: text/plain; charset="us-ascii"

Hello,

 

I have compiled TagLib version 1.6.3 using CMake version 2.8.1 and Visual
Studio Pro 2008 on Windows 7 (x64) to create the tag.dll and tagd.dll (and
the other files).

When I attempt to instantiate a TagLib::FileName with a wchar_t string in my
MFC application, I get this link error:

 

1>MusicInfoFactory.obj : error LNK2001: unresolved external symbol
"__declspec(dllimport) public: __thiscall TagLib::FileName::FileName(wchar_t
const *)" (__imp_??0FileName at TagLib@@QAE at PB_W@Z)

1>C:\Users\Kris.Kris-Pilar-PC.000\Documents\Visual Studio 
1>2008\Projects\MFC
Projects\MakeM3U\Debug\MakeM3U.exe : fatal error LNK1120: 1 unresolved
externals

 

If I use a char string for the same constructor call, no link error.

 

Is there some compiler switch or #define I have failed to set correctly? 

Another possible side effect is using the char strings may cause a memory
leak when I instantiate a TagLib::FileRef object (or it could be
coincidental.).

 

Any ideas or is more information needed?

 

Thanks in advance,

Kris Gustafson

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://mail.kde.org/pipermail/taglib-devel/attachments/20101009/6899cdd7/att
achment-0001.htm 

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

Message: 2
Date: Sat, 9 Oct 2010 21:25:37 +0200
From: Luk?? Lalinsk? <lalinsky at gmail.com>
Subject: Re: Get link errors when I try to use UNICODE version of
	TagLib calls
To: taglib-devel at kde.org
Message-ID:
	<AANLkTimawHExXZ8At_vm=pRTAM+Y-pdFOLG8QvnBN=Ve at mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1

On Sat, Oct 9, 2010 at 9:11 PM, Kris Gustafson <kris3927gus at hotmail.com>
wrote:
> Hello,
>
> I have compiled TagLib version 1.6.3 using CMake version 2.8.1 and 
> Visual Studio Pro 2008 on Windows 7 (x64) to create the tag.dll and 
> tagd.dll (and the other files).
>
> When I attempt to instantiate a TagLib::FileName with a wchar_t string 
> in my MFC application, I get this link error:
>
> 1>MusicInfoFactory.obj : error LNK2001: unresolved external symbol
> "__declspec(dllimport) public: __thiscall 
> TagLib::FileName::FileName(wchar_t
> const *)" (__imp_??0FileName at TagLib@@QAE at PB_W@Z)
>
> 1>C:\Users\Kris.Kris-Pilar-PC.000\Documents\Visual Studio 
> 1>2008\Projects\MFC
> Projects\MakeM3U\Debug\MakeM3U.exe : fatal error LNK1120: 1 unresolved 
> externals
>
> If I use a char string for the same constructor call, no link error.
>
> Is there some compiler switch or #define I have failed to set correctly?

No, I think it's the problem mentioned here -
http://stackoverflow.com/questions/1520986/open-file-in-taglib-with-unicode-
chars-in-filename/1526606#1526606

Basically, the CMake build files have some weird option enabled, which makes
the build incompatible with applications built without that option.

> Another possible side effect is using the char strings may cause a 
> memory leak when I instantiate a TagLib::FileRef object (or it could 
> be coincidental.).

Do you have more details on the memory leak? If it leaks memory, I'd really
like to get it fixed.

Lukas


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

_______________________________________________
taglib-devel mailing list
taglib-devel at kde.org
https://mail.kde.org/mailman/listinfo/taglib-devel


End of taglib-devel Digest, Vol 76, Issue 4
*******************************************



More information about the taglib-devel mailing list