[Proj] Building for and calling from g95-MinGW

Norman Vine nhv at cape.com
Wed Feb 18 03:39:55 PST 2009


Arjan van Dijk writes:
>
> How do I generate/download an archive file (e.g. libproj.a) 
> that can be used from g95 under MinGW by just adding -lproj to the 
> compile command of my program?
> The Windows binaries contain an executable and a dll, not a .a-file.
> Can I just use the linux .a-file under MinGW? I guess not.
> I downloaded the sources and called "./configure".
> This went okay. Then I tried "make", but the whole thing
> crashed... (see below this message for the rude curses it uttered)!
> 
> 
> 
> $ make
> Making all in src
> c:\mingw\bin\make.exe[1]: Entering directory `e:/Proj/proj-4.6.1/src'
> c:/mingw/bin/make.exe  all-am
> make.exe[2]: Entering directory `e:/Proj/proj-4.6.1/src'
> C:/msys/1.0/bin/sh.exe ../libtool --tag=CC   --mode=compile 
> gcc -DHAVE_CONFIG_H -I. -DPROJ_LIB=\"/usr/local/share/proj\"  
>    -g -O2 -MT PJ_aeqd.lo -MD -MP -MF .deps/PJ_aeqd.Tpo -c -o 
> PJ_aeqd.lo PJ_aeqd.c
> XPJ_aeqd.Tpo -c -o PJ_aeqd.lo PJ_aeqd.lo
> libtool: compile: libobj name `PJ_aeqd.Tpo -c -o PJ_aeqd.lo 
> PJ_aeqd.lo' may not contain shell special characters.
> rm: invalid option -- c
> Try `rm --help' for more information.
> mkdir .libs
>  gcc -DHAVE_CONFIG_H -I. 
> "-DPROJ_LIB=\\/usr/local/share/proj\" -g -O2 -MT PJ_aeqd.lo 
> -MD -MP -MF .deps/PJ_aeqd.Tpo -c -o PJ_aeqd.lo PJ_aeqd.c"  
> -DDLL_EXPORT -DPIC -o .libs/PJ_aeqd.Tpo -c -o PJ_aeqd.lo PJ_aeqd.o
> gcc.exe: PJ_aeqd.o: No such file or directory
> gcc.exe: no input files
> make.exe[2]: *** [PJ_aeqd.lo] Error 1
> make.exe[2]: Leaving directory `e:/Proj/proj-4.6.1/src'
> c:\mingw\bin\make.exe[1]: *** [all] Error 2
> c:\mingw\bin\make.exe[1]: Leaving directory `e:/Proj/proj-4.6.1/src'
> c:\mingw\bin\make.exe: *** [all-recursive] Error 1

Builds fine for me


>From a MSYS shell <not a Windows Console>

Norman at LOKI /c/tmp/proj-4.6.1
$ ./configure

config.status: executing depfiles commands

Norman at LOKI /c/tmp/proj-4.6.1
$ make
Making all in src
make[1]: Entering directory `/c/tmp/proj-4.6.1/src'
make  all-am
make[2]: Entering directory `/c/tmp/proj-4.6.1/src'

.........................

/bin/sh ../libtool --tag=CC   --mode=link gcc  -g -O2   -o cs2cs.exe cs2cs.o
gen_cheb.o p_series.o libproj.la -lm 
gcc -g -O2 -o cs2cs.exe cs2cs.o gen_cheb.o p_series.o  ./.libs/libproj.a  

Norman at LOKI /c/tmp/proj-4.6.1
$ src/proj
Rel. 4.6.1, 21 August 2008
usage: proj.exe [ -beEfiIlormsStTvVwW [args] ] [ +opts[=arg] ] [ files ]


Here are the tools I used

Norman at LOKI /c/tmp/proj-4.6.1
$ gcc --version
gcc.exe (GCC) 3.4.2 (mingw-special)

Norman at LOKI /c/tmp/proj-4.6.1
$ libtool --version
ltmain.sh (GNU libtool) 1.5.24 Debian 1.5.24-1ubuntu1 (1.1220.2.456
2007/06/24 02:25:32)

Norman at LOKI /c/tmp/proj-4.6.1
$ make --version
GNU Make version 3.79.1, by Richard Stallman and Roland McGrath.
Built for i686-pc-msys




More information about the Proj mailing list