473,809 Members | 2,763 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Linking in a module?

Hi,

When I try to execute a program called cnet I get an error like:

[root@duenna stopandwait]$ cnet -s -m 1 STOPANDWAIT
cnet: error while loading shared libraries: libelf.so.0: cannot open shared
object file: No such file or directory

I think that means that the runtime loader can't find a file to link with
the cnet program. I do have the file libelf.so.0 in /usr/local/lib, but I've
tried and can't find a way to tell the loader to look there.

Am I able to link the missing module to the executable when I compile the
program? I think my linker options should include -llibelf, but when I
include that the ld program say's it can't find libelf. I could help it to
find what it's looking for with -Lsomepath I guess, but I don't know what
the loader is looking for. Surely not libelf.so.0. Tried that, didn't go.

Can anyone please tell me what I'm doing. I have no clue.

Regards,
Muz.
Sep 23 '07 #1
1 1390
Trespasser wrote:
Hi,

When I try to execute a program called cnet I get an error like:

[root@duenna stopandwait]$ cnet -s -m 1 STOPANDWAIT
cnet: error while loading shared libraries: libelf.so.0: cannot open shared
object file: No such file or directory

I think that means that the runtime loader can't find a file to link with
the cnet program. I do have the file libelf.so.0 in /usr/local/lib, but I've
tried and can't find a way to tell the loader to look there.

Am I able to link the missing module to the executable when I compile the
program? I think my linker options should include -llibelf, but when I
include that the ld program say's it can't find libelf. I could help it to
find what it's looking for with -Lsomepath I guess, but I don't know what
the loader is looking for. Surely not libelf.so.0. Tried that, didn't go.

Can anyone please tell me what I'm doing. I have no clue.
What, specifically was your C++ question?

Linking and loading are off-topic and are highly system dependent. I
would recommend asking again in comp.unix.progr ammer.

F/U set.
Sep 23 '07 #2

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

Similar topics

1
2591
by: Jeff Hagelberg | last post by:
I'm trying to create a python module which can be used by a python interpreter embedded inside a fortran program I have. To do this, I first created python wrappers for all the functions in my fortran program using f2py. I then start an embedded python interpreter in c code which I link against the fortran program. I invoke the fortran program with a filename containing python code. This file is passed to the c code which passes it on...
7
5127
by: Steven T. Hatton | last post by:
Is there anything that gives a good description of how source code is converted into a translation unit, then object code, and then linked. I'm particularly interested in understanding why putting normal functions in header files results in multiple definition errors even when include guards are used. -- STH Hatton's Law: "There is only One inviolable Law" KDevelop: http://www.kdevelop.org SuSE: http://www.suse.com Mozilla:...
1
6100
by: Venky | last post by:
I'm compiling a C program that is using Interbase 6.0 APIS. Getting the following errors at the time of linking. Linking test.exe: Linker Warning: No module definition file specified: using defaults Linker Error: Undefined symbol isc_detach_database in module TEST.C ..... ..... If I set the option not to generate the underscore (function prefixed with "_") I get the following errors. Interbase 6.0 APIs resolved
1
3317
by: R | last post by:
hello. I've got problem with linking asm and c procedures. I've got main.c where i've got my external definitions: extern int buffer(int,int,int); // coded in asm extern int hash(int,int); //coded in asm I've got simple make file for my project:
0
1479
by: zhangrusi | last post by:
I have a static library that is compiled using the latest version of VC 6. It uses the multithreaded DLL versions of the run-time library, and it uses STL classes. I would like to make use of this static library in a VS .NET 2003 managed C++ project. Currently, I am just linking the compiled .lib file into my VC 7 project. (This is the simplest approach, as it is not practical to move the static library project to VC 7 at this time.) My VC...
3
1887
by: Simon Burton | last post by:
Hi, I'm having some trouble linking one extension module to another because the linker expects a "lib" prefix and my python modules cannot have this prefix. I found two ways of doing it on a linux box (either symlink or create a dummy .so that links to extension module) but I can get neither of them work on OSX (let alone windows).
10
2695
by: Julian | last post by:
I get the following error when i try to link a fortran library to a c++ code in .NET 2005. LINK : fatal error LNK1104: cannot open file 'libc.lib' the code was working fine when built using .NET2003. also, when I do not try to link the fortran library (just to see if that was the cause), it builds the exe without any problems. i don't even know how to begin addressing this problem...any help would be
2
1719
by: Mohsen A. Momeni | last post by:
Hi, Does it have any difference in security, whether to compile a function as a static lib and link it with a program or just add the function to the source? In other words, suppose we have two files, func.c containing a function which is called in main and main.c containing the main function. what is the difference when we link func.o with main.o to make a binary, with linking func.lib with main.o to make the binary, concerning security...
3
2688
by: kalyani1031 | last post by:
hi, my problem is linking my cli module with XORP modules. I am calling my cli_main() in the XORP router manager module rtrmgr. It takes the files and compiles the files that are in the router manager but it gives undefined references to some objects or methods which r in the other modules like libxorp libxipc ... etc. I wrote Makefiles for each module when I run global cli Makefile rtrmgr Makefile didn't link with the libxorp module.
11
2360
by: =?Utf-8?B?aWduaGVucnk=?= | last post by:
I have a managed C++ project and two C# projects. All are class library projects. The C++ project links with native C++ static libraries and references to one C# project. The projects structure goes something like this. Proj2_MCPP --(references)--Proj1_CSharp Proj3_CSharp --(references)--Proj2_MCPP and Proj1_CSharp My objective is to link the DLLs produced by the 3 projects into a single DLL. I tried the following scenario.
0
9601
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10635
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10378
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10115
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7653
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6881
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5687
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4332
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3861
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.