[SRILM User List] G++ error when compiling

Andreas Stolcke stolcke at icsi.berkeley.edu
Sun Jun 3 19:23:58 PDT 2012


On 6/3/2012 3:21 AM, Tommy Gorman wrote:
> Hi there,
>
> Im trying to install SRILM on windows using CYGWIN and I keep getting 
> the following error "g++: cannot specify -o with -c, -S or -E with 
> multiple files".
> I have looked all over the internet and cannot find an answer as to 
> why this is happening. I would greatly appreciate any help you can 
> give me to figure out the solution.
> I should add that I am fairly new to using CYGWIN etc. so it could be 
> a simple mistake.
The error message comes from the fact that 
/cygdrive/c/users/spiketg/downloads/msys_mingw8/msys/opt/tcl/include/tcl.h 
is passed to the compiler, instead of the -I option that allows the 
compiler to find the tcl.h file.

Change TCL_INCLUDE to 
-I/cygdrive/c/users/spiketg/downloads/msys_mingw8/msys/opt/tcl/include .

Andreas

>
> Thanks,
> Tommy Gorman
>
> Here is the error in context.
>
> make release-programs
> make[1]: Entering directory `/cygdrive/c/users/spiketg/downloads/srilm'
> for subdir in misc  dstruct  lm  flm  lattice  utils; do \
>         (cd $subdir/src; make 
> SRILM=/cygdrive/c/users/spiketg/downloads/srilm  MACHINE_TYPE=cygwin 
>  OPTION=  MAKE_PIC=yes release-programs) || exit 1; \
> done
> make[2]: Entering directory 
> `/cygdrive/c/users/spiketg/downloads/srilm/misc/src'
> make[2]: Nothing to be done for `release-programs'.
> make[2]: Leaving directory 
> `/cygdrive/c/users/spiketg/downloads/srilm/misc/src'
> make[2]: Entering directory 
> `/cygdrive/c/users/spiketg/downloads/srilm/dstruct/src'
> make[2]: Nothing to be done for `release-programs'.
> make[2]: Leaving directory 
> `/cygdrive/c/users/spiketg/downloads/srilm/dstruct/src'
> make[2]: Entering directory 
> `/cygdrive/c/users/spiketg/downloads/srilm/lm/src'
> g++ -Wall -Wno-unused-variable -Wno-uninitialized -fpic 
> -DINSTANTIATE_TEMPLATES   
>  /cygdrive/c/users/spiketg/downloads/msys_mingw8/msys/opt/tcl/include/tcl.h 
> -I. -I../../include    -c -g -O2 -o ../obj/cygwin/ngram-count.o 
> ngram-count.cc
> g++: cannot specify -o with -c, -S or -E with multiple files
> /cygdrive/c/users/spiketg/downloads/srilm/common/Makefile.common.targets:93: 
> recipe for target `../obj/cygwin/ngram-count.o' failed
> make[2]: *** [../obj/cygwin/ngram-count.o] Error 1
> make[2]: Leaving directory 
> `/cygdrive/c/users/spiketg/downloads/srilm/lm/src'
> Makefile:105: recipe for target `release-programs' failed
> make[1]: *** [release-programs] Error 1
> make[1]: Leaving directory `/cygdrive/c/users/spiketg/downloads/srilm'
> Makefile:54: recipe for target `World' failed
> make: *** [World] Error 2
>
>
>
> _______________________________________________
> SRILM-User site list
> SRILM-User at speech.sri.com
> http://www.speech.sri.com/mailman/listinfo/srilm-user

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.speech.sri.com/pipermail/srilm-user/attachments/20120603/95a601e6/attachment.html>


More information about the SRILM-User mailing list