Boost C++ Libraries: Ticket #7887: Boost & Eclipse https://svn.boost.org/trac10/ticket/7887 <p> Hello everyone, I need your help with a problem in relation with Boost 1-52-0 and Eclipse for C++ developpers. First, i use Cygwin 1.7.17-1 as compiler and my boost library is well compiled (boostrap.sh and b2 executed). My OS is Windows 8 Pro 64bits. </p> <p> Here is the simple program I try to execute : </p> <pre class="wiki">#include &lt;iostream&gt; #include &lt;boost/thread/thread.hpp&gt; using namespace std; int main() { cout &lt;&lt; "hello"; return 0; } </pre><p> This code is compiling without any problem but, when i want to execute it, nothing appears. I noticed that if I set "#include &lt;boost/thread/thread.hpp&gt;" as comment, the word "hello" appears, then I concluded that boost library was the problem, but I absolutly don't know why.. </p> <p> Here are my project linkers : </p> <blockquote> <p> Includes (Cygwin C++ Compiler) : <strong>C:/boost</strong> </p> </blockquote> <p> </p> <blockquote> <p> Libraries : <strong>boost_thread</strong> </p> <blockquote> <p> <strong>boost_system</strong> </p> </blockquote> </blockquote> <blockquote> <p> Librairies search path : <strong>C:/boost/stage/lib</strong> </p> </blockquote> <p> I as well want to precise that I defined the system variable "<strong>CYGWIN</strong>" with "<strong>nodosfilewarning</strong>" value because I had an error like that when compiling : "<strong>cygwin warning: MS-DOS style path detected: c:/ Preferred POSIX equivalent is: /cygdrive/c CYGWIN environment variable option "nodosfilewarning" turns off this warning. Consult the user's guide for more details about POSIX paths: cygwin.com/cygwin-ug-net/usin...sing-pathnames</strong>" </p> <p> Hope you'll help me, thanks ! </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/7887 Trac 1.4.3 viboes Sat, 12 Jan 2013 00:35:29 GMT owner, status changed https://svn.boost.org/trac10/ticket/7887#comment:1 https://svn.boost.org/trac10/ticket/7887#comment:1 <ul> <li><strong>owner</strong> changed from <span class="trac-author">Anthony Williams</span> to <span class="trac-author">viboes</span> </li> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">assigned</span> </li> </ul> <p> Have you tried including another header from another boost library, e.g Boost.System? Maybe you should consult some specific Eclipse forums or <a class="missing wiki">StackOverflow</a>. </p> Ticket Barnabé Faliu <barnabe.faliu@…> Sat, 12 Jan 2013 15:08:02 GMT <link>https://svn.boost.org/trac10/ticket/7887#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/7887#comment:2</guid> <description> <p> I think you found something, problem must come from thread library because execution works with every headers except headers from "<strong>boost/stage/lib/thread/</strong>" and the header "<strong>/stage/lib/thread.hpp</strong>" </p> </description> <category>Ticket</category> </item> <item> <author>Barnabé Faliu <barnabe.faliu@…></author> <pubDate>Sat, 12 Jan 2013 15:23:07 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/7887#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/7887#comment:3</guid> <description> <p> EDIT : Sorry i typed wrong, Pathes are respectively "<strong>boost/thread</strong>" and "<strong>boost/thread.hpp</strong>" </p> </description> <category>Ticket</category> </item> <item> <dc:creator>viboes</dc:creator> <pubDate>Sat, 12 Jan 2013 16:12:16 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/7887#comment:4 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/7887#comment:4</guid> <description> <p> I have tried for the first time to use Eclipse and I rich to compile and run </p> <pre class="wiki">#include &lt;iostream&gt; //#include &lt;boost/thread/thread.hpp&gt; using namespace std; int main() { cout &lt;&lt; "!!!Hello World!!!" &lt;&lt; endl; // prints !!!Hello World!!! return 0; } </pre><p> When I add the library boost_system and the path where it can be found the build is OK, </p> <pre class="wiki">**** Build of configuration Debug for project tests **** make all Building file: ../src/tests.cpp Invoking: GCC C++ Compiler g++ -I/Users/viboes/boost/trunk/boost -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"src/tests.d" -MT"src/tests.d" -o"src/tests.o" "../src/tests.cpp" Finished building: ../src/tests.cpp Building target: tests Invoking: MacOS X C++ Linker g++ -L/Users/viboes/boost/trunk/stage/lib -o "tests" ./src/tests.o -lboost_system Finished building target: tests </pre><p> When I try to run it, I'm getting </p> <pre class="wiki">dyld: Library not loaded: libboost_system.dylib Referenced from: /Users/viboes/Documents/workspace/tests/Debug/tests Reason: image not found </pre><p> It seems that the run is not seen where the libs are located independently of boost_thread. </p> <p> Please, could you post the error you are getting on the console? </p> </description> <category>Ticket</category> </item> <item> <author>Barnabé Faliu <barnabe.faliu@…></author> <pubDate>Sun, 13 Jan 2013 16:23:26 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/7887#comment:5 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/7887#comment:5</guid> <description> <p> Problem solved by addind "<strong>C:/boost/stage/lib</strong>" to the Windows Path environment variable ! </p> <p> Thank you for your help </p> </description> <category>Ticket</category> </item> <item> <dc:creator>viboes</dc:creator> <pubDate>Sun, 13 Jan 2013 18:49:14 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/7887#comment:6 https://svn.boost.org/trac10/ticket/7887#comment:6 <ul> <li><strong>status</strong> <span class="trac-field-old">assigned</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">worksforme</span> </li> </ul> <p> OK. Then there were no issue with Boost.Thread ;-). I close the issue. </p> Ticket