Omnimaga
General Discussion => Technology and Development => Computer Programming => Topic started 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:
-
What are you compiling?
-
Its just a simple character maker for a game I play with friends at the school :D
Download is below.
-
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.
-
Yep, it's probably your IDE setup. The code itself should compile fine. Make sure you have a C++ project.
-
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
-
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.