Programming :: Convert A Dynamic Library (filename.so) To A Static Library (filename.a)?

Nov 18, 2009

How can we convert a dynamic library (filename.so) to a static library (filename.a) using gnu gcc . Can we get a static library form a dynamic library . I saw a few post in which the conversion form a static library to a dynamic library is mentioned but, unfortunately, not the other way.

View 4 Replies


ADVERTISEMENT

Programming :: SDL Static Library - Shared Library ?

Apr 7, 2009

I'm reading about shared, static, and dynamic libraries. What is SDL? Is it static, shared, or dynamic?

I always thought a library would be a lot of .h and .cpp files compiled separately into .o files and then if you compiled your own program you could use the -l parameter to link the library and it was all compiled together. Now I'm not so sure.

I don't even see any SDL .cpp files in my system anywhere. All I have are lots of SDL .h files in /usr/include/SDL and I don't really understand the code in them.

I'm making a wild guess here: SDL is a shared library. SDL itself is NOT compiled into my program, therefore SDL must be on any system my program tries to run on. When I compile and link SDL all it needs is the header files to know what SDL function and objects it can use. And then on every system it uses an already compiled SDL shared library thingy somewhere.

So... where is that part of SDL? All I can find are header files.

I'm thinking the advantage of shared libraries is that someone could say update SDL on their own system and take advantage of the new features without having to download new executables with the new version of SDL compiled into them for every program that uses SDL.

So if I'm making an editor and a game engine and they both use a lot of the same .cpp and .h files that I wrote and I'm tired of updating one and then the other and I need to turn them into a library, then a shared library might be kind of a silly solution. I could just make a static library. Right? Because it's not SDL. Nobody else is ever going to use this library.

View 6 Replies View Related

Programming :: Add A Static Library To Own Static Library?

Mar 31, 2010

To create a static library, or to add additional objectiles to an existing static library, I can use a command like this:ar rcs my_library.a file1.o file2.oBut how to add an existing static library to my own static library. I have created my own static library using the command above and want to link against the library libuuid.a (placed in /usr/lib/).

View 6 Replies View Related

General :: Set A Pattern That Will Output A Filename Equal To The Original Filename In SoundConverter?

Jan 23, 2011

$ uname -a
Linux a 2.6.35.10-74.fc14.i686.PAE #1 SMP Thu Dec 23 16:10:47 UTC 2010 i686 i686 i386 GNU/Linux
$ lsb_release -a
LSB Version: :core-4.0-ia32:core-4.0-noarch

[Code].....

How can I set a pattern that will output a filename equal to the original filename? E.g.

something.mp3 → something.ogg

And why isn't this implemented in SoundConverter?

PS: {Filename} doesn't work.

View 1 Replies View Related

Programming :: Why The Thread Stack Size Cannot Be Changed When Calling In A Dynamic Library

Jan 5, 2011

Why the thread stack size can not be changed after calling pthread_attr_setstacksize & pthread_create in a dynamic library? Detail: I write a file thread_factory.c and plan to build it and produce a dynamic library (libthread_factory.so) In the thread_factory.c , there is a routine

[Code]....

And after this, there is application, it will call fct_thread_create(STACK_SIZE_256KB), and then call pthread_attr_getstacksize(), but the stack size return always be a fixed value 0xa01000. (I tried this on Fedora12) But if I build the application source code with the file thread_factory.c directly, the stack size return is right as my expect. I checked the source code of glibc about the routine pthread_create() as below:

[Code]....

View 7 Replies View Related

Programming :: Default Library - Static Or Shared?

Aug 27, 2009

My code needs to link to some libraries. In my project file, I specify linker to link to abc library, for example. By default, does gcc link to libabc.a or libabc.so ? What if I really need to specify static or shared, how do I do that?

View 4 Replies View Related

Programming :: Addition Of A Static Library(libtimer.a) In Makefile?

Feb 10, 2010

The following is my Makefile, I wanted to add a staic library named libtimer.a. I'm using the following Makefile. Please let me know how to add this static library:

Makefile:-

Quote:

all:gcc -Wall -lrt -lm -pthread usbserialapp.c usbserialinit.c environ.c -o usbserial

It produces "usbserial" executable.

View 4 Replies View Related

Programming :: Compile Static Libcurl Library Under Windows ?

Jun 3, 2009

I have been working on this for a long time.

I could get the static libcurl library ( a "libcurl.lib" file and a "curl.h" file), which supposed to be working under Windows.

Yet I tried Visual c++ 6.0 but it wasn't working at all.

Some idea on that ? I don't mind to try MinGW and Dev C++ if it will really work. (Cygwin is not good since it require client to have cygwin.dll in run-time folder).

View 1 Replies View Related

General :: Shell - What's The Difference Between Filename And ./filename

Apr 23, 2010

What is the difference between filename and ./filename? Under what circumstances is one preferred to the other?

View 5 Replies View Related

Server :: Split A Filename Into Its Filename And Extension?

Apr 6, 2010

I need to split a filename into its filename and extension, so I can append a datestamp to the filename. I'm using bash.

View 8 Replies View Related

CentOS 5 Hardware :: How To Compile Filename.c Into Filename.o

Nov 20, 2009

I've installed ethernet adapter, it is made in china from a manufacturer called FOX. The driver for that adapter is supported for sco linux kernel version 2.4.x and 2.5.x .However, I'm using Centos5 but the OS didn't recognize the adapter alone, so I'm trying to follo instructions on the driver on the attached CD.

The CD contains file named "SC92031.c", the instructions tell me to do the following "Compile the driver source files and it will generate sc92031.o"

View 8 Replies View Related

Software :: Difference Between <filename>.rpm And <filename>.src.rpm?

Nov 22, 2010

what is the difference between <filename>.rpm and <filename>.src.rpm?

View 2 Replies View Related

Software :: Unable To Load Dynamic Library

Nov 22, 2010

I have installed oci8 from the remi repo and can not get it to work.I have been trying all day but still end up with the same error in my apache error log when I start httpd.If anyone can suggest something more I can try or where I should look next that would be nice.In the mean time I am going to build a VM and try from a fresh install and see what happens.

View 1 Replies View Related

Programming :: 'nm' Lists All Symbols - Including Static Library Symbols?

Apr 5, 2010

By issuing the 'nm' command on shared library (internally using one static library), the functions exposed by static library is also being listed, Which allows to use internal functions which is of course not intended. I have one static library having A(), B() and C() functions. Creating one shared library which has function XYS() that is using A() and B() functions from Static library. While doing 'nm' on shared library, all the static library function are being listed.

Static Lib:

#include<stdio.h>
void A(char *msg)
{
printf("

[code]....

View 4 Replies View Related

Ubuntu :: PHP Startup: Unable To Load Dynamic Library

Jul 23, 2011

I keep getting mails with this warning on my 11.04 server

Code: PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20090626/mysql.so' - /usr/lib/php5/20090626/mysql.so: cannot open shared object file: No such file or directory in Unknown on line 0

apparently everything is working as it should and I don't know how to get rid of this warning

View 1 Replies View Related

CentOS 5 :: PHP Startup - Unable To Load Dynamic Library

Mar 4, 2011

I recently upgraded to php 5.2 using the testing repository. All went well except for one extension.

root@clibweb2 ~]# php -v
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules//usr/lib64/php/modules/http.so' - /usr/lib64/php/modules//usr/lib64/php/modules/http.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP 5.2.10 (cli) (built: Nov 13 2009 11:44:05)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies
[root@clibweb2 ~]#

I tried:
[root@clibweb2 ~]# ln -s /usr/lib64/php /usr/lib/php
Adding the complete path to php.ini
And using PECL
I still get the error.
Output of
getinfo.sh (general) is at [URL]
The Package specific is at [URL]

View 1 Replies View Related

Fedora :: PHP Startup : Unable To Load Dynamic Library / Sort It?

Dec 30, 2009

I have a new VPS running.But PHP doesn't work well. The error message I get from /var/log/http/error.log is code...

View 5 Replies View Related

Fedora :: FC 14 And PHP Warning: PHP Startup: Unable To Load Dynamic Library / Snmp

Nov 8, 2010

After upgrading to FC14, things went south for some of the websites etc I run. I have the following snmp related packages installed:

php-snmp-5.3.3-1.fc14.i686
net-snmp-devel-5.5-21.fc14.i686
net-snmp-libs-5.5-21.fc14.i686
net-snmp-utils-5.5-21.fc14.i686
net-snmp-5.5-21.fc14.i686

On a number of sites I use PHP's snmpget() function, but now on all these I just get this error: PHP Warning: PHP Startup: Unable to load dynamic library '/etc/php.d/snmp.so' - libnetsnmp.so.15: cannot open shared object file: No such file or directory in Unknown on line 0 PHP Fatal error: Call to undefined function snmpget()

[Code]....

View 8 Replies View Related

Red Hat / Fedora :: Ffmpeg-php And Gd Module Loading / Unable To Load Dynamic Library?

Jan 19, 2010

fedora 12 with php 5.3.1 + apache is installed on the server

I needed a FFMPEG + MENCODER + FFMPEG-PHP setup , so I have installed all of the necessary libraries/codecs along with ffmpeg , mencoder and ffmpeg-php

I've added ffmpeg-php (ffmpeg.so) module to php.ini and restarted httpd

But ffmpeg was not showing up in phpinfo() so I grepped : php -i | grep ffmpeg
for some clues and got this warning
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/ffmpeg.so' - /usr/lib/php/modules/ffmpeg.so: undefined symbol: php_gd_gdImageSetPixel in Unknown on line 0

That error explains why ffmpeg is not loading

Obviously something to do with GD library , so I've researched on the net , and found that some users suggest loading the GD module before FFMPEG module.

I gave it a try and added this at the end of php.ini:
Code: [gd]
;loading gd
extension=gd.so
[ffmpeg]
;loading ffmpeg
extension=ffmpeg.so ...but still same error when greping phpinfo()

View 1 Replies View Related

Software :: Shared Bzip2 Library - Correct GCC Dynamic Link Switches

May 29, 2009

I am trying to use a shared bzip2 library in a program I'm writing. For the life of me I can't figure out the correct gcc switch to link it in. I've tried pkg-config, but i don't know the name of the .pc file. Is there any rule for these things?

View 3 Replies View Related

OpenSUSE :: PHP Startup: Unable To Load Dynamic Library '/usr/lib/php5/extensions/intl.so'

Aug 20, 2011

few days ago i installed the newest opensuse 11.4 32bit system and all is working really fine.except when starting apache or doing a php -v on the CLI i receive the following error ->

php -v
PHP Warning: PHP Startup: Unable to load dynamic library
'/usr/lib/php5/extensions/intl.so' - /usr/lib/php5/extensions/intl.so:
undefined symbol: grapheme_extract_count_iter in Unknown on line 0

i know this bug has been reported earlier and i found quite a few results in google.i even found one result where the problem was fixed and updated in an additional opensuse repository -> Additional package repositories - openSUSE the repository with the fix is the following -> Index of /repositories/server:/php/openSUSE_11.4 so ... i added this repository via YAST to the repositories in my system without any problems but whenever i do a system update via YAST i don't receive new fixes and patches from the newly added repository!

if i directly browse to the /i586 folder in the repository i see all the PHP updates with version 5.3.7 and the latest updates were done 19 aug 2011 Index of /repositories/server:/php/openSUSE_11.4/i586 but my system still has PHP version 5.3.5 installed and somehow doesn't want to update from the newly added repository for the apache php modules so ... i just double checked and the repository is enabled in YAST ... but I still don't receive updates from there i would like to update to the new apache php modules, to get rid of that php '/usr/lib/php5/extensions/intl.so' warning, but somehow that doesn't seem to work

View 1 Replies View Related

Software :: ./configure Problem For Libsf Library Due To Apparently Missing Libdb Library ?

Aug 4, 2011

./configure script fails to configure libsf. Please check the following last few lines of configure script error.

But find command shows the following;

It seems the file libdb does exist. man dbopen displays man page for dbopen. I also tried to ln -s /usr/lib/libdb.a and libdb.so /lib dir but all were in vain.

View 6 Replies View Related

General :: Difference Between Static And Dynamically Linked Library?

Aug 30, 2010

Libraries have always been ambiguous to me. I would love to have a clear understanding of them. Here's what I know so far... Ok I know that libraries are a bunch of functions and definitions in C that binaries use. I also understand that static libraries are used by the binaries in /sbin:/usr/sbin:/usr/local/sbin and dynamically linked libraries are used by the binaries in /bin:/usr/bin:/usr/local/bin So why have statically linked and dynamically linked libraries? I know that dynamically linked libraries are used to save space. Otherwise each binary would need its own private copy of a library. So dynamically libraries are used to save space.

1. Where are the static libraries and the dynamically linked libraries located in the file structure?

2. Where does ldconfig fit into all of this?

3. Would a rootkit affect both statically and dynamically linked libraries? I would think yes unless the libraries only have read permissions.

4. If the above is true, is there any reason for your libraries to have write permission other than when you want to edit them?

View 5 Replies View Related

Programming :: Bash Script And Filename Spaces ?

Jan 15, 2010

I have over 50 files names with spaces in them.

I'm trying to use a for loop as such:

However, when I print the $filename in the script, the script prints out parts of the filename because of the spaces in the file name.

For example, say the file name was Star Quest.php

When the script executes one $filename would be Star and another Quest.php.

How could I account for this? Something like $'filename'

View 13 Replies View Related

Programming :: Scheduled Copy Based On Filename?

Jun 17, 2010

Since I'm not building a specific piece of software but a shell script, I hope this is in the right forum. At work, we use RHEL for the basic system but have Windows clients attached as well. On the Win side, there's a program that I'm trying to duplicate on the Linux side. Because of established procedures, I can't change the way files are named so please don't suggest I do that (my boss would not be happy). We have files stored on an NFS share we manipulate on either side.

The program is used to copy files from one directory to another, based on the filenames. The first two characters of the filename are ignored (they're for human-readable sorting purposes only), the next four characters are the time, and then all characters after that are ignored. The time is read and the file gets copied at that time. (This was all done in VC++ many years ago, and nobody knows where the source code is.) For example, a file named 2d0730abcd.txt would be copied from the source directory to the destination directory at 7:30am.

It seems to me that it should be fairly straightforward to build a shell script on the Linux side to do the same thing, but darned if I can figure out which magical combination of commands to use. Would the shell script end up creating a giant pile of AT commands?

View 10 Replies View Related

Programming :: Bash - Test If First 2 Characters In A Filename Are Numbers?

Oct 21, 2010

I have a directory with files like this:

Code:

And what I'd like is to have the files renamed like this:

Code:

How could I code it so that it removes the numerical part of the filename (at the beginning), even with different patterns (like the 01 - artist vs the 01-artist)?

View 8 Replies View Related

Programming :: Delete All Files With Specific Word In Filename?

May 21, 2011

I need a command to find the all files which filename contains the text "SomeText" and to delete that files!From /home/movie/wp-content/uploads/this folder I have lots of files and folders .Also I need that for folders and subfolders who contains some text in folder name "someTextInFolderName"

View 13 Replies View Related

Programming :: Script To Insert Characters At End Of Basename In A Filename

Aug 19, 2010

Enterprise Linux 4 (2.6.9-78 kernel)...rename not working! Need to insert "_T" at the end of every file in a directory, just before the ".extension"

I have tried sed substitution with no success (because I do not know the codes and effects of anchoring well enough).

An example filename:

My failed tests:

Code:

Code:

Code:

Code:

View 9 Replies View Related

Ubuntu :: Convert Entire MP3 Library To FLAC / OGG?

Sep 1, 2011

What's the easiest way to convert ALL mp3's in a library folder into a non-proprietary format like FLAC or OGG format? One that can search recursively and save the converted files in the same folders as the originals.

View 5 Replies View Related

Debian Programming :: Using Perl To Replace Filename Strings In A Directory

Jun 12, 2013

I have a directory of orchestral music .ogg files from a family member. Each track is from a different artist and the CDDB entry adds a ":" character after the artist name in the track title.

Here is an example of what I am referring to:

Code: Select all13_-_Mozart:_Sonata_in_A_major_KV_331.ogg

I would like to parse file names in any given directory and search for the string Code: Select all: and replace it with Code: Select all_ According to this post on stackoverflow, I can use Perl to accomplish this task. I've tried Code: Select allperl -i.bak -pe 's/:/_/' but since I am still learning Perl I'm probably commiting a PEBKAC error.

How would I go about solving this issue with regular expressions using Perl?

View 3 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved