LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   How to install correctly an .so file to be able to compile? (https://www.linuxquestions.org/questions/programming-9/how-to-install-correctly-an-so-file-to-be-able-to-compile-531025/)

philipina 02-21-2007 09:08 AM

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.

philipina 02-21-2007 09:46 AM

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

weibullguy 02-21-2007 09:49 AM

-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.

philipina 02-22-2007 01:21 AM

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.

philipina 02-22-2007 02:24 AM

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


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