Linking in Visual Studio 2017

Help for Audacity 2.x.x on Windows.
Forum rules
ImageThis forum is for Audacity 2.x.x on Windows.
Please state which version of Windows you are using,
and the exact three-section version number of Audacity from "Help menu > About Audacity".


Audacity 1.2.x and 1.3.x are obsolete and no longer supported. If you still have those versions, please upgrade at https://www.audacityteam.org/download/.
The old forums for those versions are now closed, but you can still read the archives of the 1.2.x and 1.3.x forums.
Post Reply
ppinter88
Posts: 6
Joined: Fri Jul 27, 2018 8:52 pm
Operating System: Windows 10

Linking in Visual Studio 2017

Post by ppinter88 » Tue Aug 14, 2018 10:19 pm

Successfully compiled VC++ on Visual Studio 2017, but when linking, get the following unexpected unresolved externals:

Severity Code Description Project File Line Suppression State
Error LNK2001 unresolved external symbol "__declspec(dllimport) public: class wxColour & __thiscall wxColour::operator=(class wxColour &&)" ([email protected]@[email protected][email protected]@Z) Audacity ...\audacity-master\win\Projects\Audacity\AColor.obj

Error LNK2001 unresolved external symbol "__declspec(dllimport) public: class wxImage & __thiscall wxImage::operator=(class wxImage &&)" ([email protected]@[email protected][email protected]@Z) Audacity ...\audacity-master\win\Projects\Audacity\Theme.obj

Error LNK2001 unresolved external symbol "__declspec(dllimport) public: __thiscall wxColour::wxColour(class wxColour &&)" ([email protected]@[email protected][email protected]@Z) Audacity ...\audacity-master\win\Projects\Audacity\AColor.obj

Error LNK2001 unresolved external symbol "__declspec(dllimport) public: __thiscall wxImage::wxImage(class wxImage &&)" ([email protected]@[email protected][email protected]@Z) Audacity ...\audacity-master\win\Projects\Audacity\ImageManipulation.obj

Error LNK2001 unresolved external symbol _compress2 Audacity ...\audacity-master\win\Projects\Audacity\libid3tag.lib(util.obj)

Error LNK2001 unresolved external symbol _uncompress Audacity ...\audacity-master\win\Projects\Audacity\libid3tag.lib(util.obj)

Any ideas how to fix?

steve
Site Admin
Posts: 48678
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Linking in Visual Studio 2017

Post by steve » Wed Aug 15, 2018 8:23 am

There's a lot of changes affecting the current development code that are not yet documented. For now I would recommend building Audacity 2.2.2 and following the instructions in /win/compile.txt (using VS 2013 and Wx 3.0.2)

Audacity 2.3.0 is due to be released in about a month, so the build instructions should be complete by then.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

ppinter88
Posts: 6
Joined: Fri Jul 27, 2018 8:52 pm
Operating System: Windows 10

Re: Linking in Visual Studio 2017

Post by ppinter88 » Wed Aug 15, 2018 6:11 pm

Building Audacity version 2.2.2 in Visual Studio 2017 and getting the following error:
C1189 Macro definition of snprintf conflicts with Standard Library function declaration (in stdio.h)
Projects affected: libsndfile, libnyquist, lv2

ppinter88
Posts: 6
Joined: Fri Jul 27, 2018 8:52 pm
Operating System: Windows 10

Re: Linking in Visual Studio 2017

Post by ppinter88 » Wed Aug 15, 2018 6:43 pm

Building Audacity 2.2.2 in Visual Studio 2017 with Platform Toolset set to 2013 and no longer get errors regarding macro definition of snprintf.
Reduced to two errors that are the same:
C2766 explicit specialization; 'std::hash<wxString>' has already been defined
Occurs in projects mod-script-pipe and Audacity. File affected: ...\audacity-audacity-2.2.2\src\memoryx.h on line 1182

steve
Site Admin
Posts: 48678
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Linking in Visual Studio 2017

Post by steve » Wed Aug 15, 2018 7:02 pm

9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

ppinter88
Posts: 6
Joined: Fri Jul 27, 2018 8:52 pm
Operating System: Windows 10

Re: Linking in Visual Studio 2017

Post by ppinter88 » Fri Aug 17, 2018 2:24 pm

Thanks Steve,
Was not following instructions close enough.
Though I did use the latest stable release of wxWidgets, which is version 3.0.4.

Post Reply