Omnimaga

General Discussion => Technology and Development => Computer Programming => Topic started by: hellninjas on January 28, 2012, 01:44:07 pm

Title: C++ Error help
Post by: hellninjas on January 28, 2012, 01:44:07 pm
im trying to compile and run my program (C++)
but i keep getting the errors...
In function '_mingw_CRTStartup':
[Linker error] undefined reference to '__dyn+tls_init_callback'
[Linker error] undefined reference to '__cpu_features_init'
i:\gw\lib\crt2.o(.text+0x8) Id returned 1 exit status
This seems to only happen while TiLP2 is installed, and i really
dont want to keep installing and unistalling all the time D:
Title: Re: C++ Error help
Post by: Juju on January 28, 2012, 01:55:57 pm
What are you compiling?
Title: Re: C++ Error help
Post by: hellninjas on January 28, 2012, 01:56:58 pm
Its just a simple character maker for a game I play with friends at the school :D
Download is below.
Title: Re: C++ Error help
Post by: thydowulays on January 28, 2012, 02:05:46 pm
Well, the problem is that MinGW can't "connect" with it's internal parts. I can't really help you with fixing MinGW but if you got Code::Blocks and put your code in there, it should work fine.
Title: Re: C++ Error help
Post by: Juju on January 28, 2012, 02:14:08 pm
Yep, it's probably your IDE setup. The code itself should compile fine. Make sure you have a C++ project.
Title: Re: C++ Error help
Post by: jsj795 on January 28, 2012, 06:10:23 pm
does not having <cstdlib> and <time.h> headings matter?
cuz I downloaded source code and it only had iostream header, and at least for my IDE (Code::Blocks) srand() and time() functions need cstdlib and time.h headings
Title: Re: C++ Error help
Post by: Binder News on January 28, 2012, 08:30:50 pm
Yes, you need to include those header files.
EDIT: even if it does compile fine on some systems (which it shouldn't be able to, but oh well), it's better to include the headers so it's obvious. Also, not including the headers could be the source of the errors.