I am looking for help urgently..I downloaded boost 1_40_0(I need old version) and install it in Cygwin directory. The Directory is c:/Cygwin/usr/local/include/boost and c:\Cygwin\usr\local\lib.Then I link the boost library to Netbeans:
(1) I add "c:\Cygwin\usr\local\include\boost" in the C++ Compiler in the Code Assistance;
(2) I created a project and enter into the "properties", and then in C++ Complier I included Directories "c:\Cygwin\usr\local\include\boost", and then went to Linker, add "c:\Cygwin\usr\local\lib" to Additional Library Directories, and add all the libraries(.a file) in c:\Cygwin\usr\local\lib to Libraries.
After that, the code I wrote can be built successfully. But when I run this code, there are some errors:
**D:/NetBeansProject/test_boost_filesystem/dist/Debug/Cygwin-Windows/test_boost_filesystem.exe: error while loading shared libraries: ?: cannot open shared object file: No such file or directory
RUN FAILED (exit value 127, total time: 125ms)**
the code is as follows:
#include <iostream>
#include <boost/filesystem.hpp>
using namespace boost::filesystem;
I am a beginner in C++. and I checked so many websites but still cannot get the solution. And I even am not sure if I linked the boost library with Netbeans correctly..PLEASE give me some suggestions!! Thanks soooooo much!!!!
the thing is use have to the corect .so of boost library .For example when you are using <boos/random.hpp>
you have to link it on makefile as '-lboost_random' .You have to link it like this on the makefile.