You can use llvm-nm on object files to see where that duplicate symbols
starts out in.

- Alon


On Tue, Jun 23, 2015 at 10:09 AM, ZengRui Wang <[email protected]>
wrote:

> Hi,
>
> I have compiled boost::python and the python libraries using the
> instruction here
> https://github.com/kripken/emscripten/tree/master/tests/python, and then
> linking the python.bc to my project as a static library. However it shows
> me the error message:
>
> link error in
> 'C:\Users\zwang\SmartBody-Javascript\core\smartbody\simplesmartbody\python.bc':
> Linking globals named 'main': symbol multiply defined!
> 1>  Traceback (most recent call last):
> 1>    File "C:\Program Files\Emscripten\emscripten\1.30.0\\emcc", line
> 1238, in <module>
> 1>      shared.Building.link(linker_inputs, in_temp(target_basename +
> '.bc'), force_archive_contents=len([temp for i, temp in temp_files if not
> temp.endswith(STATICLIB_ENDINGS)]) == 0)
> 1>    File "C:\Program
> Files\Emscripten\emscripten\1.30.0\tools\shared.py", line 1429, in link
> 1>GCCLINK : assert os.path.exists(target) and (output is None or 'Could
> not open input file' not in output), 'Linking error : ' + output
> 1>AssertionError : Linking error :
> 1>
> 1>Build FAILED.
>
> I understand it is result of the same function declaration in python.bc
> library and I searched all the source code with the same int main
> definition and deleted them:
> Two files in Modules/zlib folder:* example.c and minigzip.c*( I
> encountered this situation before)
> One file in Modules/_ctypes/libffi/testsuite/libffl.call folder:
> *cls_dbls_struct.c*
> And some *make_buildinfo.c* files in PC and PC build even though I think
> they are irrelevant, I deleted them too.
>
> However, when I compile it again and link the compiled python.bc, the
> error is still there.
> What do I miss?
>
> Thanks!
>
> --
> You received this message because you are subscribed to the Google Groups
> "emscripten-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to