Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > run a C program independently without requiring to install an external library

Reply
Thread Tools

run a C program independently without requiring to install an external library

 
 
tekmicha
Guest
Posts: n/a
 
      03-24-2006
Hallo,
I am a newbie in C and I have a question regarding C libraries.
I got an application in C and I am trying to add some new features on
it for my work. The problem is this application requires the
installation of an external Library A (not a C standard library). After
some time I managed to install the external libraries using the
makefiles and running the application (a makefile was also included)
My question is , is there anyway to run my application independently
without the need to install the external library, by just copying the
source and the header files (they are just four files), I mean do I
need the .so files as well??
If yes what is the best way to do and what changes do I have propably
to do to keep minimal changes on the application?
Sorry for my naive question.

 
Reply With Quote
 
 
 
 
Vladimir S. Oka
Guest
Posts: n/a
 
      03-24-2006

tekmicha wrote:
> Hallo,
> I am a newbie in C and I have a question regarding C libraries.
> I got an application in C and I am trying to add some new features on
> it for my work. The problem is this application requires the
> installation of an external Library A (not a C standard library). After
> some time I managed to install the external libraries using the
> makefiles and running the application (a makefile was also included)
> My question is , is there anyway to run my application independently
> without the need to install the external library, by just copying the
> source and the header files (they are just four files), I mean do I
> need the .so files as well??
> If yes what is the best way to do and what changes do I have propably
> to do to keep minimal changes on the application?
> Sorry for my naive question.


Not really a C question, but from what you say I can't see that you can
avoid installing this "external" library. It most likely contains some
functions/data used by your program. The only other option, IMHO, would
be to write your own replacement.

In any case, you may also want to ask this in some Linux group (you
mention `.so`).

--
BR, Vladimir

 
Reply With Quote
 
 
 
 
lostpencil
Guest
Posts: n/a
 
      03-24-2006

tekmicha wrote:
> Hallo,
> I am a newbie in C and I have a question regarding C libraries.
> I got an application in C and I am trying to add some new features on
> it for my work. The problem is this application requires the
> installation of an external Library A (not a C standard library). After
> some time I managed to install the external libraries using the
> makefiles and running the application (a makefile was also included)
> My question is , is there anyway to run my application independently
> without the need to install the external library, by just copying the
> source and the header files (they are just four files), I mean do I
> need the .so files as well??
> If yes what is the best way to do and what changes do I have propably
> to do to keep minimal changes on the application?
> Sorry for my naive question.


Maybe you could asked the writer of the libraries send the only code
you needed to you.

 
Reply With Quote
 
tekmicha
Guest
Posts: n/a
 
      03-24-2006
Well sorry , I didnt want to post a specific OS question , I admit I
was a newbie in posting in this group as well. I mailed him . I have
all the source codes and the header files of the library , so my naive
thought was may be to just include these header files on the include
directory and correct the problems but propably I have still to rebuild
again the libraries so I will not get out of it. I am just trying to
copy al the files including the libraries to the application and
changing may be the path into a local application directory , so that
I will not have to install this messy library on each machine of the
network.
Thanks anyway

 
Reply With Quote
 
Vladimir S. Oka
Guest
Posts: n/a
 
      03-24-2006

tekmicha wrote:
> Well sorry , I didnt want to post a specific OS question , I admit I
> was a newbie in posting in this group as well. I mailed him . I have
> all the source codes and the header files of the library , so my naive
> thought was may be to just include these header files on the include
> directory and correct the problems but propably I have still to rebuild
> again the libraries so I will not get out of it. I am just trying to
> copy al the files including the libraries to the application and
> changing may be the path into a local application directory , so that
> I will not have to install this messy library on each machine of the
> network.
> Thanks anyway


If you don't quote any context nobody knows what you're on about. Read:

<http://cfaj.freeshell.org/google/>

before posting again.

Assuming "him" was me (even if you did quote context, refering to
someone in third person is bad manners, at least where I come from),
mailing is not what you'd normally do (even disregarding the fact that
most people do not leave real e-mail addresses). I'll have a look at
your e-mail some time, and post whatever's relevant, if anything.

--
BR, Vladimir

 
Reply With Quote
 
Mark McIntyre
Guest
Posts: n/a
 
      03-24-2006
On 24 Mar 2006 06:29:44 -0800, in comp.lang.c , "tekmicha"
<(E-Mail Removed)> wrote:

>. I have
>all the source codes and the header files of the library , so my naive
>thought was may be to just include these header files on the include
>directory and correct the problems


If you have the LIBRARY sources too, then you can avoid using the
library - just include the sources in your compile/link process.
Mark McIntyre
--
"Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it."
--Brian Kernighan
 
Reply With Quote
 
David Resnick
Guest
Posts: n/a
 
      03-24-2006
tekmicha wrote:
> Well sorry , I didnt want to post a specific OS question , I admit I
> was a newbie in posting in this group as well. I mailed him . I have
> all the source codes and the header files of the library , so my naive
> thought was may be to just include these header files on the include
> directory and correct the problems but propably I have still to rebuild
> again the libraries so I will not get out of it. I am just trying to
> copy al the files including the libraries to the application and
> changing may be the path into a local application directory , so that
> I will not have to install this messy library on each machine of the
> network.
> Thanks anyway


<OT>You may be able to trivially build the library as an archive (.a)
rather than a shared object (.so) and statically rather than
dynamically link it to your app. That may be the answer to
your problems as you won't have to then install the library
separately from your app. Not always the right choice,
but... If you have questions about it, asking in
comp.unix.programmer is the right place, not here.
Followups set there.
</OT>

-David

 
Reply With Quote
 
 
 
Reply

Thread Tools

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to log independently of other webapps using log4j? Also, reading from log file from within servlet? unomystEz Java 0 11-19-2006 10:42 AM
Do multiple webparts act independently with Atlas? needin4mation@gmail.com ASP .Net 0 08-30-2006 04:50 PM
stack trace not working independently? saju.prabhakaran@gmail.com C++ 6 04-12-2006 05:50 PM
open file in dir independently of operating system Joerg Schuster Python 5 05-25-2005 12:10 PM
Modify two parts of a page independently trysendingspam@yahoo.ca XML 0 05-22-2005 04:11 PM



Advertisments