mercredi 4 novembre 2015

sigset not found

Consider the following example:

#include <signal.h>

extern "C" {
    static void signalHandler(int signal) {}
}

int main(int, char**)
{
    sigset (SIGTERM, signalHandler);
    return 0;
}

CC test.cpp succeeds.

But

CC test.cpp -std=c++11
Undefined                       first referenced
 symbol                             in file
sigset                           test.o
ld: fatal: symbol referencing errors

I also tried the following:

CC test.cpp -std=c++11 -lstdc++ -lgcc_s -lc

But yields the same error. -m64 doesn't help either.

OS: Solaris 11 Compiler: CC from Oracle Solaris Studio 12.4

Aucun commentaire:

Enregistrer un commentaire