<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<atom:link href="http://www.multicorebsp.com/forum/extern.php?action=feed&amp;tid=41&amp;type=rss" rel="self" type="application/rss+xml" />
		<title><![CDATA[The MulticoreBSP Forums / Bug Trying To Implement MulticoreBSP with JNI on W7 64 bits]]></title>
		<link>http://www.multicorebsp.com/forum/viewtopic.php?id=41</link>
		<description><![CDATA[The most recent posts in Bug Trying To Implement MulticoreBSP with JNI on W7 64 bits.]]></description>
		<lastBuildDate>Sat, 18 Jan 2014 18:13:34 +0000</lastBuildDate>
		<generator>FluxBB</generator>
		<item>
			<title><![CDATA[Re: Bug Trying To Implement MulticoreBSP with JNI on W7 64 bits]]></title>
			<link>http://www.multicorebsp.com/forum/viewtopic.php?pid=73#p73</link>
			<description><![CDATA[<p>As a note: this question is about calling MulticoreBSP <strong>for C</strong> from Java. Note that there&#039;s also a native Java version available.</p><p>As for the question, with part one, you&#039;re using a 64-bit compiler but linking against a 32-bit library; hence the BSP functions are not recoginised. For part two, the BSP functions are recognised by the linker, but the MulticoreBSP for C library depends on POSIX Threads, which is not found by the linker. Windows does not have native PThreads support. To add PThreads, you can link against libraries from the following project:</p><p><a href="http://www.sourceware.org/pthreads-win32/" rel="nofollow">http://www.sourceware.org/pthreads-win32/</a></p><p>For a walkthrough on how to get it working in Code::Blocks, please consult this thread:</p><p><a href="http://multicorebsp.com/forum/viewtopic.php?id=27" rel="nofollow">http://multicorebsp.com/forum/viewtopic.php?id=27</a></p>]]></description>
			<author><![CDATA[dummy@example.com (Albert-Jan Yzelman)]]></author>
			<pubDate>Sat, 18 Jan 2014 18:13:34 +0000</pubDate>
			<guid>http://www.multicorebsp.com/forum/viewtopic.php?pid=73#p73</guid>
		</item>
		<item>
			<title><![CDATA[Bug Trying To Implement MulticoreBSP with JNI on W7 64 bits]]></title>
			<link>http://www.multicorebsp.com/forum/viewtopic.php?pid=72#p72</link>
			<description><![CDATA[<p>Hi,</p><p>I&#039;m trying to call the bsp functions (through the header mcbsp.h) from a .c file used within JNI.</p><p>But when building the Dll with x86_64-w64-mingw32-gcc through Code::Blocks it throws:<br />Linker mcbsp used: <a href="http://www.multicorebsp.com/downloads/c/1.1.0/" rel="nofollow">http://www.multicorebsp.com/downloads/c/1.1.0/</a><strong>win32</strong>/libmcbsp1.1.0.a</p><div class="codebox"><pre><code>C:/Users/.../main.c:36: undefined reference to `bsp_nprocs&#039;
C:/Users/.../main.c:37: undefined reference to `bsp_begin&#039;
C:/Users/.../main.c:38: undefined reference to `bsp_nprocs&#039;
C:/Users/.../main.c:39: undefined reference to `bsp_pid&#039;
C:/Users/.../main.c:42: undefined reference to `bsp_push_reg&#039;
C:/Users/.../main.c:43: undefined reference to `bsp_sync&#039;
C:/Users/.../main.c:91: undefined reference to `bsp_put&#039;
C:/Users/.../main.c:92: undefined reference to `bsp_put&#039;
C:/Users/.../main.c:94: undefined reference to `bsp_sync&#039;
C:/Users/.../main.c:108: undefined reference to `bsp_pop_reg&#039;
C:/Users/.../main.c:111: undefined reference to `bsp_end&#039;</code></pre></div><p>Contrariwise, when building the Dll with x86_64-w64-mingw32-gcc through Code::Blocks but with <br />Linker mcbsp: <a href="http://www.multicorebsp.com/downloads/c/1.1.0/" rel="nofollow">http://www.multicorebsp.com/downloads/c/1.1.0/</a><strong>win64</strong>/libmcbsp1.1.0.a</p><p>I&#039;ve got those errors:</p><div class="codebox"><pre class="vscroll"><code>/home/albert/Documents/1.1.0/mcbsp.c:251: undefined reference to `__imp_pthread_mutex_init&#039;
/home/albert/Documents/1.1.0/mcbsp.c:267: undefined reference to `__imp_pthread_getspecific&#039;
/home/albert/Documents/1.1.0/mcbsp.c:314: undefined reference to `__imp_pthread_attr_init&#039;
/home/albert/Documents/1.1.0/mcbsp.c:326: undefined reference to `__imp_pthread_create&#039;
/home/albert/Documents/1.1.0/mcbsp.c:334: undefined reference to `__imp_pthread_getw32threadhandle_np&#039;
/home/albert/Documents/1.1.0/mcbsp.c:366: undefined reference to `__imp_pthread_attr_destroy&#039;
/home/albert/Documents/1.1.0/mcbsp.c:394: undefined reference to `__imp_pthread_self&#039;
/home/albert/Documents/1.1.0/mcbsp.c:396: undefined reference to `__imp_pthread_setspecific&#039;
/home/albert/Documents/1.1.0/mcbsp.c:267: undefined reference to `__imp_pthread_getspecific&#039;
C:\Users\...\libmcbsp1.1.0.a(mcbsp.o): In function `bsp_end&#039;:
/home/albert/Documents/1.1.0/mcbsp.c:443: undefined reference to `__imp_pthread_getspecific&#039;
/home/albert/Documents/1.1.0/mcbsp.c:459: undefined reference to `__imp_pthread_setspecific&#039;
/home/albert/Documents/1.1.0/mcbsp.c:494: undefined reference to `__imp_pthread_join&#039;
/home/albert/Documents/1.1.0/mcbsp.c:501: undefined reference to `__imp_pthread_mutex_destroy&#039;
/home/albert/Documents/1.1.0/mcbsp.c:487: undefined reference to `__imp_pthread_exit&#039;
C:\Users\...\lib\libmcbsp1.1.0.a(mcbsp.o): In function `bsp_nprocs&#039;:
/home/albert/Documents/1.1.0/mcbsp.c:558: undefined reference to `__imp_pthread_getspecific&#039;
C:\Users\...\lib\libmcbsp1.1.0.a(mcbsp.o): In function `bsp_vabort&#039;:
/home/albert/Documents/1.1.0/mcbsp.c:613: undefined reference to `__imp_pthread_exit&#039;
/home/albert/Documents/1.1.0/mcbsp.c:613: undefined reference to `__imp_pthread_exit&#039;
C:\Users\...\libmcbsp1.1.0.a(mcbsp.o): In function `bsp_sync&#039;:
/home/albert/Documents/1.1.0/mcbsp.c:618: undefined reference to `__imp_pthread_getspecific&#039;
C:\Users\...\libmcbsp1.1.0.a(mcinternal.o): In function `mcbsp_internal_check_keys_allocated&#039;:
/home/albert/Documents/1.1.0/mcinternal.c:113: undefined reference to `__imp_pthread_mutex_lock&#039;
/home/albert/Documents/1.1.0/mcinternal.c:145: undefined reference to `__imp_pthread_mutex_unlock&#039;
/home/albert/Documents/1.1.0/mcinternal.c:117: undefined reference to `__imp_pthread_key_create&#039;
/home/albert/Documents/1.1.0/mcinternal.c:129: undefined reference to `__imp_pthread_setspecific&#039;
C:\Users\...\libmcbsp1.1.0.a(mcinternal.o): In function `bsp_begin_check&#039;:
/home/albert/Documents/1.1.0/mcinternal.c:40: undefined reference to `__imp_pthread_getspecific&#039;
/home/albert/Documents/1.1.0/mcinternal.c:67: undefined reference to `__imp_pthread_setspecific&#039;
C:\Users\...\libmcbsp1.1.0.a(mcinternal.o): In function `mcbsp_internal_getMachineInfo&#039;:
/home/albert/Documents/1.1.0/mcinternal.c:81: undefined reference to `__imp_pthread_getspecific&#039;
/home/albert/Documents/1.1.0/mcinternal.c:85: undefined reference to `__imp_pthread_setspecific&#039;
C:\Users\...\libmcbsp1.1.0.a(mcinternal.o): In function `bsp_init_internal&#039;:
/home/albert/Documents/1.1.0/mcinternal.c:95: undefined reference to `__imp_pthread_getspecific&#039;
/home/albert/Documents/1.1.0/mcinternal.c:102: undefined reference to `__imp_pthread_setspecific&#039;
C:\Users\...\libmcbsp1.1.0.a(mcinternal.o): In function `mcbsp_internal_spmd&#039;:
/home/albert/Documents/1.1.0/mcinternal.c:153: undefined reference to `__imp_pthread_setspecific&#039;
C:\Users\...\libmcbsp1.1.0.a(mcinternal.o): In function `mcbsp_internal_check_aborted&#039;:
/home/albert/Documents/1.1.0/mcinternal.c:195: undefined reference to `__imp_pthread_getspecific&#039;
/home/albert/Documents/1.1.0/mcinternal.c:204: undefined reference to `__imp_pthread_exit&#039;
/home/albert/Documents/1.1.0/mcinternal.c:195: undefined reference to `__imp_pthread_getspecific&#039;
C:\Users\...\libmcbsp1.1.0.a(mcinternal.o): In function `mcbsp_internal_syncWithCondition&#039;:
/home/albert/Documents/1.1.0/mcinternal.c:204: undefined reference to `__imp_pthread_exit&#039;
C:\Users\...\libmcbsp1.1.0.a(mcinternal.o): In function `mcbsp_internal_check_aborted&#039;:
/home/albert/Documents/1.1.0/mcinternal.c:195: undefined reference to `__imp_pthread_getspecific&#039;
/home/albert/Documents/1.1.0/mcinternal.c:204: undefined reference to `__imp_pthread_exit&#039;
/home/albert/Documents/1.1.0/mcinternal.c:195: undefined reference to `__imp_pthread_getspecific&#039;
/home/albert/Documents/1.1.0/mcinternal.c:204: undefined reference to `__imp_pthread_exit&#039;
/home/albert/Documents/1.1.0/mcinternal.c:195: undefined reference to `__imp_pthread_getspecific&#039;
/home/albert/Documents/1.1.0/mcinternal.c:204: undefined reference to `__imp_pthread_exit&#039;
C:\Users\...\libmcbsp1.1.0.a(mcutil.o): In function `mcbsp_util_address_table_initialise&#039;:
/home/albert/Documents/1.1.0/mcutil.c:645: undefined reference to `__imp_pthread_mutex_init&#039;
C:\Users\...\libmcbsp1.1.0.a(mcutil.o): In function `mcbsp_util_address_table_setsize&#039;:
/home/albert/Documents/1.1.0/mcutil.c:697: undefined reference to `__imp_pthread_mutex_lock&#039;
/home/albert/Documents/1.1.0/mcutil.c:702: undefined reference to `__imp_pthread_mutex_unlock&#039;
C:\Users\...\libmcbsp1.1.0.a(mcutil.o): In function `mcbsp_util_address_table_destroy&#039;:
/home/albert/Documents/1.1.0/mcutil.c:714: undefined reference to `__imp_pthread_mutex_destroy&#039;
C:\Users\...\libmcbsp1.1.0.a(mcutil.o): In function `mcbsp_util_address_table_setsize&#039;:
/home/albert/Documents/1.1.0/mcutil.c:697: undefined reference to `__imp_pthread_mutex_lock&#039;
/home/albert/Documents/1.1.0/mcutil.c:702: undefined reference to `__imp_pthread_mutex_unlock&#039;
c:/mingwx64/bin/../lib/gcc/x86_64-w64-mingw32/4.7.0/../../../../x86_64-w64-mingw32/lib/../lib/libmingw32.a(lib64_libmingw32_a-crt0_c.o): In function `main&#039;:
c:\bb\vista64-mingw32\mingw-x86-x86_64\build\build\mingw\obj/../../../build/mingw/mingw-w64-crt/crt/crt0_c.c:18: undefined reference to `__mingw_winmain_nShowCmd&#039;
c:\bb\vista64-mingw32\mingw-x86-x86_64\build\build\mingw\obj/../../../build/mingw/mingw-w64-crt/crt/crt0_c.c:18: undefined reference to `__mingw_winmain_lpCmdLine&#039;
c:\bb\vista64-mingw32\mingw-x86-x86_64\build\build\mingw\obj/../../../build/mingw/mingw-w64-crt/crt/crt0_c.c:18: undefined reference to `__mingw_winmain_hInstance&#039;
c:\bb\vista64-mingw32\mingw-x86-x86_64\build\build\mingw\obj/../../../build/mingw/mingw-w64-crt/crt/crt0_c.c:18: undefined reference to `WinMain&#039;</code></pre></div><p>I have to say that when using MulticoreBSP alone (without JNI) I&#039;ve got no problem of compilation. In the same way if I use separately JNI (without calling bsp functions), I&#039;ve got again no problem of compilation.</p><p>Any ideas what could be the problem?</p>]]></description>
			<author><![CDATA[dummy@example.com (finao13)]]></author>
			<pubDate>Fri, 17 Jan 2014 17:33:09 +0000</pubDate>
			<guid>http://www.multicorebsp.com/forum/viewtopic.php?pid=72#p72</guid>
		</item>
	</channel>
</rss>
