# Trying to learn C programming with Dev-C++



## chrono31 (Jan 20, 2009)

Ok,

where do I begin..

Im running Vista Ultimate 64bit

I have C for dummies which I am reading..

It says to go out and get a compiler which I did..(Dev-C++)

And a text editor 
I have Notepad2

So I write out the first example in notepad2

#include <stdio.h>

int main() 
{ 
printf("Goodbye, cruel world!\n") ; 
return(0); 
}

Then I save it in a specified folder as goodbye.c

And use Dev-C++ to open goodbye.c 
I compile it.. a little screen blinks at me..

And I run it and it gives me an error 
"source file not compiled"

I thought that's what I just did??

So am I doing something wrong?? 
Am I missing a step?

Maybe Dev-C++ isent the right tool to do what im trying to do??

My name is Brian and the version of Dev-C++ 4.9.9.2
Thanks for any help....

I also wanted to share my compile log..

Compiler: Default compiler 
Building Makefile: "C:\C scripts\Makefile.win" 
Executing make... 
make.exe -f "C:\C scripts\Makefile.win" all 
gcc.exe Goobye.o -o "Project1.exe" -L"C:/Dev-Cpp/lib"

/mingw/lib/crt2.o(.text+0x37):crt1.c: undefined reference to `__cpu_features_init' 
collect2: ld returned 1 exit status

make.exe: *** [Project1.exe] Error 1

Execution terminated

Maybe that could shed some light.... 
Thanks...:up:


----------



## burnthepc (Aug 12, 2007)

Your code seems fine. Sounds like your compiler isn't set up correctly. It's looking for a library file that isn't there - "undefined reference to `__cpu_features_init' "

I don't really know the setup of dev C++ but I noticed that the /lib path in your log appears different. 1st reference is : -L"C:/Dev-Cpp/lib and hte later one is /mingw/lib/

Maybe check the config file and make sure the /lib reference is pointing to the /lib folder in your hard drive.


----------

