LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 07-03-2009, 07:04 AM   #1
niteshg
LQ Newbie
 
Registered: Nov 2004
Location: NJ
Posts: 29

Rep: Reputation: 15
ld: cannot find -lm while cross-compiling


Hello
I installed simplescalar on a fedora core 9 running on VMWARE.

In the manual to cross compile a code its given to use the following options :
sslittle-na-sstrix-gcc -O -o test test.c -lm

I am trying to compile a simple code test.c but I get the follwing warning.
/SIMPLESCALAR/sslittle-na-sstrix/bin/ld : cannot find -lm.


If I add math.h in my program then I get a list of parse errors like :
parse error before 'double'.....


Thanks,
D
 
Old 07-03-2009, 10:27 AM   #2
veerain
Senior Member
 
Registered: Mar 2005
Location: Earth bound to Helios
Distribution: Custom
Posts: 2,524

Rep: Reputation: 319Reputation: 319Reputation: 319Reputation: 319
Try puuting -lm as the first option instead of putting it last as you have done.
 
Old 07-03-2009, 12:48 PM   #3
niteshg
LQ Newbie
 
Registered: Nov 2004
Location: NJ
Posts: 29

Original Poster
Rep: Reputation: 15
I tried it. It doesnt help.
 
  


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
Cross compiling Mike Davies Linux - Kernel 5 02-23-2018 11:30 AM
Bluez 3.36 cross compiling + cannot find library kewl Linux - Software 1 06-17-2009 12:47 PM
Cross-compiling v/s cross-building kushalkoolwal Programming 3 05-13-2009 05:49 AM
Cross Compiling help -can't find files laclac01 Linux - Software 0 11-17-2004 06:26 AM
cross compiling with g++ hornofsalvation Linux - Newbie 2 10-09-2004 10:29 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:24 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