File format not recognized


#1

Hello, first of all i’m sorry for my bad english.
I’m trying to programming in C with Atom and when i try to compile a simple “Hello, World!” program i get that:

“file not recognized: File format not recognized
collect2.exe: error: ld returned 1 exit status”

to install Atom and the compiler i used that guide: https://www.youtube.com/watch?v=BxVMsJwVA74.
(i don’t know if i can post some links, im sorry if i’m breaking the rules).
i cecked my path in my “enviroments variables” and i have: C:\TDM-GCC-32\bin
Oh, i’m having also iusses with Eclipse.

I apologize again for my bad english, if someone need more info just tell me,
Thanks guys.


#2

What file are you trying to run?


#3

#include <stdio.h>
int main(){
printf(“Hello,World!”);
}

just that iper-simple project.


#4

You have shared the contents of the file, but what is the file itself? According to the compiler, it is in a format that isn’t recognized.


#5

Well, i don’t know, i also setted the comipler for the c.
i started a new project and writed those few lines. that’s it


#6

Can you post a screenshot of your Atom window?

The problem here is that you don’t know what to look for. I’m going to see if I can find out what to look for and then if there’s enough for me to go on I will do research to find an answer, but in order to do that I need for you to tell me everything you see related to Atom, the script package, the compiler, and the file that you are trying to run. All I can go on is what you tell me. When the information is mostly visual, screenshots are great for that.


#8

So let’s start with packages that i installed and the little program, if you need someting more specific just tell me. :slight_smile:


#9

i’m a new user so i can’t post immages :frowning:


#10

It’s unlikely to be caused by any other packages.

Examples of what might help are:

  • What is the file name?
  • Are there any spaces in the absolute path to the file?
  • What is it’s encoding (e.g., UTF8, Ascii, etc.)?

And what issues are you having with Eclispse? Could they be relevant?


#11

You can post links to images, or links to albums. Specifically, I need to see what you’re seeing. If I were an IT person at your company, I would have sat with you in front of your computer and just observed until I noticed something that didn’t look right to me.


#12

Fortunatly i soldev the problem :smiley: