Compilation SRILM / Visual Studio 2005

Fermé
Paris Diderot - 15 mars 2008 à 20:24
 farah - 17 juil. 2014 à 18:16
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 !!!
A voir également:

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!
0
Paris diderot
17 mars 2008 à 19:23
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!
0
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() */
0
Bonjour,
ya t il quelqun qui a essayé ce logiciel SRILM?
merci
0

Vous n’avez pas trouvé la réponse que vous recherchez ?

Posez votre question
Oui j'ai essayer de compiler SRILM sur l'Ubuntu, mais un message s'affiche:

sys/cdefs.h non trouvé;

Comment faire SVP ?
0