LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 09-26-2005, 08:48 PM   #1
EnigmaX
Member
 
Registered: Jul 2003
Distribution: Fedora Core 4
Posts: 107

Rep: Reputation: 15
Strange C++ linking issue >.>


I need to link to OpenAL, but for some reason it isn't letting me. I know I have openal, since the file exists, however.. the linker cannot find it >.>

Error from the Error Log:
configure:2077: checking for C++ compiler default output file name
configure:2080: g++ -g -L/usr/X11R6/lib -lGL -lGLU -lXxf86vm -L/usr/lib -lopenal conftest.cc >&5
/usr/bin/ld: cannot find -lopenal
collect2: ld returned 1 exit status

Proof of file existance:
[ketzu@localhost lucid_production]$ ls /usr/lib | grep openal
libopenal.so.0
libopenal.so.0.0.6

Any ideas? :/
 
Old 09-26-2005, 09:41 PM   #2
kjordan
Member
 
Registered: Jul 2004
Distribution: LFS, I felt the itch and scratched it
Posts: 227

Rep: Reputation: 31
Do:
ln -s libopenal.so.0 /usr/lib/libopenal.so
since it looks for a .so file of that name. The others are just for more specific versioning.
 
Old 09-26-2005, 11:32 PM   #3
kapil_dev
LQ Newbie
 
Registered: Sep 2005
Posts: 11

Rep: Reputation: 0
Hi,
I was tryign to install svgalib for using graphics in C. Tried to install svgalib. though i followed the instructions for installation correctly to my knowledge, i am getting the following error when i tried to compile a program.


Code:
gcc sample.c -o sample -lvga.c
gives me the following error

/usr/bin/ld: cannot find -lvga
collect2: ld returned 1 exit status


All the header files were installed in /usr/local/includel
so used
Code:
ln /usr/include/vga* -> /usr/local/include/vga*
since i was trying to link vga.h. but still it did not work
I have used previous gcc -lm to include math.h.


Is this similar to the above case?
 
Old 09-27-2005, 10:58 PM   #4
kapil_dev
LQ Newbie
 
Registered: Sep 2005
Posts: 11

Rep: Reputation: 0
Question

Hey guys,
dont anyone have an idea regarding the above problem. I am waiting for some suggestions!!!!!!!!!!!!!!!!
 
Old 09-27-2005, 11:30 PM   #5
kjordan
Member
 
Registered: Jul 2004
Distribution: LFS, I felt the itch and scratched it
Posts: 227

Rep: Reputation: 31
Did you really put the .c on -lvga? If so that's probably the problem. Also, is the lib in /usr/local/lib? If so, put -L/usr/local/lib in the compile line.

Last edited by kjordan; 09-27-2005 at 11:31 PM.
 
Old 09-28-2005, 12:55 AM   #6
kapil_dev
LQ Newbie
 
Registered: Sep 2005
Posts: 11

Rep: Reputation: 0
Quote:
Originally posted by kjordan
Did you really put the .c on -lvga? If so that's probably the problem. Also, is the lib in /usr/local/lib? If so, put -L/usr/local/lib in the compile line.
My apologies. i did not put the .c on -lvga
also if i use -L/usr/local/lib then should i still use -lvga??
 
Old 09-28-2005, 01:03 AM   #7
kapil_dev
LQ Newbie
 
Registered: Sep 2005
Posts: 11

Rep: Reputation: 0
also, NO, the lib doesnt seem to be in /usr/local/lib. i did not find them anywhere. however the header files (vga*.h) got into the folder /usr/local/include when i installed svgalib.
 
Old 09-28-2005, 07:11 AM   #8
kjordan
Member
 
Registered: Jul 2004
Distribution: LFS, I felt the itch and scratched it
Posts: 227

Rep: Reputation: 31
Quote:
Originally posted by kapil_dev
also, NO, the lib doesnt seem to be in /usr/local/lib. i did not find them anywhere. however the header files (vga*.h) got into the folder /usr/local/include when i installed svgalib.
Sounds like the compilation failed at some point then.
 
  


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
strange FTP issue tanmaya Linux - Networking 2 05-23-2005 08:15 AM
Strange IPTABLES issue TheLinuxDuck Linux - Security 5 04-27-2005 08:44 AM
strange c issue exvor Programming 8 01-29-2005 03:23 PM
Strange firefox issue. WhiteChedda Linux - Software 4 11-09-2004 09:07 PM
help me on a strange issue. newpenguin Linux - General 11 10-06-2002 04:42 PM


All times are GMT -5. The time now is 05:26 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration