473,385 Members | 1,925 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

static and shared libs in Linux?, also makefile for them needed

365 100+
I have windows code to port to Linux, there are some static libraries like xyz.lib, also shared libs ABC.dll, I have to convert those static and shared libs (basically static will be used to make shared) to Linux, what is the extension in Linux (shared is .so, static is .lib?), can I get some sample makefile for static libs and shared libs?. thanks.
Nov 23 '09 #1
1 2495
tvnaidu
365 100+
I have Three c files and include directory parallel to these c files, trying to create a shared lib (util.so), but fails with this command.
gcc xyz1.c
gcc xyz1.c
gcc xyz1.c

gcc -g -O2 -I/include -shared -fPIC -L. -lutil.so -Wl xyz1.o xyz2.o xyz3.o
Nov 23 '09 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Steven T. Hatton | last post by:
Sorry about the big code dump. I tried to get it down to the minimum required to demonstrate the problem. Although this is all done with GNU, I believe the problem I'm having may be more general. ...
0
by: Samuel M. Smith | last post by:
I can build python 2.4.2 from source on the embedded linux box when I nfs mount and boot a full debian distribution. The embedded box also has stripped down linux distribution in onboard flash....
2
by: David Garamond | last post by:
Does it currently work? src/backend/utils/mb/conversion_procs/*/ is not building anything, and 'make install' fails because it tries to copy *.so files. -- dave ...
5
by: info | last post by:
Hi! Please be patient with a newbie... I use DevC++. I've found and compiled succefully various openGL examples. Before build the application, I link the project with static libs, like, in...
1
by: vasilip | last post by:
root@Server:/opt/ibm/db2/V9.1/bin# ./db2adutl ../db2adutl: error while loading shared libraries: libApiDS.so: cannot open shared object file: No such file or directory I just installed db2 9.1...
6
by: Even | last post by:
Hi all, As far as I know, relative address will be assigned by program at link time.Right? Ok, here we go. So if we use a static library, it will give the program an relative address(i mean...
20
by: Nickolai Leschov | last post by:
Hello all, I am programming an embedded controller that has a 'C' library for using its system functions (I/O, timers, all the specific devices). The supplied library has .LIB and .H files. ...
2
jwwicks
by: jwwicks | last post by:
C/C++ Programs and Debugging in Linux This tutorial will give you a basic idea how to debug a program in Linux using GDB. As you are aware Visual Studio doesn’t run on Linux so you have to use...
0
by: tvnaidu | last post by:
created a shared library .so file, using "gcc -shared ...." command, when I did "ldd xyz.so", I cannot see those static libs which are added with -l option, also I gave path -L/opt/lib where I copied...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.