How to configure Boost with Netbeans 6.9 on Ubuntu

I have gcc 4.4.5 and the latest boost library. I want to use boost specifically for my regex library. I tried using the built-in C ++ regular expression functions, but apparently they are not yet fully functional. I followed an online tutorial to set up netbeans.

I added / usr / include / boost to support C ++ code, including directories. Then I added -lboost_regex-mt to assembly> linker> additional parameter areas in the project configuration. but I still get this error:

/usr/bin/ld: cannot find -lboost_regex-mt
collect2: ld returned 1 exit status

This is the command that netbeans creates:

g++ -lboost_regex-mt -o dist/Debug/GNU-Linux-x86/examples01 build/Debug/GNU-Linux-x86/main.o  

I also tried to do this with -lboost-regex and -lboost-regex-st and with the same error, only with mt changed. I also tried to run the file using regex objects through the terminal, but still got the same error. Can anyone help with this problem? Or at least point me in the right direction?

+1
source share
2 answers

You must set up your Additional Library Directories project so that it knows which other directories your libraries should go to link.

Here is a screenshot from the Netbeans website here: http://netbeans.org/community/magazine/html/03/c++/

alt text

edit: , , -L, .

+3

g++, . - boost LD_LIBRARY_PATH. , , ( .hpp include), , , .

0

All Articles