C:\Users\ruhit\Desktop\First try c++\Hello World: file not recognized: File format not recognized collect2.exe: error: ld returned 1 exit status


#1

C:\Users\ruhit\Desktop\First try c++\Hello World: file not recognized: File format not recognized
collect2.exe: error: ld returned 1 exit status

I continuously have this error whenever I try to debug a C++ code in atom.

Anyone have any idea of why it happens?

Thanks


#2

What package are you using for debugging?


#3

I am using MinGW…? I don’t get what you mean


#4

And I debug using atom…


#5

Atom has no ability to understand code. You have to use a package that knows how to access an external debugging program. In order for someone to help you, it’s important for you to provide information about everything you have done to configure Atom so that it meets your needs, particularly which packages you’ve installed.


#6

I’ve used the gpp configuration package


#7

I’ve searched the package directory and I haven’t found any package called gpp-configuration.


#8

Sorry mate, the package that I installed is called gpp compiler


#9

First try to save the file as .cpp
Go to File > Save as… and save the file. For example first-try.cpp
Then try to compile it, that should fix the problem.


#10

No, sorry mate, it does not work…


#11

Without much more information, we probably can’t help more, because we don’t know what’s going on with your computer. You have to be proactive in describing your environment. Think about everything you’ve done and everything you’re trying to do. Think about taking screenshots of the file itself. Can you do anything to help us better understand what’s going on without being able to see your machine?


#12

I really do apologise for this, I am going to send you screenshots whenever I am going to have the possibility.


#13

Thank you. Literally anything you can think of to tell or show us would be helpful.