[Dev-C++] Using Dev-C++ with MSYS - make problems - undefined reference to `WinMain@16' - cannot fi
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Joe F. <fl...@so...> - 2007-05-16 12:25:17
|
Help please. I've installed "Dev-C++ 5.0 beta 9.2 (4.9.9.2) (9.0 MB) with Mingw/GCC 3.4.2" and MSYS-1.0.10.exe and pointed MSYS' mingw directory pointer to c:/Dev-Cpp. Now, I'm trying to build "rxspencer-alpha3.8.g3.tar.gz" from http://arglist.com/regex/rxspencer-alpha3.8.g3.tar.gz, but it fails on "make" with: gcc -Wl,--base-file,.libs/librxspencer-0.dll-base -Wl,-e,_DllMainCRTStartup@12 -o .libs/librxspencer-0.dll regcomp.lo regerror.lo regexec.lo regfree.lo c:\dev-cpp\bin\..\lib\gcc\mingw32\4.1.2\..\..\..\..\mingw32\bin\ld.exe: warning: cannot find entry symbol _DllMainCRTStartup@12; defaulting to 00401000 c:/dev-cpp/bin/../lib/gcc/mingw32/4.1.2/../../../libmingw32.a(main.o):main.c:(.text+0x106): undefined reference to `WinMain@16' collect2: ld returned 1 exit status make[1]: *** [librxspencer.la] Error 1 make[1]: Leaving directory `/home/Joe/rxspencer-alpha3.8.g3' make: *** [all] Error 2 Any ideas how to fix this? Sorry for the noob question. Joe P.S. The entire configure, make MSYS output is below. ----------------------------------------------------------------------------------------------------------------------- Joe@CUSTOM ~/rxspencer-alpha3.8.g3 $ ./configure checking for a BSD-compatible install... /bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets ${MAKE}... yes checking build system type... i686-pc-mingw32 checking host system type... i686-pc-mingw32 checking for style of include used by make... GNU checking for gcc... gcc checking for C compiler default output... a.exe checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... .exe checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking dependency style of gcc... none checking for ld used by GCC... c:/dev-cpp/mingw32/bin/ld.exe checking if the linker (c:/dev-cpp/mingw32/bin/ld.exe) is GNU ld... yes checking for c:/dev-cpp/mingw32/bin/ld.exe option to reload object files... -r checking for BSD-compatible nm... /mingw/bin/nm checking whether ln -s works... yes checking how to recognise dependant libraries... file_magic file format pei*-i386(.*architecture: i386)? checking command to parse /mingw/bin/nm output... ok checking how to run the C preprocessor... gcc -E checking for egrep... grep -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... no checking dlfcn.h presence... no checking for dlfcn.h... no checking for ranlib... ranlib checking for strip... strip checking for objdir... .libs checking for gcc option to produce PIC... -DDLL_EXPORT checking if gcc PIC flag -DDLL_EXPORT works... yes checking if gcc static flag -static works... yes checking if gcc supports -c -o file.o... yes checking if gcc supports -c -o file.lo... yes checking if gcc supports -fno-rtti -fno-exceptions... yes checking whether the linker (c:/dev-cpp/mingw32/bin/ld.exe) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... Win32 ld.exe checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... yes creating libtool configure: creating ./config.status config.status: creating Makefile config.status: executing depfiles commands Joe@CUSTOM ~/rxspencer-alpha3.8.g3 $ make make all-am make[1]: Entering directory `/home/Joe/rxspencer-alpha3.8.g3' /bin/sh ./libtool --mode=link gcc -g -O2 -o librxspencer.la -rpath /usr/local/lib -version-info 0:2:0 -no-undefined -module regcomp.lo regerror.lo regexec.lo regfree.lo rm -fr .libs/librxspencer.la .libs/librxspencer.* .libs/librxspencer.* generating symbol list for `librxspencer.la' dlltool --export-all --exclude-symbols DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12 --output-def .libs/librxspencer-0.dll-def regcomp.lo regerror.lo regexec.lo regfree.lo sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//" < .libs/librxspencer-0.dll-def > .libs/librxspencer.exp if test "x`head -1 .libs/librxspencer.exp`" = xEXPORTS; then cp .libs/librxspencer.exp .libs/librxspencer-0.dll-def; else echo EXPORTS > .libs/librxspencer-0.dll-def; _lt_hint=1; cat .libs/librxspencer.exp | while read symbol; do set dummy $symbol; case $# in 2) echo " $2 @ $_lt_hint ; " >> .libs/librxspencer-0.dll-def;; *) echo " $2 @ $_lt_hint $3 ; " >> .libs/librxspencer-0.dll-def;; esac; _lt_hint=`expr 1 + $_lt_hint`; done; fi gcc -Wl,--base-file,.libs/librxspencer-0.dll-base -Wl,-e,_DllMainCRTStartup@12 -o .libs/librxspencer-0.dll regcomp.lo regerror.lo regexec.lo regfree.lo c:\dev-cpp\bin\..\lib\gcc\mingw32\4.1.2\..\..\..\..\mingw32\bin\ld.exe: warning: cannot find entry symbol _DllMainCRTStartup@12; defaulting to 00401000 c:/dev-cpp/bin/../lib/gcc/mingw32/4.1.2/../../../libmingw32.a(main.o):main.c:(.text+0x106): undefined reference to `WinMain@16' collect2: ld returned 1 exit status make[1]: *** [librxspencer.la] Error 1 make[1]: Leaving directory `/home/Joe/rxspencer-alpha3.8.g3' make: *** [all] Error 2 Joe@CUSTOM ~/rxspencer-alpha3.8.g3 $ ----------------------------------------------------------------------------------------------------------------------- |