LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 02-28-2008, 04:58 AM   #1
windhair
LQ Newbie
 
Registered: Oct 2005
Posts: 16

Rep: Reputation: 0
Question Newbie question, about lib during compiling.


Hi, all

a newbie question ask for solution.

I want to compile some code. During link, i got the error message as:
/usr/bin/ld: /usr/lib/gcc-lib/i586-suse-linux/3.3.1/crtbeginS.o: No such file: No such file or directory

I can not find crtbeginS.o in that directory, but I find the same on the other version located at

/usr/lib/gcc/i586-suse-linux/2.95.3/crtbeginS.o
/usr/lib/gcc/i586-suse-linux/4.1.2/crtbeginS.o

is it possible to force gcc link to /usr/lib/gcc/i586-suse-linux/4.1.2/crtbeginS.o during linking?

how to do that?

THX
 
Old 02-28-2008, 08:49 AM   #2
jgombos
Member
 
Registered: Jul 2003
Posts: 256

Rep: Reputation: 32
I believe you just need to pass a switch to gcc, which will then be passed on to the linker for you. Try adding this:

-l/usr/lib/gcc/i586-suse-linux/4.1.2/

to your gcc commandline.
 
Old 02-28-2008, 10:34 AM   #3
ta0kira
Senior Member
 
Registered: Sep 2004
Distribution: FreeBSD 9.1, Kubuntu 12.10
Posts: 3,078

Rep: Reputation: Disabled
Are you compiling something other than straight C? If it's C++ then try linking using g++.
ta0kira
 
Old 03-05-2008, 11:10 AM   #4
windhair
LQ Newbie
 
Registered: Oct 2005
Posts: 16

Original Poster
Rep: Reputation: 0
Actually, I want to compile a FORTRAN 90 code with Dislin, using pgf90, where I met such problem. So I tried another example by c, and it gave such error message. It doesnt work when I use -l/usr/lib/gcc/i586-suse-linux/4.1.2/.

BTW, I'm not the administrator of this machine, so I prefer the method for a general user.

ThX
 
Old 03-05-2008, 11:29 AM   #5
ta0kira
Senior Member
 
Registered: Sep 2004
Distribution: FreeBSD 9.1, Kubuntu 12.10
Posts: 3,078

Rep: Reputation: Disabled
What command line(s) do you use for compilation and linking?
ta0kira
 
  


Reply

Tags
compile, gcc, linux


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
Newbie question about compiling simen Linux - Software 2 03-31-2006 01:20 AM
newbie c++ compiling class question true_atlantis Programming 4 02-20-2004 08:34 PM
some question asked by a newbie compiling KDE3.2 tony yu Mandriva 2 02-15-2004 08:43 PM
newbie compiling and versions question glo Programming 3 07-30-2003 10:54 AM


All times are GMT -5. The time now is 06:27 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration