473,396 Members | 2,013 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,396 software developers and data experts.

static link a library

I am quite a beginner in C. I am writting an application on my debian
linux computer that uses some imagemagick library functions. I can
link them and compile (with cc) in my computer but when I move the
binary to another computer it says: error while loading shared
library: libWand.so.6: cannot open shared object file: No such file or
directory.
I would like to avoid this and (if possible ) have everything compiled
into my binary. I think I have to link a static version of imagemagick
library but I don't know how to do this. I would appreciate if someone
could point me to tutorials or manuals for beginners (preferentially
free and online) on how to link static libraries or give me a short
explanation.
Thanks,
Angel
Nov 14 '05 #1
2 2209
On Fri, 10 Sep 2004 02:39:13 -0700, Angel Lopez wrote:
I am quite a beginner in C.
And, apparently, to Usenet.
I am writting an application on my debian linux computer that uses some
imagemagick library functions.

[snip OT]

You would do best to ask in comp.unix.programmers or gnu.gcc.help. Or,
even better, run info gcc or man gcc and see what the documentation says
about static linking.

This group is about Standard C, not the options present on specific C
compilers.

Nov 14 '05 #2
an*******@hotmail.com (Angel Lopez) wrote in message news:<9d**************************@posting.google. com>...
I am quite a beginner in C. I am writting an application on my debian
linux computer that uses some imagemagick library functions. I can
link them and compile (with cc) in my computer but when I move the
binary to another computer it says: error while loading shared
library: libWand.so.6: cannot open shared object file: No such file or
directory.
I would like to avoid this and (if possible ) have everything compiled
into my binary. I think I have to link a static version of imagemagick
library but I don't know how to do this. I would appreciate if someone
could point me to tutorials or manuals for beginners (preferentially
free and online) on how to link static libraries or give me a short
explanation.
Thanks,
Angel


The best and the least thing you can do is look the man page of cc/gcc
for the static linking options. With gcc, "-static" option is probably
what you are looking for.

- ajay
Nov 14 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: TGF | last post by:
Hello, I am creating a console app. I try to link a static library by including it in the Linker-Input-Additional Dependencies field under the Project properties. Then I specify the path to...
1
by: mccoyn | last post by:
I'm porting an old project to use .NET. When I try to link in a static library (.lib) that has a single managed class in it. I get the following errors: LINK : error LNK2020: unresolved token...
1
by: Torsten Mueller | last post by:
I have to create a shared library containing C++ classes with static member variables on HPUX with aCC. I can compile and link the library and a test application but when I start the program I get...
2
by: free2cric | last post by:
Hi, I have two c++ static libraries say A.lib and B.lib. I am creating third static library C I create project in microsoft visual studio as win32 static library. I go to project-> settings ->...
3
by: iceColdFire | last post by:
Hi, Can someone highlight the difference between static library and bynamic library...and how do .lib and .dll files come up in the picture... Thanks, a.a.cpp++ :-)
8
by: Robert A Riedel | last post by:
I have an application that requires a DLL and an executable that uses the DLL, both of which were implemented in Visual C++ using unmanged code. Both the executable and the DLL are linked with...
3
by: Kevin Frey | last post by:
I am working on a test migration of our project to Visual Studio 2005 Beta 2 as a precursor to the availability of the full release of VS2005. The most onerous problem so far concerns the...
14
by: Jeroen | last post by:
Hi all, I've got a question about writing a library. Let me characterize that library by the following: * there is a class A which is available to the user * there is a class B that is used...
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...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.