Menu

undefined reference to `__dyn_tls_init_callba

2012-01-13
2012-09-26
  • Adam Gaskins

    Adam Gaskins - 2012-01-13

    When I try to compile my program:

    #include <cstdlib>
    #include <iostream>
    
    using namespace std;
    
    int main(int argc, char *argv[])
    {
        cout<<"Hello World!";
    
        cin.get();
    
        return EXIT_SUCCESS;
    }
    

    I get this error:

    i:\gw\lib\crt2.o(.text+0x8): In function `_mingw_CRTStartup':
    [Linker error] undefined reference to `__dyn_tls_init_callback'
    [Linker error] undefined reference to `__cpu_features-init'
    i:\gw\lib\crt.o(.text+0x8): Id returned 1 exit status
    C:\Dev-Cpp\Makefile.win: [Build Error] [Test.exe] Error 1
    
     
  • Adam Gaskins

    Adam Gaskins - 2012-01-13

    I apologize for the double post, but I meant to post this image:

     
  • Jay Murphy

    Jay Murphy - 2012-03-01

    Jello

    I, too, am seeing these same, infernal messages in this program (and several
    other "example" projects). Somewhere I read a post that suggested making sure
    that MinGW was the latest & greatest, then pointing an include directory
    setting to MinGW instead of where it was defaulted to something beneath dev-
    cpp\?? Anyway, long & short: crt1.o and/or crt2.o have something deviously
    SIMILAR to the dyntls & cpufeatures things - except there's a diff in the
    NUMBER of UNDERSCORES beginning the VarNames! Don't remember which way - one
    had 2 vs tuther had 3! As I don't (yet) have the source for those modules, I
    haven't found a way around the lame faux pas. 'Tis just another (in a LONG
    line of attempts) to TRY to setup a programming environment that actually
    WORKS so I might wrinkle my own code now and then - but it seems that NOTHING
    that I've tried will actually compile and run their own included examples.
    This makes it REALLY DIFFICULT to make ANY time learning their ropes - when
    their own examples don't prove reliable for starting!

    So - how about a bit of CHEESE with this WhINE?

    Good luck with that, as they say.

    PogDupe

     
  • Aris

    Aris - 2012-06-16

    Your code is ok.

    Check your instalation of dev c++ and if you use the right version according
    to your cpu architectute

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.