NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

error while loading shared libraries: ?: cannot open shared object file: No such file or directory [Netbeans 8.1]

 
Post new topic   Reply to topic    NetBeans Forums -> C/C++ Users
View previous topic :: View next topic  
Author Message
paofanlv



Joined: 01 Dec 2016
Posts: 2

PostPosted: Fri Dec 02, 2016 9:33 am    Post subject: error while loading shared libraries: ?: cannot open shared object file: No such file or directory [Netbeans 8.1] Reply with quote

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:

cd 'D:\NetBeansProject\test_boost_filesystem'
C:\cygwin\bin\make.exe -f Makefile CONF=Debug clean
"/usr/bin/make" -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS= .clean-conf
make[1]: Entering directory '/cygdrive/d/NetBeansProject/test_boost_filesystem'
rm -f -r build/Debug
rm -f dist/Debug/Cygwin-Windows/test_boost_filesystem.exe
make[1]: Leaving directory '/cygdrive/d/NetBeansProject/test_boost_filesystem'

CLEAN SUCCESSFUL (total time: 1s)
cd 'D:\NetBeansProject\test_boost_filesystem'
C:\cygwin\bin\make.exe -f Makefile CONF=Debug
"/usr/bin/make" -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS= .build-conf
make[1]: Entering directory '/cygdrive/d/NetBeansProject/test_boost_filesystem'
"/usr/bin/make" -f nbproject/Makefile-Debug.mk dist/Debug/Cygwin-Windows/test_boost_filesystem.exe
make[2]: Entering directory '/cygdrive/d/NetBeansProject/test_boost_filesystem'
mkdir -p build/Debug/Cygwin-Windows
rm -f "build/Debug/Cygwin-Windows/main.o.d"
g++ -c -g -I/cygdrive/C/cygwin/usr/local/include/boost -MMD -MP -MF "build/Debug/Cygwin-Windows/main.o.d" -o build/Debug/Cygwin-Windows/main.o main.cpp
mkdir -p dist/Debug/Cygwin-Windows
g++ -o dist/Debug/Cygwin-Windows/test_boost_filesystem build/Debug/Cygwin-Windows/main.o -L/cygdrive/C/cygwin/usr/local/lib -lboost_date_time -lboost_date_time.dll -lboost_filesystem -lboost_filesystem.dll -lboost_graph -lboost_graph.dll -lboost_math_c99 -lboost_math_c99.dll -lboost_math_c99f -lboost_math_c99f.dll -lboost_math_tr1 -lboost_math_tr1.dll -lboost_math_tr1f -lboost_math_tr1f.dll -lboost_prg_exec_monitor -lboost_prg_exec_monitor.dll -lboost_program_options -lboost_program_options.dll -lboost_python -lboost_python.dll -lboost_regex -lboost_regex.dll -lboost_serialization -lboost_serialization.dll -lboost_signals -lboost_signals.dll -lboost_system -lboost_system.dll -lboost_test_exec_monitor -lboost_unit_test_framework -lboost_unit_test_framework.dll -lboost_wave
make[2]: Leaving directory '/cygdrive/d/NetBeansProject/test_boost_filesystem'
make[1]: Leaving directory '/cygdrive/d/NetBeansProject/test_boost_filesystem'

BUILD SUCCESSFUL (total time: 7s)


**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;

int main(int argc, char* argv[])
{
if (argc < 2)
{
std::cout << "Usage: tut1 path\n";
return 1;
}
std::cout << argv[1] << " " << file_size(argv[1]) << '\n';
return 0;
}

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!!!!

Regards, lyu
Back to top
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> C/C++ Users All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo