Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting an error: collect2: error: ld returned 1 exit status #75

Open
himanshusetia08hs opened this issue May 20, 2021 · 0 comments
Open

Comments

@himanshusetia08hs
Copy link

Using Ubuntu 20.04.2.0 LTS version

  1. I had cloned the git repository in Ubuntu.

  2. Build the library

  3. Created MyApp.cc file at home and copied the code:-
    #include <stdio.h>
    #include "Arachne/Arachne.h"

    void numberPrinter(int n) {
    printf("NumberPrinter says %d\n", n);
    }

    // This is where user code should start running.
    void AppMain(int argc, const char** argv) {
    printf("Arachne says hello world and creates a thread.\n");
    auto tid = Arachne::createThread(numberPrinter, 5);
    Arachne::join(tid);
    }

    // The following bootstrapping code should be copied verbatim into most Arachne
    // applications.
    void AppMainWrapper(int argc, const char** argv) {
    AppMain(argc, argv);
    Arachne::shutDown();
    }
    int main(int argc, const char** argv){
    Arachne::init(&argc, argv);
    Arachne::createThread(&AppMainWrapper, argc, argv);
    Arachne::waitForTermination();
    }

  4. Executed the command:

g++ -std=c++11 -o MyApp MyApp.cc -Iarachne-all/Arachne/include -Iarachne-all/CoreArbiter/include -Iarachne-all/PerfUtils/include -Larachne-all/Arachne/lib -lArachne -Larachne-all/CoreArbiter/lib -lCoreArbiter -Larachne-all/PerfUtils/lib/ -lPerfUtils -lpcrecpp –pthread

Getting an error: collect2: error: ld returned 1 exit status

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant