[pcre-dev] More Windows Building Woes

Top Page
Delete this message
Author: Sheri
Date:  
To: pcre-dev
Subject: [pcre-dev] More Windows Building Woes
When configured with Cmake for Static library in Msys, Make fails and
stops at building of pcregrep

make -f CMakeFiles/pcregrep.dir/build.make CMakeFiles/pcregrep.dir/depend
make[2]: Entering directory `/c/pcre-7.5/Msys-7.5-ReleaseStatic'
make[2]: Nothing to be done for `CMakeFiles/pcregrep.dir/depend'.
make[2]: Leaving directory `/c/pcre-7.5/Msys-7.5-ReleaseStatic'
make -f CMakeFiles/pcregrep.dir/build.make CMakeFiles/pcregrep.dir/build
make[2]: Entering directory `/c/pcre-7.5/Msys-7.5-ReleaseStatic'
Linking C executable pcregrep.exe
/C/cmake/bin/cmake.exe -P CMakeFiles/pcregrep.dir/cmake_clean_target.cmake
/C/MinGW/bin/gcc.exe    -O3 -DNDEBUG   
"CMakeFiles/pcregrep.dir/pcregrep.obj"                   -o pcregrep.exe 
-Wl,--major-image-version,0,--minor-image-version,0  
-L/C/pcre-7                .5/Msys-7.5-ReleaseStatic -Wl,-Bstatic 
-lpcreposix -lpcre -Wl,-Bdynamic
c:\MinGW\bin\..\lib\gcc\mingw32\3.4.2\..\..\..\..\mingw32\bin\ld.exe: 
cannot fin                d -lpcreposix
collect2: ld returned 1 exit status
make[2]: *** [pcregrep.exe] Error 1
make[2]: Leaving directory `/c/pcre-7.5/Msys-7.5-ReleaseStatic'
make[1]: *** [CMakeFiles/pcregrep.dir/all] Error 2
make[1]: Leaving directory `/c/pcre-7.5/Msys-7.5-ReleaseStatic'
make: *** [all] Error 2


$ ls
CMakeCache.txt     Makefile             pcre.a              pcrecpparg.h
CMakeFiles         cmake_install.cmake  pcre.h              pcreposix.a
CTestCustom.ctest  config.h             pcre_chartables.c
DartTestfile.txt   dftables.exe         pcre_stringpiece.h



When configured with Configure for Static libraries in Msys, pcregrep is
created ok, but pcredemo is problematic. Pcredemo is not even included
at all in Cmake.

gcc -DHAVE_CONFIG_H -I.     -O3 -s -MT pcregrep.o -MD -MP -MF 
.deps/pcregrep.Tpo -c -o pcregrep.o pcregrep.c
mv -f .deps/pcregrep.Tpo .deps/pcregrep.Po
/bin/sh ./libtool --tag=CC   --mode=link gcc  -O3 -s   -o pcregrep.exe 
pcregrep.o libpcreposix.la
gcc -O3 -s -o pcregrep.exe pcregrep.o  ./.libs/libpcreposix.a 
/c/pcre-7.5/pcre-7.5-configsource/pcre-7.5/.libs/libpcre.a 
gcc -DHAVE_CONFIG_H -I.     -O3 -s -MT pcredemo.o -MD -MP -MF 
.deps/pcredemo.Tpo -c -o pcredemo.o pcredemo.c
mv -f .deps/pcredemo.Tpo .deps/pcredemo.Po
/bin/sh ./libtool --tag=CC   --mode=link gcc  -O3 -s   -o pcredemo.exe 
pcredemo.o libpcre.la
gcc -O3 -s -o pcredemo.exe pcredemo.o  ./.libs/libpcre.a 
pcredemo.o:pcredemo.c:(.text+0xca): undefined reference to 
`_imp__pcre_compile'
pcredemo.o:pcredemo.c:(.text+0x120): undefined reference to 
`_imp__pcre_exec'
pcredemo.o:pcredemo.c:(.text+0x1b9): undefined reference to 
`_imp__pcre_fullinfo'
pcredemo.o:pcredemo.c:(.text+0x208): undefined reference to 
`_imp__pcre_fullinfo'
pcredemo.o:pcredemo.c:(.text+0x225): undefined reference to 
`_imp__pcre_fullinfo'
pcredemo.o:pcredemo.c:(.text+0x311): undefined reference to 
`_imp__pcre_exec'
pcredemo.o:pcredemo.c:(.text+0x44b): undefined reference to 
`_imp__pcre_free'
pcredemo.o:pcredemo.c:(.text+0x4f1): undefined reference to 
`_imp__pcre_free'
collect2: ld returned 1 exit status
make[1]: *** [pcredemo.exe] Error 1
make[1]: Leaving directory `/c/pcre-7.5/pcre-7.5-configsource/pcre-7.5'
make: *** [all] Error 2



Regards,
Sheri