From: Daniel C. B. <db...@to...> - 2007-06-24 15:17:29
|
On 6/24/07, Yi Yi <win...@gm...> wrote: > Hi, everybody . Hi there. > In the other day, I downloaded the source of libiconv-1.11 and tried > compiling it. Well, an error occurred and the compiling was called > off. > > My compiling steps were as follows. > > 1. ./configure --prefix=/mingw --target=mingw --enable-static > --enable-extra-encodings --disable-shared > > 2. After the configure was well completed and the Makefile was > generated, I entered the command "make". > > However, an error occurred when executing the following command. > > ---- gcc -I. -I. -I.. -I./.. -I../include -g -O2 -fvisibility=hidden > "-DLIBDIR=\\/mingw/lib\" -DBUILDING_LIBCHARSET -DBUILDING_DLL > -DENABLE_RELOCATABLE=1 -DIN_LIBRARY -DINSTALLDIR=\"/mingw/lib\" > -DNO_XMALLOC -Dset_relocation_prefix=libcharset_set_relocation_prefix > -Drelocate=libcharset_relocate -DHAVE_CONFIG_H -c ./localcharset.c" -o > localcharset.o > > And the error message is "gcc.exe: no input files". It seems that this command line is not properly constructed; the quotes in the command line might be seen as one long argument, so the -c doesn't get noticed; so gcc does not see any input files. For instance, %cat argv.c int main(int argc, char *argv[]) { printf("argv[1] = %s\n", argv[1]); printf("argv[2] = %s\n", argv[2]); } %./argvc.exe "-1a -2b -3c" -4Im_2_actually argv[1] = -1a -2b -3c argv[2] = -4Im_2_actually As a workaround for now, perhaps can you can try entering in the proper directory (where make was) and run the command above without the outer quotes; if it compiles the file, then you run make again and since the file is already compiled, make will try the next step in the compilation procedure. I do not get why the outer quotes are there. A typo perhaps? > I searched for localcharset.c in the libiconv-1.11 package. It turned > out that the localcharset.c is in the directory > "./libiconv/libcharset/lib". I just can't understand why the gcc could > not find it and what's wrong with my compiling. To do this sort of checking, you must also account for which current directory make was in, since you ran make; notice how make sometimes changes directories and issues messages such as ``entering directory'' and ``leaving directory'' so that also tells where make was when it issued a shell command. |