开发者

boost library can not be found

I have compiled boost version 1.47 using MinGW on winXP SP3. I included the path to the libraries (C:\boost\boost_1_47_0) in a linker variable in my make file. When run "make" in the command prompt window i get the following error message:

"c:/mingw/bin/../lib/gcc/mingw32/4.5.2/../../../../mingw32/bin/ld.exe: cannot find C:\开发者_如何转开发boost\boost_1_47_0\stage\lib: Permission denied collect2: ld returned 1 exit status make: * [main] Error 1"

What could be the possible problem and how do i solve it? Thanks in advance.


I have worked out solution. Probably the problem was mine and note "make". Below is the make file that is now working.

# global variables
CC = g++
SRC = main.cpp
BOOST = C:\boost\boost_1_47_0
BOOSTLIB = C:\boost\boost_1_47_0\stage\lib\libboost_regex-mgw45-1_47.a

# linking
main : main.o
    $(CC) main.o $(BOOSTLIB) -o main 

# compile
main.o : main.cpp
    $(CC) -c -I$(BOOST) $(SRC) -o main.o

# clean
clean :
    rm main.o main

Now it works. I'm not really sure, but probably the order of rules was not correct. Thanks for all the help.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜