Hi all,
I have the following code where I am looping through a sdf file and would
like to generate fingerprint for each molecule.
When I compiled it, there was a link error in the end. I am using the
example project setting (I already have obconvd.lib oberrorD.lib OBDLLD.lib
in the project linker’s additional dependencies) which came with the
openbabel package. I tried both version (2.2.1 and 2.2.3). Both failed to
work.
/////////////////Start code///////////////////
OBConversion conv;
OBFingerprint* fp;
fp = OBFingerprint::FindFingerprint("FP2");
if (conv.SetInFormat("sdf")){
OBMol mol;
bool notAtEnd=conv.ReadFile(&mol, argv[1]);
while (notAtEnd)
{
cout << mol.GetTitle() << '\t';
vector<unsigned int> fpVec;
fp->GetFingerprint(&mol, fpVec);
mol.Clear();
notAtEnd=conv.Read(&mol);
}//while (notAtEnd)
}//if (conv.Set...)
/////////////////////End code///////////////////////////
Link error:
1>Compiling...
1>example1.cpp
1>Linking...
1>example1.obj : error LNK2001: unresolved external symbol
"__declspec(dllimport) public: static class OpenBabel::OBFingerprint *
__cdecl OpenBabel::OBFingerprint::FindFingerprint(char const *)"
(__imp_?findfingerpr...@obfingerprint@OpenBabel@@sapa...@pbd@Z)
1>..\debug/example1.exe : fatal error LNK1120: 1 unresolved externals
May I know how I can solve the problem?
Thank you very much,
Rob
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss