Execution problem with Libtool Versioning control


 
Thread Tools Search this Thread
Top Forums Programming Execution problem with Libtool Versioning control
# 1  
Old 04-10-2013
Execution problem with Libtool Versioning control

Hi,

Is anybody familiar with libtool could explain me the following issue.?

I've created a small factorial program(fact_impl.c, fact_appln.c & fact.h) in order to know about this libtool.

>>> fact.h

#include<stdio.h>
#include<math.h>

extern unsigned int fact_num(unsigned int num);


>>> fact_impl.c

#include "fact.h"
unsigned int fact_num(unsigned int input)
{
if(input==1)
{
printf("------Facttial----------\n");
return 1;
}
else
return(input * fact_num(input-1));
}

>>> fact_appln.c

#include "fact.h"
int main()
{
unsigned int input;
printf("\n------------------------------------------\n");
printf("Enter the Number : ");
scanf("%u", &input);
printf("Factorial is : %u\n", fact_num(input));
printf("------------------------------------------\n");
return 0;
}


These are the steps which followed to create the executables:

$libtool --mode=compile gcc -g -O -c fact_impl.c
$libtool --mode=compile gcc -g -O -c fact_appln.c
> *.lo will be created.

libtool --mode=link gcc -version-info 1:0:0 -o libfact.la -rpath /home/paramesh/libtool fact_impl.lo

> *.la will be created.

libtool --mode=link gcc -g -O -o fact fact_impl.o fact_appln.o libfact.la

> exe will be created.





Now, my ques is I include some changes to the library and compile fact_impl.c with lots of versions like, 2.0.0 & 3.0.0 & 4.0.0. Then how to make the application query to get a specific version (i.e) when I'm using the latest version 4.0.0, I'm in need to switch to 2.0.0, In tat case how to link the application to the version 2.0.0.?



Thanks in Advance.!!

Last edited by Parameswaran; 04-10-2013 at 04:11 AM.. Reason: Wrong posts for the commands to create *.la & *.exe
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. Solaris

T3-2 Remote control Problem

Hi Peeps, Wondering if anyone can help me, trying to launch the remote console on a T3-2. When I select use serial redirection it comes up with a dialogue box that says. "The remote console application requires java 5.0. Please Download java from http://www.java.com" "Do you wish to... (1 Reply)
Discussion started by: callmebob
1 Replies

2. UNIX for Dummies Questions & Answers

Trying to install libtool from source - newbie

Hey all, I am trying to configure software (Open Cascade) and I am receiving the following error: configure.ac:24: warning: macro `AM_PROG_LIBTOOL' not found in library I know I must be missing libtool, however, when I try and grab libtool (a lot of sites have the proper tarball and... (2 Replies)
Discussion started by: bphqk3
2 Replies

3. UNIX for Dummies Questions & Answers

Creating fat files: Lipo vs libtool

I wonder what would be the difference when using: lipo -create i386/libAwesome.a armv7/libAwesome.a -o fat/libAwesome.a and libtool -static i386/libAwesome.a armv7/libAwesome.a -o fat/libAwesome.a I have the impression that lipo is more general, and it will simply stick two files from... (0 Replies)
Discussion started by: nacho4d
0 Replies

4. Programming

Question re: remember to run `libtool --finish ...`

Hi. I port/package software for AIX and often get this message during "make install" libtool: install: warning: remember to run `libtool --finish /some/directory` I have run the command manually, and not run it. I am unable to see what difference it is making. Questions: What is the... (1 Reply)
Discussion started by: MichaelFelt
1 Replies

5. UNIX for Dummies Questions & Answers

Execution problem

How to search a pattern from multiple files... i used the command suppose the pattern name is xxx grep xxx (file1-o- file2-o- file3) Thanks in advance (4 Replies)
Discussion started by: ksakil
4 Replies

6. Shell Programming and Scripting

how to continue shell script execution process without control going to pompt?

Hi Friends, Iam invoking another shell script to create B2k_session_id from my shell script.It is properly creating B2k_session_id and after creation control is coming out from the script and going to command prompt.The lines which are after the exectrusteduser.com sh.com are not executing..may... (5 Replies)
Discussion started by: vadlamudy
5 Replies

7. UNIX for Dummies Questions & Answers

Rapache, libtool, and Make on Solaris 10

I'd like to first off state that this is my second day using Solaris, so go easy on me. I am trying to install rapache on a Solaris 10 server, and I am running into some frustrating roadblocks. When running configure, I see that it creates its own libtool and sets the tag (according to the... (0 Replies)
Discussion started by: gadonj18
0 Replies

8. Programming

Shared library versioning problem at runtime

My executable was linked under RedHat using the LessTif GUI shared library. When I try to run it under UBUNTU, I get an error message that the LessTif library cannot be found. The LessTif library is there, but it is a newer VERSION. My executable is looking for the older version it was linked with.... (1 Reply)
Discussion started by: imagtek
1 Replies
Login or Register to Ask a Question