Skip to content

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

@himanshusetia08hs

Description

@himanshusetia08hs

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions