LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-20-2015, 09:46 AM   #1
wowy
Member
 
Registered: Mar 2015
Location: France
Distribution: Ubuntu 14.04
Posts: 61

Rep: Reputation: Disabled
.o: file not recognized: File format not recognized when compiling


Hello,

I am working on a board (sbc6000x with at91sam9261 micro, linux 2.6.24 to be precise) and having some fun making script i wanted to make real application.
The board is coming with a cross compilation toolchain. When trying to make a simple "hello world" executable to print on the terminal there is no problem.
I open my terminal, give the path of the compiler, cd into the folder where my .c file is and then i type :
Code:
arm-linux-gcc -o hello hello.c
Which create my executable "hello" and this one is working. But like i said, this program only played with the terminal.

The board is starting with a script calling another executable which use the lcd display, i have the source of this executable. My idea was to look at what was in the source of this application (lots of folders and files) in order to understand how it was working. I wanted to test the toolchain on the source (with the makefile) to see if i was able to generate an executable from a application with folderS/fileS but when i try to "make" it i have this error.

In my understanding this is an object file but aside from that i don't see why it would not works.

Thank you for your future answers !
 
Old 03-20-2015, 12:21 PM   #2
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,882
Blog Entries: 13

Rep: Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930
Good description where you show your compiler tools are working correctly, however without further information on the Makefile itself as well as more of the output containing the error makes it difficult to assist. Can you post the Makefile as an attachment, and prepare a log of the make attempt by using make -d to enable detailed debug for the attempt, and then post the log of that make attempt?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Makefile: file not recognized:File format not recognized collect2: ld returned 1 exit Bringo Linux - Software 9 12-20-2010 04:08 AM
[SOLVED] can't debug with gdb: not in executable format: File format not recognized (squeeze) oddiofile Debian 1 08-24-2010 03:21 AM
Compiler error : /usr/lib/libc.so: file not recognized: File format not recognized kreena Solaris / OpenSolaris 7 12-14-2009 02:51 AM
/usr/lib/libgd.so: file not recognized: File format not recognized kimjao Linux - Software 2 07-24-2009 11:46 AM
File Format not recognized eachow Linux - Hardware 2 07-10-2006 03:52 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:25 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration