<br><div class="gmail_quote">Hello,<br><br>I'm generating C code (and the resulting obj files) using llvm 3.4 for both unix and windows.<br>And I use the dreaded weak references, that, for windows, are not too widely supported.<br>
<br>When I link my application on linux, I have no issue.<br>
But when I'm doing the same on windows using mingw I got a duplicate symbol error : <br><span style="font-family:courier new,monospace"><br>..\robovm-0.0.8\lib\robovm-rt.jar\dalvik\system\BlockGuard$BlockGuardPolicyException.class.o:(.text$dalvik_system_BlockGuard$24BlockGuardPolicyException_getPolicy__I_lookup[_dalvik_system_BlockGuard$24BlockGuardPolicyException_getPolicy__I_lookup]+0x0): multiple definition of `dalvik_system_BlockGuard$24BlockGuardPolicyException_getPolicy__I_lookup'<br>
..\Temp\robovm3774596063679264132.tmp\linker.o:(.text+0x340): first defined here<br>..\robovm-0.0.8\lib\robovm-rt.jar\dalvik\system\BlockGuard$BlockGuardPolicyException.class.o:(.text$dalvik_system_BlockGuard$24BlockGuardPolicyException_getPolicyViolation__I_lookup[_dalvik_system_BlockGuard$24BlockGuardPolicyException_getPolicyViolation__I_lookup]+0x0): multiple definition of `dalvik_system_BlockGuard$24BlockGuardPolicyException_getPolicyViolation__I_lookup'<br>
..\Temp\robovm3774596063679264132.tmp\linker.o:(.text+0x350): first defined here<br>..\robovm-0.0.8\lib\robovm-rt.jar\dalvik\system\BlockGuard$BlockGuardPolicyException.class.o:(.text$dalvik_system_BlockGuard$24BlockGuardPolicyException_getMessage__Ljava_lang_String$3B_lookup[_dalvik_system_BlockGuard$24BlockGuardPolicyException_getMessage__Ljava_lang_String$3B_lookup]+0x0): multiple definition of `dalvik_system_BlockGuard$24BlockGuardPolicyException_getMessage__Ljava_lang_String$3B_lookup'<br>
<br></span>Because those symbols are declared as weak.<br><br>What is the status about the support of weak symbols on windows?<br>Are they supposed to work? Are they supposed to <i>never </i>work ?<br><br>Do you know any way to fix this (or work around it). I use weak symbols everywhere in my code generation, so I would prefer a fix that doesn't involve to rewrite my code.<br>
<br>I'm considering rewriting the obj files using objcopy. <br>Has this any chance to work ?<br>Here are the o.<br><br>Cheers,<br>Carl.<br>
</div><br>