[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mingw-users
Subject:    Re: [Mingw-users] Trouble locating gc.h with gcc/MinGW
From:       Earnie Boyd <earnie () users ! sourceforge ! net>
Date:       2012-09-13 11:25:06
Message-ID: CA+sc5mn2kONTbSWy5S-VcvpL7Ps+ESvg3Rb2W7zxg_i1S7Vomg () mail ! gmail ! com
[Download RAW message or body]

On Wed, Sep 12, 2012 at 9:26 PM, Andrew Pennebaker wrote:
> I have download, configured, compiled, and installed BoehmGC in MinGW, but
> when I try to compile a test program that uses BoehmGC, gcc fails to find
> the library.
> 
> $ make
> gcc -o boehmtest boehmtest.c -lgc
> boehmtest.c:3:16: fatal error: gc.h: No such file or directory
> 
> I found gc.h in MinGW's /usr/local/include/gc directory, but adding
> -I/usr/local/include/gc and -L/usr/local/include/gc don't help.
> 

I've read the other responses you should be able to use the following
command but I have no way to test it.  Also I assume you are within
the MSYS shell and that the file libgc.a or libgc.dll.a exists in
/usr/local/lib.

$ gcc -I/usr/local/include -L/usr/local/lib -o boehmtest boehmtest.c -lgc

To avoid needing to specify -I and -L you should use --prefix=/mingw
when building and installing the library.  The MinGW GCC while it
looks in /usr/local/[lib|include] by default doesn't find it because
the path doesn't exist at the root of the current working drive.

-- 
Earnie
-- https://sites.google.com/site/earnieboyd

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
MinGW-users mailing list
MinGW-users@lists.sourceforge.net

This list observes the Etiquette found at 
http://www.mingw.org/Mailing_Lists.
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:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Also: mailto:mingw-users-request@lists.sourceforge.net?subject=unsubscribe


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic