LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
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 06-27-2013, 11:08 PM   #1
jayadhanesh
Member
 
Registered: Feb 2009
Location: Bangalore
Posts: 61

Rep: Reputation: 15
File format not recognised


Hi,

I am trying to build a binary. When I add the src directory in a tree and build it from top of the tree I get the eror saying xxx.so: file not recognised, File format not recognised. But when I go to the folder and build it , it works fine. Any idea what the issue could be?

Thanks,
Dhanesh.
 
Old 06-28-2013, 06:42 AM   #2
adelabarra
Member
 
Registered: May 2008
Location: Argentina
Distribution: Debian, Slackware
Posts: 49

Rep: Reputation: 3
Quote:
Originally Posted by jayadhanesh View Post
But when I go to the folder and build it , it works fine.
I thought it was the right way to do it.

1) Make a directory and put all the sources there.
2) Enter the directory.
3) Create a Makefile.
4) make
5) (sudo) make install

Then you create an executable. You don't execute xxx.so files.
You link them.

Correct me if I'm not right.
I'm a newbie too.

Regards.

Alejandro.

Last edited by adelabarra; 06-28-2013 at 06:43 AM. Reason: Typo
 
Old 06-28-2013, 06:46 AM   #3
Snark1994
Senior Member
 
Registered: Sep 2010
Location: Wales, UK
Distribution: Arch
Posts: 1,632
Blog Entries: 3

Rep: Reputation: 346Reputation: 346Reputation: 346Reputation: 346
Quote:
Originally Posted by jayadhanesh View Post
I am trying to build a binary. When I add the src directory in a tree and build it from top of the tree I get the eror saying xxx.so: file not recognised, File format not recognised. But when I go to the folder and build it , it works fine. Any idea what the issue could be?
You haven't given us much to go on. Is this your own code, or a project you've downloaded? If one you've downloaded, what is it?

How are you compiling? Ideally, can you compile from command-line, and copy-and-paste the exact command you used, along with the output it gave, back into this thread? It will then be far easier to help work out what's going wrong.

Best wishes,
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
.pem file format to .key format raj47 Linux - Newbie 1 04-14-2012 03:04 AM
ELF Format Weaknesses? Ideas for a new file format? coreybrenner Programming 2 02-12-2011 06:18 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
not in executable format: File format not recognized ypy13 Linux - Newbie 9 07-09-2008 11:33 PM
Gxine - No demuxer found - stream format not recognised. jonbvgood Linux - Software 2 09-23-2007 01:22 PM

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

All times are GMT -5. The time now is 06:59 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration