I am in a introduction to programming class at my school and we need a compiler at home to work on. I downloaded Dev-C++, which we use at school, and tried to do my homework. However, I cannot run my programs through the command prompt like at my school. I notice that it isn't creating any exe files like it does at my school. From what I've read, it won't make exe's if there are errors. I found the errors but I don't understand them. If you could help me I would really appreciate it!
Here are the errors and my program:
Errors: [Linker error] undefined reference to `__dyn_tls_init_callback'
[Linker error] undefined reference to `__cpu_features_init'
ld returned 1 exit status
Program Code: It's meant to work a little like an atm.
#include <stdio.h>
void bank(float A, float T)
{
A = A + T;
}
int main ()
{
float A, T;
A = 1025.50; /* assume account balance = $1025.50 */
printf("Enter your transaction amount.\n");
scanf("%f", &T);
bank(A,T);
/* after transaction on the ATM */
if (T > 0)
printf("current balance: %.2f after deposit: %.2f\n",(A+T),T);
else if (T < 0)
printf("current balance: %.2f after withdrawal: %.2f\n",(A+T),-T);
else
printf("current balance: %.2f\n",A);
Also just for your information Dev-C++ hasn't been actively developed in quite a few years. If you want to keep using Dev C++ I would recommend you check out wxDev-C++.
To answer m4ster r0shi: I downloaded a compiler that someone at my school said to, but I couldn't get it to work. That's why I got Dev-C++. But now CodeBlocks works great!