Page 1 of 1

Compiling in VS2013

Posted: Mon Feb 17, 2014 10:24 pm
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!

Re: Compiling in VS2013

Posted: Tue Feb 18, 2014 4:12 pm
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)

Re: Compiling in VS2013

Posted: Tue Feb 18, 2014 10:40 pm
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!