Skip to content

When compiled with GCC 6.2.1 the same plugin is loaded twice #5

@hhyyrylainen

Description

@hhyyrylainen

In the example if I change the build script from clang++ to g++ for the plugins, the same plugin is loaded twice.
After loading both plugin1 and plugin2 with clang the command list in the example is this:

Command1
Command2
Command3
Command4

The same thing but all the files compiled with GCC:

Command1
Command2

This is the modified build script:

g++ -std=c++11 -I ../../ main.cpp -o main -ldl -pthread

g++ -std=c++11 -I ../../ plugin1.cpp -shared -fPIC -o plugin1.so
g++ -std=c++11 -I ../../ plugin2.cpp -shared -fPIC -o plugin2.so

Originally I encountered this when trying to add a second plugin to my own project, but it kept loading the first one twice. I tried both the static functions and creating a dynamic instance.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions