Error with undefined reference

Sysprogs forums Forums VisualGDB Error with undefined reference

  • This topic has 1 reply, 2 voices, and was last updated 10 years ago by ket.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #784
    mru22
    Participant

    I am receiving the following message when I attempt to compile my project.

    error 106 error VGDB1000: undefined reference to `_imp__pthread_create’

    I have the following in my Makefile settings:

    -Wall -ggdb -ffunction-sections -O0 -std=c99 -g -pthread

    And I have #include in the file that im trying to compile.

    Any suggestions as to how I can fix this error ?

    Thanks,

    #3056
    ket
    Participant

    Hi,

    Is your project code where you are trying to include pthread functions written in c++? If so, then you need extern “C” { } around your pthread include (and any other c library include) as follows:

    extern "C" {
    #include 
    }
Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.