Library & Header file paths on Windows with Boost
Hi, This post is not really 100% boost specific but I am trying to compile using boost libraries and I thought I'd give this newsgroup a shot. I want to know what have others done to avoid the circles I've gone in to get this simple program compiled. I compiled boost to "c:\boost\" and I have my MinGW installed in "c:\devel\MinGW\" however if I attempt to compile using: g++ -v -Ic:\boost\ simplels.cpp -Lc:\boost\lib\ -lboost_filesystem-mgw34-d-1_34_1 It would result in failing to include the header files and I noticed: ignoring nonexistant directory "c:/boost/" Am I going crazy here or does it appear that the compiler cannot access anything beyond its default include paths? So I tested it out... I made a directory in MinGW called "test" and used the following command line: g++ -v -Ic:\devel\MinGW\test\ headertest.cpp And still no header files.. It resulted in: ignoring nonexistant directory "c:/devel/MinGW/test/" I thought i'd add it my windows %path% too but still had exactly the same problem. So I finally resorted to putting the header files in the MinGW/GCC include directory and the library files in the MinGW/GCC library directory.. et voila! it compiled. But this isn't ideal for me, anyone got any tips where I'm going wrong here cause sure it's compiling now but.. I like to keep things relatively tidy on here! Best, Jay
jayc.lawrence@gmail.com wrote:
Hi,
This post is not really 100% boost specific but I am trying to compile using boost libraries and I thought I'd give this newsgroup a shot. I want to know what have others done to avoid the circles I've gone in to get this simple program compiled.
I compiled boost to "c:\boost\" and I have my MinGW installed in "c:\devel\MinGW\" however if I attempt to compile using:
g++ -v -Ic:\boost\ simplels.cpp -Lc:\boost\lib\ -lboost_filesystem-mgw34-d-1_34_1
It would result in failing to include the header files and I noticed:
ignoring nonexistant directory "c:/boost/"
Am I going crazy here or does it appear that the compiler cannot access anything beyond its default include paths?
If I remember correctly Mingw can't cope with path that end in a /, so try: -I c:\boost and hopefully that'll fix things :-) John.
Hi John, Wow.. lol you dont know how much time I spent trying to get this working all over something so simple! Lets hope this post serves useful for others getting this! So any others reading this.. drop that slash! g++ -s -Ic:\boost simplels.cpp -o test.exe -Lc:\boost\lib -lboost_filesystem-mgw34-d-1_34_1 Now works perfectly ! :) Thank you John for your help. Jay John Maddock wrote:
jayc.lawrence@gmail.com wrote:
Hi,
This post is not really 100% boost specific but I am trying to compile using boost libraries and I thought I'd give this newsgroup a shot. I want to know what have others done to avoid the circles I've gone in to get this simple program compiled.
I compiled boost to "c:\boost\" and I have my MinGW installed in "c:\devel\MinGW\" however if I attempt to compile using:
g++ -v -Ic:\boost\ simplels.cpp -Lc:\boost\lib\ -lboost_filesystem-mgw34-d-1_34_1
It would result in failing to include the header files and I noticed:
ignoring nonexistant directory "c:/boost/"
Am I going crazy here or does it appear that the compiler cannot access anything beyond its default include paths?
If I remember correctly Mingw can't cope with path that end in a /, so try: -I c:\boost and hopefully that'll fix things :-)
John.
participants (2)
-
jayc.lawrence@gmail.com
-
John Maddock