Web lists-archives.com

Re: [Mingw-users] MSYS on Windows - Setting Directories?

You are right about zlib.. I never doubted you.  Zlib-1.2.8 requires me to set these libraries myself so I won't use that as an example.
Instead I'll use libjpeg as and example.  

I think my understanding of this process could be flawed as I think you have mentioned.  Before today I knew very little. 

I thought that if I do the following in the following order, my headers and lib files will be automatically placed in directories MSYS can find when I am using 
these libraries as dependencies.   But from the below it seems to me, because I'm on Windows, that I always have to spacify where to put these files with --prefix
even though there are other ways of doing this with  INCLUDE_PATH and LIBRARY_PATH using the export command.  I'm not sure what the difference is.

When I do specify a directory using --prefix, and then 'make install' MSYS puts all the binaries in that directory (c:/test/bin) and leaves c:/test/include and c:/test/lib empty.

Some relevant directories. 

c:/mingw       //my compiler is in here.
c:/msys         // msys istalled here.
c:/libjpeg-6b   // lipjpeg.

see my commands below.

user@USER-PC /c/jpeg-6b
$ ./configure                                   ------------------------------------------------------------------------------./configure here.
checking for gcc... gcc
checking whether the C compiler (gcc  ) works... yes
checking whether the C compiler (gcc  ) is a cross-compiler... no
checking whether we are using GNU C... yes
checking how to run the C preprocessor... gcc -E
checking for function prototypes... yes
checking for stddef.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for size_t... yes
checking for type unsigned char... yes
checking for type unsigned short... yes
checking for type void... yes
checking for working const... yes
checking for inline... __inline__
checking for broken incomplete types... ok
checking for short external names... ok
checking to see if char is signed... yes
checking to see if right shift is signed... yes
checking to see if fopen accepts b spec... yes
checking for a BSD compatible install... /bin/install -c
checking for ranlib... ranlib
checking libjpeg version number... 62
creating ./config.status
creating Makefile
creating jconfig.h
jconfig.h is unchanged

user@USER-PC /c/jpeg-6b
$ make                                                                --------------------------------------------------built here
gcc -O2  -I.   -c -o jcapimin.o jcapimin.c
gcc -O2  -I.   -c -o jcapistd.o jcapistd.c
gcc -O2  -I.   -c -o jctrans.o jctrans.c
gcc -O2  -I.   -c -o jcparam.o jcparam.c
gcc -O2  -I.   -c -o jdatadst.o jdatadst.c
gcc -O2  -I.   -c -o jcinit.o jcinit.c
gcc -O2  -I.   -c -o jcmaster.o jcmaster.c
gcc -O2  -I.   -c -o jcmarker.o jcmarker.c
gcc -O2  -I.   -c -o jcmainct.o jcmainct.c
gcc -O2  -I.   -c -o jcprepct.o jcprepct.c
gcc -O2  -I.   -c -o jccoefct.o jccoefct.c
gcc -O2  -I.   -c -o jccolor.o jccolor.c
gcc -O2  -I.   -c -o jcsample.o jcsample.c
gcc -O2  -I.   -c -o jchuff.o jchuff.c
gcc -O2  -I.   -c -o jcphuff.o jcphuff.c
gcc -O2  -I.   -c -o jcdctmgr.o jcdctmgr.c
gcc -O2  -I.   -c -o jfdctfst.o jfdctfst.c
gcc -O2  -I.   -c -o jfdctflt.o jfdctflt.c
gcc -O2  -I.   -c -o jfdctint.o jfdctint.c
gcc -O2  -I.   -c -o jdapimin.o jdapimin.c
gcc -O2  -I.   -c -o jdapistd.o jdapistd.c
gcc -O2  -I.   -c -o jdtrans.o jdtrans.c
gcc -O2  -I.   -c -o jdatasrc.o jdatasrc.c
gcc -O2  -I.   -c -o jdmaster.o jdmaster.c
gcc -O2  -I.   -c -o jdinput.o jdinput.c
gcc -O2  -I.   -c -o jdmarker.o jdmarker.c
gcc -O2  -I.   -c -o jdhuff.o jdhuff.c
gcc -O2  -I.   -c -o jdphuff.o jdphuff.c
gcc -O2  -I.   -c -o jdmainct.o jdmainct.c
gcc -O2  -I.   -c -o jdcoefct.o jdcoefct.c
gcc -O2  -I.   -c -o jdpostct.o jdpostct.c
gcc -O2  -I.   -c -o jddctmgr.o jddctmgr.c
gcc -O2  -I.   -c -o jidctfst.o jidctfst.c
gcc -O2  -I.   -c -o jidctflt.o jidctflt.c
gcc -O2  -I.   -c -o jidctint.o jidctint.c
gcc -O2  -I.   -c -o jidctred.o jidctred.c
gcc -O2  -I.   -c -o jdsample.o jdsample.c
gcc -O2  -I.   -c -o jdcolor.o jdcolor.c
gcc -O2  -I.   -c -o jquant1.o jquant1.c
gcc -O2  -I.   -c -o jquant2.o jquant2.c
gcc -O2  -I.   -c -o jdmerge.o jdmerge.c
gcc -O2  -I.   -c -o jcomapi.o jcomapi.c
gcc -O2  -I.   -c -o jutils.o jutils.c
gcc -O2  -I.   -c -o jerror.o jerror.c
gcc -O2  -I.   -c -o jmemmgr.o jmemmgr.c
gcc -O2  -I.   -c -o jmemnobs.o jmemnobs.c
rm -f libjpeg.a
ar rc libjpeg.a  jcapimin.o jcapistd.o jctrans.o jcparam.o jdatadst.o jcinit.o jcmaster.o jcmarker.o jcmainct.o jcprepct.o jccoefct.o jccolor
.o jcsample.o jchuff.o jcphuff.o jcdctmgr.o jfdctfst.o jfdctflt.o jfdctint.o jdapimin.o jdapistd.o jdtrans.o jdatasrc.o jdmaster.o jdinput.o
jdmarker.o jdhuff.o jdphuff.o jdmainct.o jdcoefct.o jdpostct.o jddctmgr.o jidctfst.o jidctflt.o jidctint.o jidctred.o jdsample.o jdcolor.o jq
uant1.o jquant2.o jdmerge.o jcomapi.o jutils.o jerror.o jmemmgr.o jmemnobs.o
ranlib libjpeg.a
gcc -O2  -I.   -c -o cjpeg.o cjpeg.c
gcc -O2  -I.   -c -o rdppm.o rdppm.c
gcc -O2  -I.   -c -o rdgif.o rdgif.c
gcc -O2  -I.   -c -o rdtarga.o rdtarga.c
gcc -O2  -I.   -c -o rdrle.o rdrle.c
gcc -O2  -I.   -c -o rdbmp.o rdbmp.c
gcc -O2  -I.   -c -o rdswitch.o rdswitch.c
gcc -O2  -I.   -c -o cdjpeg.o cdjpeg.c
gcc  -o cjpeg cjpeg.o rdppm.o rdgif.o rdtarga.o rdrle.o rdbmp.o rdswitch.o cdjpeg.o libjpeg.a
gcc -O2  -I.   -c -o djpeg.o djpeg.c
gcc -O2  -I.   -c -o wrppm.o wrppm.c
gcc -O2  -I.   -c -o wrgif.o wrgif.c
gcc -O2  -I.   -c -o wrtarga.o wrtarga.c
gcc -O2  -I.   -c -o wrrle.o wrrle.c
gcc -O2  -I.   -c -o wrbmp.o wrbmp.c
gcc -O2  -I.   -c -o rdcolmap.o rdcolmap.c
gcc  -o djpeg djpeg.o wrppm.o wrgif.o wrtarga.o wrrle.o wrbmp.o rdcolmap.o cdjpeg.o libjpeg.a
gcc -O2  -I.   -c -o jpegtran.o jpegtran.c
gcc -O2  -I.   -c -o transupp.o transupp.c
gcc  -o jpegtran jpegtran.o rdswitch.o cdjpeg.o transupp.o libjpeg.a
gcc -O2  -I.   -c -o rdjpgcom.o rdjpgcom.c
gcc  -o rdjpgcom rdjpgcom.o
gcc -O2  -I.   -c -o wrjpgcom.o wrjpgcom.c
gcc  -o wrjpgcom wrjpgcom.o

user@USER-PC /c/jpeg-6b
$ make install                                                   ----------------------------------------------------------------------------------------make install here.... SEE ERROR
/bin/install -c cjpeg /usr/local/bin/cjpeg
/bin/install: cannot create regular file `/usr/local/bin/cjpeg.exe': No such file or directory
make: *** [install] Error 1

From: Keith Marshall <keithmarshall@xxxxxxxxxxxxxxxxxxxxx>
Sent: Friday, 4 March 2016 4:54 PM
To: mingw-users@xxxxxxxxxxxxxxxxxxxxx
Subject: Re: [Mingw-users] MSYS on Windows - Setting Directories?

On 04/03/16 06:25, Domonic Tom wrote:
> why can't for example, my libpng not find my zlib installation?

Your understanding is still lacking: libpng *doesn't* "find" your zlib
installation; neither does it need to.  It is whichever one, or more, of
GCC's compilers is/are used to build libpng that needs to find zlib, at
build time, and that means that you either need to have installed zlib
into a $prefix which is known to GCC by default, or you need to tell it
specifically, through -I and/or -L options.

> If these headers and lib files are placed in the default searchable
> location ... why am I having so much trouble getting my libraries
> from seeing each other.

They don't need to "see" each other; see above.  It is GCC which needs
to see them all, either because you have installed them into a path
which GCC already knows about, by default, or because you've told it
where to look.

Where did you install your zlib?  If that was in /usr/local, (as you've
alluded to earlier, then that isn't a known default path for MinGW's GCC.

> That is... despite teh fact that I have used the 'make install'
> command.

Which you've already suggested may have failed; if so, or if you didn't
override the package default with something MinGW's GCC knows is a
default, then even though you have used 'make install', the files will
not be anywhere GCC knows to look for them.


Public key available from keys.gnupg.net
Key fingerprint: C19E C018 1547 DE50 E1D4 8F53 C0AD 36C6 347E 5A3F

Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
MinGW-users mailing list

This list observes the Etiquette found at 
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

You may change your MinGW Account Options or unsubscribe at:
Also: mailto:mingw-users-request@xxxxxxxxxxxxxxxxxxxxx?subject=unsubscribe