Compilation SRILM / Visual Studio 2005
Paris Diderot
-
farah -
farah -
Bonjour,
En compilant SRILM sous Visual Studio 2005 (SRILM - The SRI Language Modeling Toolkit), j'ai suivi les instructions indiquées dans le site suivant: https://www.keithv.com/software/srilm/
Tout semble fonctionne comme il faut sauf un seul truc, le voilà:
Linking...
sri_oolm.lib(NBest.obj) : error LNK2001: unresolved external symbol "double __cdecl computeBleu(unsigned int,unsigned int * const,unsigned int * const,unsigned int,unsigned int)" (?computeBleu@@YANIQAI0II@Z)
C:\cygwin\srilm\/bin/Release\ngram-count.exe : fatal error LNK1120: 1 unresolved externals
J'ai fouillé dans la bibliothèque sri_oolm.lib, j'ai trouvé que la fonction computeBleu est externe. Je ne vois pas pourquoi il n'arrive pas la trouver lors du "linking"
Merci pour l'explication !!!
En compilant SRILM sous Visual Studio 2005 (SRILM - The SRI Language Modeling Toolkit), j'ai suivi les instructions indiquées dans le site suivant: https://www.keithv.com/software/srilm/
Tout semble fonctionne comme il faut sauf un seul truc, le voilà:
Linking...
sri_oolm.lib(NBest.obj) : error LNK2001: unresolved external symbol "double __cdecl computeBleu(unsigned int,unsigned int * const,unsigned int * const,unsigned int,unsigned int)" (?computeBleu@@YANIQAI0II@Z)
C:\cygwin\srilm\/bin/Release\ngram-count.exe : fatal error LNK1120: 1 unresolved externals
J'ai fouillé dans la bibliothèque sri_oolm.lib, j'ai trouvé que la fonction computeBleu est externe. Je ne vois pas pourquoi il n'arrive pas la trouver lors du "linking"
Merci pour l'explication !!!
A voir également:
- Compilation SRILM / Visual Studio 2005
- Money 2005 - Télécharger - Comptabilité & Facturation
- Telecharger fl studio 20 pour pc gratuit complet - Télécharger - Édition & Montage
- Visual petanque - Télécharger - Sport
- Visual c++ 2019 - Guide
- Darkwave studio - Télécharger - Édition & Montage
5 réponses
Hi, I met the same problem. The error says that 'computeBleu' doesn't exist in sri_oolm.lib. Actually it's declared in lm/src/Bleu.cc . Add these files to sri_oolm to solve the problem:
lm/src/Bleu.*
lm/src/LMClient.*
Don't forget to rebuild the sri_oolm. Good luck!
lm/src/Bleu.*
lm/src/LMClient.*
Don't forget to rebuild the sri_oolm. Good luck!
Thnak you For your answer.
I thought no body would answer me :)
I added the .h and .cc files to the sri_oolm.lib
lm/src/Bleu.*
lm/src/LMClient.*
and compiled it. I obtained this compilation error:
matherr.c
Compiling resources...
Creating library...
LMClient.obj : fatal error LNK1179: invalid or corrupt file: duplicate COMDAT '??0<unnamed-tag>@LMClient@@QAE@XZ'
Build log was saved at "file://C:\cygwin\srilm\lib\Debug\intermediate\BuildLog.htm"
sri_oolm - 1 error(s), 882 warning(s)
???? i'im deseperate with all these compilation problems!
I thought no body would answer me :)
I added the .h and .cc files to the sri_oolm.lib
lm/src/Bleu.*
lm/src/LMClient.*
and compiled it. I obtained this compilation error:
matherr.c
Compiling resources...
Creating library...
LMClient.obj : fatal error LNK1179: invalid or corrupt file: duplicate COMDAT '??0<unnamed-tag>@LMClient@@QAE@XZ'
Build log was saved at "file://C:\cygwin\srilm\lib\Debug\intermediate\BuildLog.htm"
sri_oolm - 1 error(s), 882 warning(s)
???? i'im deseperate with all these compilation problems!
this is a bug from Microsoft Visual Studio related to struct defination. The link will help you to find the resolution.
http://203.208.35.101/search?q=cache:O_eFppqJdogJ:connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx%3FFeedbackID%3D99795+Error+10+fatal+error+LNK1179:+invalid+or+corrupt+file:+duplicate+COMDAT&hl=zh-CN&ct=clnk&cd=14&gl=cn&st_usg=ALhdy2-_07rk0fHZVC7Ed6R3hKBM4chomg
The following code was written by me and compiled with no error, just remember give the struct a name while using anonymmous struct.
struct temp1{
VocabIndex word;
Array<VocabIndex> context;
void *id;
unsigned length;
} contextIDCache; /* single-result cache for contextID() */
struct temp2{
Array<VocabIndex> context;
unsigned length;
LogP bow;
} contextBOWCache; /* single-result cache for contextBOW() */
http://203.208.35.101/search?q=cache:O_eFppqJdogJ:connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx%3FFeedbackID%3D99795+Error+10+fatal+error+LNK1179:+invalid+or+corrupt+file:+duplicate+COMDAT&hl=zh-CN&ct=clnk&cd=14&gl=cn&st_usg=ALhdy2-_07rk0fHZVC7Ed6R3hKBM4chomg
The following code was written by me and compiled with no error, just remember give the struct a name while using anonymmous struct.
struct temp1{
VocabIndex word;
Array<VocabIndex> context;
void *id;
unsigned length;
} contextIDCache; /* single-result cache for contextID() */
struct temp2{
Array<VocabIndex> context;
unsigned length;
LogP bow;
} contextBOWCache; /* single-result cache for contextBOW() */
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre question