Good to hear :)<br>You could also link statically for example:<br><br>lib some_lib : some_source.cpp&lt;link&gt;static ;<br><br>Which could be simpler but would also extend you linking time if you plan to do big project.<br>
<br>Regards<br><br><br><div class="gmail_quote">W dniu 30 stycznia 2012 11:34 u�ytkownik Karsten Ahnert <span dir="ltr">&lt;<a href="mailto:karsten.ahnert@ambrosys.de">karsten.ahnert@ambrosys.de</a>&gt;</span> napisa�:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Ok, thank you! That solved the problem. I only had to use _WIN32 in #ifdef.<br>
<br>
There is also a boost preprocessor symbol for this declaration:<br>
BOOST_SYMBOL_EXPORT.<br>
<div class="im"><br>
<br>
<br>
<br>
<br>
<br>
On 01/30/2012 10:31 AM, Jaros�aw Bober wrote:<br>
&gt; Ahh sorry I didn&#39;t looked at your project before and assumed that you<br>
&gt; have problem with boost itself. Yes, those flags are only for boost libs.<br>
&gt;<br>
&gt; What you&#39;re trying to do is to make shared libs (this is the default<br>
&gt; behaviour of boost-build), in linux it works out of the box.<br>
&gt; In Windows however you have to declare export symbols with something<br>
&gt; like this:<br>
&gt;<br>
&gt; __declspec(dllexport) void tree_func( int a );<br>
&gt;<br>
&gt; To support multiplatform you can do something like this:<br>
&gt;<br>
&gt; #ifdef WIN32<br>
&gt; #define EXPORTED __declspec(dllexport)<br>
&gt; #else<br>
&gt; #define EXPORTED<br>
&gt; #endif<br>
&gt;<br>
&gt; and then have your declaration:<br>
&gt;<br>
&gt; EXPORTED void tree_func( int a );<br>
&gt;<br>
&gt; Regards<br>
&gt;<br>
&gt; 2012/1/30 Karsten Ahnert &lt;<a href="mailto:karsten.ahnert@ambrosys.de">karsten.ahnert@ambrosys.de</a><br>
</div>&gt; &lt;mailto:<a href="mailto:karsten.ahnert@ambrosys.de">karsten.ahnert@ambrosys.de</a>&gt;&gt;<br>
<div class="im">&gt;<br>
&gt; � � Ok, I also tried this. It does not work. I thought that<br>
&gt; � � BOOST_ALL_NO_LIBS is only for the boost libraries (filesystem,<br>
&gt; � � program_option, etc..).<br>
&gt;<br>
&gt; � � Am 30.01.2012 09:43, schrieb Jaros�aw Bober:<br>
&gt;&gt; � � The flag I was talking about is BOOST_ALL_NO_LIB not<br>
&gt;&gt; � � BOOST_ALL_NO_LIBS.<br>
&gt;&gt; � � You are right that this flags controll automatic linking. So when<br>
&gt;&gt; � � you do it manually, you&#39;re linking to shared libraries (unless<br>
&gt;&gt; � � you&#39;re directly linking to static version).<br>
&gt;&gt; � � But automatic linking wants static if you haven&#39;t declared<br>
&gt;&gt; � � BOOST_ALL_DYN_LINK somewhere.<br>
&gt;&gt; � � I had the same problem. Try this in jamroot:<br>
&gt;&gt;<br>
&gt;&gt; � � project :<br>
&gt;&gt; � � � � requirements<br>
&gt;&gt; � � � � &lt;define&gt;BOOST_ALL_NO_LIB<br>
&gt;&gt; � � ;<br>
&gt;&gt;<br>
&gt;&gt; � � Hope this helps.<br>
&gt;&gt;<br>
&gt;&gt; � � 2012/1/30 Karsten Ahnert &lt;<a href="mailto:karsten.ahnert@ambrosys.de">karsten.ahnert@ambrosys.de</a><br>
</div>&gt;&gt; � � &lt;mailto:<a href="mailto:karsten.ahnert@ambrosys.de">karsten.ahnert@ambrosys.de</a>&gt;&gt;<br>
<div class="im">&gt;&gt;<br>
&gt;&gt; � � � � I defined BOOST_ALL_NO_LIBS=1, but the problem is still the<br>
&gt;&gt; � � � � same. I think BOOST_ALL_NO_LIBS controlls automatic linking of<br>
&gt;&gt; � � � � the boost libraries. Any other ideas?<br>
&gt;&gt;<br>
&gt;&gt; � � � � Am 30.01.2012 09:05, schrieb Jaros�aw Bober:<br>
&gt;&gt;&gt; � � � � &gt;From first sight it looks like you have automatic linking<br>
&gt;&gt;&gt; � � � � turned on. This thing works only on windows, that&#39;s why<br>
&gt;&gt;&gt; � � � � you&#39;re fine on linux.<br>
&gt;&gt;&gt; � � � � Perhaps you should turn this off by defining flag<br>
&gt;&gt;&gt; � � � � BOOST_ALL_NO_LIB.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; � � � � Regards<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; � � � � 2012/1/28 Dr. Karsten Ahnert &lt;<a href="mailto:karsten.ahnert@ambrosys.de">karsten.ahnert@ambrosys.de</a><br>
</div>&gt;&gt;&gt; � � � � &lt;mailto:<a href="mailto:karsten.ahnert@ambrosys.de">karsten.ahnert@ambrosys.de</a>&gt;&gt;<br>
<div><div></div><div class="h5">&gt;&gt;&gt;<br>
&gt;&gt;&gt; � � � � � � Hi,<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; � � � � � � I have a a project with several dynamic libraries and<br>
&gt;&gt;&gt; � � � � � � some applications. Some of these libraries depend on<br>
&gt;&gt;&gt; � � � � � � other libraries.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; � � � � � � In the Jamroot I created aliases to all libraries and in<br>
&gt;&gt;&gt; � � � � � � the Jamfiles for the single library I include all depend<br>
&gt;&gt;&gt; � � � � � � libraries via these aliases. This works fine on linux<br>
&gt;&gt;&gt; � � � � � � (boost 1.48) but does not work on Windows machines. The<br>
&gt;&gt;&gt; � � � � � � problem is that bjam tries to find the static versions of<br>
&gt;&gt;&gt; � � � � � � the depended libraries which have not been build:<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; � � � � � � LINK : fatal error LNK1181: cannot open input file &#39;*.lib&#39;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; � � � � � � I attached a small self contained example. Any ideas how<br>
&gt;&gt;&gt; � � � � � � I can fix this?<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; � � � � � � Thank you,<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; � � � � � � Karsten<br>
_______________________________________________<br>
Unsubscribe &amp; other changes: <a href="http://lists.boost.org/mailman/listinfo.cgi/boost-build" target="_blank">http://lists.boost.org/mailman/listinfo.cgi/boost-build</a><br>
</div></div></blockquote></div><br>