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 02-21-2007, 10:08 AM   #1
philipina
Member
 
Registered: May 2003
Posts: 77

Rep: Reputation: 15
How to install correctly an .so file to be able to compile?


Hello,
I would like to compile a very small C application with KDevelop under Suse10.
This application needs a shared library name FlxDriver.so.2.3
I added this file in automake manager "-I/myFolder/FlxDriver"
For what I saw in this forum this is the correct way to add a library in a project.
The problem is that I cannot compile, it seems the the compiler cannot find this library because I have a lot of warning messages.
I'm newbie with Linux and I'm wondering if I just have to copy the library to get it installed of if I have to do other manipulations.

Thanks in advance for you help.

Alain.
 
Old 02-21-2007, 10:46 AM   #2
philipina
Member
 
Registered: May 2003
Posts: 77

Original Poster
Rep: Reputation: 15
Here are some more details about the error generated by KDeveloper:
---------------------
gmake[2]: *** No rule to make target `FlxDriver', needed by `pointtest00'.
gmake[2]: Target `all' not remade because of errors.
Entering directory /root/pointtest00/debug
Leaving directory /root/pointtest00/debug
Leaving directory /root/pointtest00/debug
gmake[1]: *** [all-recursive] Error 1
gmake: *** [all] Error 2
*** Exited with status: 2 ***
--------------------

Just let me know if you need more info...

Alain
 
Old 02-21-2007, 10:49 AM   #3
weibullguy
ReliaFree Maintainer
 
Registered: Aug 2004
Location: Kalamazoo, Michigan
Distribution: Slackware-current, Cross Linux from Scratch, Gentoo
Posts: 2,812
Blog Entries: 1

Rep: Reputation: 259Reputation: 259Reputation: 259
-I/foo/bar adds directory /foo/bar to the list of directories that are searched for included files (commonly header files). To add the library libfoobar.so that is installed in the /foo/bar directory, you need -L/foo/bar -lfoobar.

Warning messages are just that, warning messages. Error messages are the 'bad' ones. Perhaps if you posted the output of make, we could provide more help. Usually the last 20 lines of output is enough, less than that usually isn't very helpful.

Last edited by weibullguy; 02-21-2007 at 10:50 AM.
 
Old 02-22-2007, 02:21 AM   #4
philipina
Member
 
Registered: May 2003
Posts: 77

Original Poster
Rep: Reputation: 15
Hello,
Thank you for your reply.
I added flags -L/myFolder -IFlexDriver in menu Project -> Project Options -> tab Configure Options -> C -> Compiler Flags (CFLAGS) and clicked to button OK.
After this, Kdevelop checked if all components needed where present and the result was a success.
----------
.
.
.
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing depfiles commands
*** Success ***
--------------------

But after this if I try to compile I still get the same error.
This time I post the full log
---------------------------
cd '/root/pointtest00/debug' && WANT_AUTOCONF_2_5="1" WANT_AUTOMAKE_1_6="1" gmake -k
gmake all-recursive
Entering directory /root/pointtest00/debug
Making all in src
Entering directory /root/pointtest00/debug/src
gmake[2]: Warning: File `.deps/pointtest00.Po' has modification time 1.7e+06 s in the future
cd .. && /bin/sh ./config.status src/Makefile depfiles
config.status: creating src/Makefile
config.status: executing depfiles commands
Leaving directory /root/pointtest00/debug/src
Entering directory /root/pointtest00/debug/src
gmake[2]: Warning: File `.deps/pointtest00.Po' has modification time 1.7e+06 s in the future
cd .. && /bin/sh ./config.status src/Makefile depfiles
config.status: creating src/Makefile
config.status: executing depfiles commands
Leaving directory /root/pointtest00/debug/src
gmake[2]: *** No rule to make target `FlexDriver', needed by `pointtest00'.
gmake[2]: Target `all' not remade because of errors.
gmake[2]: warning: Clock skew detected. Your build may be incomplete.
Entering directory /root/pointtest00/debug
Leaving directory /root/pointtest00/debug
gmake[1]: *** [all-recursive] Error 1
Leaving directory /root/pointtest00/debug
gmake: *** [all] Error 2
*** Exited with status: 2 ***
---------------------------

Thanks in advance for your help.

Alain.
 
Old 02-22-2007, 03:24 AM   #5
philipina
Member
 
Registered: May 2003
Posts: 77

Original Poster
Rep: Reputation: 15
Hi again,

My project was just a mess and I decided to recreate it to start properly.
Now the error is different
------------------------------
cd '/root/pointtest01/debug' && WANT_AUTOCONF_2_5="1" WANT_AUTOMAKE_1_6="1" gmake -k
gmake all-recursive
Entering directory /root/pointtest01/debug
Making all in src
Entering directory /root/pointtest01/debug/src
linking pointtest01 (libtool)
linking pointtest01 (gcc)
/usr/lib/gcc/i586-suse-linux/4.0.2/../../../../i586-suse-linux/bin/ld: cannot find -lFlexDriver
collect2: ld returned 1 exit status
gmake[2]: *** [pointtest01] Error 1
gmake[2]: Target `all' not remade because of errors.
Leaving directory /root/pointtest01/debug/src
Entering directory /root/pointtest01/debug
Leaving directory /root/pointtest01/debug
gmake[1]: *** [all-recursive] Error 1
Leaving directory /root/pointtest01/debug
gmake: *** [all] Error 2
*** Exited with status: 2 ***
----------------------------------------

Any idea?

Maybe a stupid question but : Is there any link to do somewhere between the name FlexDriver and the file FlexDriver.so or is it done automatically by checking the file name?

Alain
 
  


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
File Error And Using Root Correctly jothi_bass2000 Linux - Newbie 41 12-07-2006 01:17 AM
Why aint it reading file correctly? twirl Programming 11 09-13-2005 04:30 PM
HELP!!! Binutils won't compile correctly microsoft/linux Linux From Scratch 6 07-12-2005 01:11 PM
iso file wont burn correctly der_auslander Linux - Newbie 1 09-09-2004 03:44 PM
iso file wont burn correctly confused Linux - Newbie 6 09-29-2002 09:42 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

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