Hi Hieu Hoang, Sorry it was my mistake. I didn't notice Moses has its own implementation of the class WordLattice, which does have a default contructor. Turns out the error was because the srilm/include directory was specified in front of the moses-cmd/src directory, hence the compiler (and me) tried unsuccessfully to build using the SRILM version of WordLattice. By re-ordering the include directories, I was able to compile in VS2005 with the SRILM option fine.
Just a note that Moses could consider using namespaces (like Java's packages) so as to avoid this confusion during compilation? Thanks for your help. =) Regards, Yestine On Thu, Feb 26, 2009 at 7:26 PM, Hieu Hoang <[email protected]> wrote: > hey yestine > > that sounds good. i'll take a look @ it when i have time. however, if u > manage to solve the issues, please email me directly and i'll incorporate > your changes in the source code > > 2009/2/26 Yestine Goh <[email protected]> >> >> Hi Hieu Hoang, >> I think the error arises due to the way Moses initializes WordLattice >> in main.cpp. Since WordLattice has a user-defined constructor (with >> arguments) and destructor in SRILM, no default constructor is created >> by the compiler. Thus "new WordLattice" in line 72 throws an error. >> The problem might be similar to something like this: >> http://www.gamedev.net/community/forums/topic.asp?topic_id=500402 >> >> Regards, >> Yestine >> >> >> >> On Wed, Feb 25, 2009 at 7:25 PM, Hieu Hoang <[email protected]> wrote: >> > >> > hi yestine >> > >> > the VS2005 build doesn't use SRILM for the same reason you're running >> > into at the moment - compiling and linking the SRILM lib with moses. >> > however, if u manage to sucessfully integrate it with Moses, please let me >> > know & i'll update the info and project files. >> > >> > Hieu Hoang >> > www.hoang.co.uk/hieu >> > >> > ________________________________ >> > From: [email protected] >> > [mailto:[email protected]] On Behalf Of Yestine Goh >> > Sent: 25 February 2009 01:16 >> > To: [email protected] >> > Subject: [Moses-support] Unable to build moses-cmd in VS2005 >> > >> > Hi, >> > >> > I downloaded and build SRILM in VS2005 using the VS project files from >> > http://www.inference.phy.cam.ac.uk/kv227/srilm/, following which I tried to >> > compile Moses in VS2005 with the Debug-withSRILM configuration. >> > >> > Moses\moses compiled fine, but Moses\moses-cmd gave me an error (along >> > with plenty of warnings): >> > moses-cmd\src\main.cpp(72) : error C2512: 'WordLattice' : no appropriate >> > default constructor available >> > >> > It is said that the VS2005 build doesn't use SRILM, but is it because >> > SRILM can't be compiled in Windows or is it due to code compatibility >> > problems with the VS compiler? >> > >> > Thanks & regards, >> > Yestine >> > > > _______________________________________________ Moses-support mailing list [email protected] http://mailman.mit.edu/mailman/listinfo/moses-support
