Hi,
I have a cpp file ( PLMRetEval.cpp) with makefile (gcc) which I got from this link:
Positional Language Models for Information Retrieval
Can I use this makefile to to debug and run cpp in VC++ or codeblocks??
Thnak you,,
Hi,
I have a cpp file ( PLMRetEval.cpp) with makefile (gcc) which I got from this link:
Positional Language Models for Information Retrieval
Can I use this makefile to to debug and run cpp in VC++ or codeblocks??
Thnak you,,
If you understand what's going on in the makefile, just configure those IDE's to do the same thing (basically defining some names, linking some libraries, and compiling). That said, you might succeed in directly using the makefile with Code::Blocks if you're using g++ with Code::Blocks.
Look up a C++ Reference and learn How To Ask Questions The Smart WayOriginally Posted by Bjarne Stroustrup (2000-10-14)
Thank you laserlight,
this link is to the makefile:
http://sifaka.cs.uiuc.edu/~ylv2/pub/plm/Makefile
I tried to configure the both IDE's with (link libraries, include directory), I don't know what else do I have to configure??
I tried also in Code::Blocks using GUN gcc, but when I use my makefile in "custom makefile" and build I gor this error:
"No rule to make target `Debug'. Stop."
I don't know how to solve it????
Did you try compiling at that point?Originally Posted by huda
Look up a C++ Reference and learn How To Ask Questions The Smart WayOriginally Posted by Bjarne Stroustrup (2000-10-14)
yes I did? but something still missing bcz I get this error:
..\..\cygwin\lemur-4.10\include\QueryNode.hpp|215|error: 'INT_MAX' was not declared in this scope|
I want to tell that I have tried to run this cpp file in windows using cygwin and it worked,
now I'm linking to libraries under cygwin directory (libz ,lpthread ,lib)
I'm not sure if this is correct??
Last edited by huda; 02-26-2012 at 11:44 AM.
there are actually three errors:
..\..\cygwin\lemur-4.10\include\lemur-compat.hpp|23|error: xutility: No such file or directory|
..\..\cygwin\lemur-4.10\include\QueryNode.hpp|215|error: 'INT_MAX' was not declared in this scope|
..\..\cygwin\lemur-4.10\include\QueryNode.hpp|512|error: 'INT_MAX' was not declared in this scope|
thank you manasij7479, it solved the error...
for this error :
..\..\cygwin\lemur-4.10\include\lemur-compat.hpp|23|error: xutility: No such file or directory|
it is if-else
#ifdef WIN32
#include <xutility>
#include <direct.h>
#include <string.h>
#define LEMUR_MKDIR_NO_MODE
#define LEMUR_STRNICMP
#else
#include <utility>
#include <fstream>
#include <sys/types.h>
#include <sys/stat.h>
#define LEMUR_USES_ENUM_OPENMODE
#endif
so I removed the if part and it worked...
but now I have this error:
..\..\cygwin\lemur-4.10\include\lemur-compat.hpp|120|error: '::_mkdir' has not been declared|
this is the position in code:
#ifdef LEMUR_MKDIR_NO_MODE
inline int mkdir( const char* path, int mode ) {
return ::_mkdir(path);
}
#else
inline int mkdir( const char* path, int mode ) {
return ::mkdir(path, mode);
}
#endif
Last edited by huda; 02-26-2012 at 12:04 PM.
I'm still working on that, I'm trying to make changes in dependency directories and linking lib...
now I'm getting many of this error which I don't understand:
..\..\Program Files (x86)\Lemur\Lemur 4.10\lib\lemur.lib(.\Release\XMLReader.obj):c:\pro gram files\m.text$x+0x5)||undefined reference to `_imp_??1exception@@UAE@XZ'
Can anyone tell what is wrong now???
Yes, Elysia ....I contact them but no reply?!!
they are providing this link to show steps to compile using VC++:
The Lemur Toolkit - using the Lemur Toolkit API with Visual Studio
I tried that but it didn't work...I got this error:
1>c:\program files\lemur\lemur 4.12\include\lemur-platform.h(22) : fatal error C1083: Cannot open include file: 'unistd.h': No such file or directory
Is this related to the type of the project that I select when I build a new project??
Last edited by huda; 02-26-2012 at 11:43 PM.
Do you need to build it from source? It appears the Windows version installs the lib files you need.
Yes, but when I compile I got unresolved externals??