Compiling in VS2013

If you're having trouble using Context Free or don't understand the language, ask for help here.

Moderators: MtnViewJohn, chris, mtnviewmark

Post Reply
jaycaz
Posts: 2
Joined: Tue Feb 11, 2014 9:38 am

Compiling in VS2013

Post by jaycaz »

Hello,

I am an undergraduate researcher and am looking to potentially implement a grammar induction system on top of Context Free. Currently, I am using Windows 8 and would like to compile the source code in Visual Studio 2013. What steps would I need to take to successfully compile the Context Free program? So far, I tried building the ContextFreeCLIVS11 solution and the only issue is these three linker errors:

1>Win32System.obj : error LNK2019: unresolved external symbol __imp__PathAppendA@8 referenced in function "public: virtual class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __thiscall Win32System::relativeFilePath(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (?relativeFilePath@Win32System@@UAE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@ABV23@0@Z)

1>Win32System.obj : error LNK2019: unresolved external symbol __imp__PathFileExistsA@4 referenced in function "public: virtual class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __thiscall Win32System::relativeFilePath(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (?relativeFilePath@Win32System@@UAE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@ABV23@0@Z)

1>Win32System.obj : error LNK2019: unresolved external symbol __imp__PathRemoveFileSpecA@4 referenced in function "public: virtual class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __thiscall Win32System::relativeFilePath(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (?relativeFilePath@Win32System@@UAE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@ABV23@0@Z)

Thanks!

User avatar
MtnViewJohn
Site Admin
Posts: 875
Joined: Fri May 06, 2005 2:26 pm
Location: Mountain View, California
Contact:

Re: Compiling in VS2013

Post by MtnViewJohn »

The 32-bit debug build is missing a dependency on Shlwapi.lib

If you got the source using Mercurial then just update to the current head.

Or you can fix it yourself. Right-click on the ContextFreeCLIVS11 project in Solution Explorer and choose properties. In the project properties window select Configuration Properties->Linker->Input. Make sure that the Debug/Win32 configuration is selected. In the Additional Dependencies property add Shlwapi.lib to the list of libraries. It should be:
libavformat.a;libavutil.a;libavcodec.a;GdiPlus.lib;Shlwapi.lib;%(AdditionalDependencies)

jaycaz
Posts: 2
Joined: Tue Feb 11, 2014 9:38 am

Re: Compiling in VS2013

Post by jaycaz »

Success! Thanks so much for your quick help and for the patch. I was blown away when I found this program, since it fits just what I need and is a lot better designed than I ever could have done, so I am really looking forward to working with it. Keep up the good work!

Post Reply