[cfe-dev] module map help - duplicate symbol definitions

Sean Silva chisophugis at gmail.com
Sat Jan 24 07:15:21 PST 2015


You can use -fdiagnostics-show-note-include-stack to help debug this sort
of thing. It is likely because a header is being picked up through a
module, but also through a regular include. E.g. your header file might be
getting pulled into a module without being declared as such in the module
map; it will thus be pulled into the module, but clang won't know to grab
the module when it sees an include of the header, so you can end up
simultaneously having the header #include'd but also having it imported
through the module.

-- Sean Silva

On Fri, Jan 23, 2015 at 11:29 PM, Thompson, John <
John_Thompson at playstation.sony.com> wrote:

>  I’m trying to create a module map, but I keep getting duplicate symbol
> errors for the same source line.  What does this mean?
>
>
>
> For example:
>
>
>
> orbis-clang -c -I"D:\usr\local\psp2\ORBIS SDKs\2.000_pre_mod" -fmodules
> -fcxx-modules -fmodules-cache-path=./cache_path-o
> target_include_common_fios2_srcfios2_debug_h.o
> target/include_common/fios2/srcfios2_debug_h.cpp
>
> In file included from target/include_common/fios2/srcfios2_debug_h.cpp:1:
>
> In file included from D:\usr\local\psp2\ORBIS
> SDKs\2.000_pre_mod/target/include\../include_common/fios2/fios2_debug.h:13:
>
> D:\usr\local\psp2\ORBIS
> SDKs\2.000_pre_mod/target/include\../include_common/fios2/fios2_types.h:153:14:
> error:
>
>       redefinition of 'SceFiosOpFlags'
>
> typedef enum SceFiosOpFlags
>
>              ^
>
> D:\usr\local\psp2\ORBIS
> SDKs\2.000_pre_mod/target/include\../include_common/fios2/fios2_types.h:153:14:
> note: previous
>
>       definition is here
>
> typedef enum SceFiosOpFlags
>
>              ^
>
>
>
> Thanks.
>
>
>
> -John
>
>
>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20150124/4aef8391/attachment.html>


More information about the cfe-dev mailing list