Programming :: Random Libraries Are Not Directly Executable?
Jun 30, 2011
Since I read that executing a library could return its version number, I ran "/lib/libc.so.0" on uClinux, but it triggers an error.I'm told that random libraries are not directly executable. Does someone know what a random library is?PS: In case that matters, here's the short version of the error:
Code:
Undefined instruction
<5> - May be used to emulate instructions that are not defined for
[code]....
View 2 Replies
ADVERTISEMENT
Mar 23, 2011
The Linux ldd command can show the dynamic libraries used by an executable. It's a bash script.But it seems to be fragile, and does not work on some binaries. Is there an alternative tool? In my specific example, I can use:
% file datab2txt
datab2txt: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, for GNU/Linux 2.4.0, not stripped
but ldd fails with:
% ldd -v datab2txt
not a dynamic executable
View 2 Replies
View Related
Aug 12, 2009
When you use an if statement directly in bash you have to put the ";" at the end or not? or am I mixing it with the for loop? I am reading advance bash scripting and it shows the if - then statements without ";" so I need a little clarification here.
View 2 Replies
View Related
May 24, 2010
Im doing a project,in which i have to add a script in c++ inorder to merge two or pdf files page by page or based on some headindgs.SO anyone can please suggest me any open source pdf libraries in c++ which provide functions for merging and splitting.
View 3 Replies
View Related
Jun 2, 2010
I want to find the cpu time taken by an executable to run.. the executable is writting the output to a file. i want to write the time takem by cpu to the same output file.
like:
abc is my executable which is taking input as input file and writing the result in output file.. i want to append cpu time information in the same file. can i do it with time command?
View 5 Replies
View Related
Feb 21, 2011
I am learning C++ and wish to include some Boost functions in my code. My machine is running Debian Linux with the pre-installed boost binarys.I have a couple of questions:How do I include the library in my C++ code as there are no cpp or h files only binary files (eg /usr/lib/libboost_regex-d.so and /usr/lib/libboost_regex-d.a)How do I comile the code. I am using DialogBlocks for creating forms using wxwidgets. The editor also compiles the code using the gcc compiler. Do I have to give an instruction to the compiler saying which file is requried and where to find it? If so, any ideas how this is done?
View 4 Replies
View Related
Apr 17, 2011
I have written C++ programs on Windows. I am now learning Linux to ensure my software is portable. I can compile and run C++ programs from the bash shell, but I cannot run my executable programs from the GUI.Here is my sample program:
Code: #include <iostream>
int main()
{
[code]...
View 3 Replies
View Related
Jan 13, 2010
I'm maintaining a c++ application running on a 64-bit RHEL5 server w/32GB ram, but compiled to be a 32-bit executable with g++. The application handles large amounts of data, and has lately been throwing a st9bad_alloc exception. "top" shows the application as dieing right around when VIRT=~3GB, SWAP=~1.5GB and RES=~1.5GB. In the core dump I can see that it's consistently failing to push_back() a piece of data onto a std::vector (which already has hundreds of thousands of objects in it).
I know 4GB is the maximum address space for 32-bit applications. I've learned from this lwn article that a 32-bit kernel reserves 1GB of address space, leaving 3GB for user space. However I'm not running a 32-bit kernel, so that really doesn't answer anything.I wrote a dummy app which called malloc() over and over in a for loop, and it is able to allocate right up to the 4GB before it fails. I don't understand why this one seems to be able to allocate more.
The only difference between the two apps (besides malloc vs std::vector:ush_back), is that the 3GB crashing application attaches to 512mb of shared memory.Anyone have any ideas why this application would be crashing at 3GB? Is there any more diagnostics I should be doing? I would ultimately like to port this to 64-bit for a number of reasons, but it is a big undertaking for my organization, and I'd like to better understand what's going on here.
View 3 Replies
View Related
Jan 8, 2010
i have only basic knowledge of C so guys plz help me...is C language support call the C executable inside the C ?example contect mainA.c have a many function define in the struct,when i compile mainA and make a executable the name is ( A ),can i use executable C inside the C <my C program call the executable ( A ) > .
View 9 Replies
View Related
May 5, 2009
It is possible to run multiple instances of a jar executable. Is it possible that only a single instance of the jar runs? Wrappers like JSmooth or Launch4J can be made to run as a single instance. But since there are no such wrappers for linux, I need a way to restrict the jar to a single instance. How to embed the jar file into an executable such it runs a single instance?
View 14 Replies
View Related
Jun 1, 2010
I have created a executable file using c and I have also created a GUI using GTK+. Now how can I call the executable file from the GUI with arguments passing to the executable file.
View 4 Replies
View Related
Mar 2, 2010
when compiling a c++ program in g++ on Linux, how can I add version information to that executable and if possible is there a Linux utility to read the version information?
View 2 Replies
View Related
Sep 3, 2010
I am trying to run Wattch simulator in linux.But it is giving the error below. what is this error and what do I do about it?
fatal: bad magic number in executable `prime' (not an executable?)
View 1 Replies
View Related
Oct 15, 2010
I am stuck with a problem to link static libraries with gcc. There is no problem with source files since I am able to compile in a machine where the static library is installed. I am compiling with the following: Code: :~/Emotion/pjproject-1.0.3/third_party 157% gcc -Wall -I/portaudio/include -o rec patest_record.c -L./lib -lportaudio-x86_64-unknown-linux-gnu
[Code]....
View 5 Replies
View Related
Jan 30, 2010
So I decided to take my first steps into programming with C + gtk. So far I have doneI loaded eclipse and ensured I had the cdt package Created a new C/C++ project called "play" Added a new source file called "Playfullsrc.c" Added the following to paths and symbols (output of the command: pkg-config --cflags gtk+-2.0)
Code:
/usr/include/gtk-2.0
/usr/lib/gtk-2.0/include
/usr/include/atk-1.0
/usr/include/cairo
/usr/include/pango-1.0
/usr/include/pixman-1
/usr/include/freetype2
[Code]....
added "/usr/lib/libgtk-x11-2.0.so" to GCC C Linker Libaries (I have cheacked and this file exists) When I build the project I get the error message "cannot find -l/usr/lib/libgtk-x11-2.0.soplayline 0C/C++ Problem" I have been following this tutorial: [URL]
View 2 Replies
View Related
Apr 4, 2010
I have 2 questions... I couldn't find answers by Googling (more precisely, by Blackling) and in GCC documents, so I'm asking here.
1. There are 2 flags for position independent code, -fpic and -fPIC. All the examples I read use -fPIC... so when is -fpic useful and what is the difference?
2. Some tutorials use "g++ -shared" while others use "ld" for the creation of the shared library. Why? Does it matter which method I use? Is there a difference? Why does nobody mention both options?
View 11 Replies
View Related
Jan 6, 2010
I've been trying for days now to build my first FastCGI application using gcc.
This is the output:
Code:
I believe I wouldn't have to refer to the lib path, but I added the -L flag to be sure.
The directory /usr/lib includes (among others) these files:
Code:
I have tried to follow these instructions. The files in the tar.gz archive provided by FastCGI.com no longer corresponds to the instructions there, but I was still able to run the ./configure and make commands so I believe FastCGI is installed.
But why can not the library be properly linked to? Really hope you can help me out on this one!
View 2 Replies
View Related
Apr 11, 2010
Just what it says in the title.
I can work in a 32-bit VirtualBox VM, but it's very inconvenient and I would rather work in my 64-bit desktop if that's not too difficult.
These are all the lib32 packages I have installed code...
View 14 Replies
View Related
Oct 22, 2010
This post isn't really asking for a tutorial, but rather asking for some ideas. I've come up with a few ideas, but they seem cumbersome and unnecessary, so I was wondering if someone with more experience than me could out. Also, my explanations suck, but I'll try to do my best. So say I have an executable called X. At some point during its execution, X loads and uses (using dlopen and dlsym) a library called Y. In Y, there a bunch of functions that call the function called, for example, void *special_malloc (size_t). These functions come from another linked library (linked during compilation) called Z. Problem is, special_malloc contains some static variables within its scope, and when those variables are reset midway through a program, an invalid free occurs (special_malloc uses garbage collection). Now, what I want to happen is that whenever lib Z calls special_malloc, it instead calls the special_malloc defined in the executable X, so that these static variables are retained. Keep in mind that I have control of the Z library, meaning I can edit the source to fit my needs.
View 2 Replies
View Related
Oct 4, 2010
I am trying to use a software package written in ANSI C. It has a makefile which has to be executed first.
As soon as I execute it I get messages like: line i: command not found.
Commands for which I am getting errors :
CC = /usr/bin/gcc
GCCFLAGS = -c -Wall
ROOTDIR = .
My gcc compiler is located in the above directory only. In ROOTDIR also I tried giving the path in which all the required files & folders are present but still I get the command not found error in all the lines.
View 7 Replies
View Related
Apr 4, 2011
I wrote a c++ program but for security reasons I need to make sure that no one can read my codes by my ".out" files. I did everything I could. But everyone can see it by "strings Alpha.cpp".I heard that g++ has some options to do so.
View 7 Replies
View Related
May 24, 2011
I need to redirect a /usr/sbin/sendmail command to $HOME/bin/msmtp .The sendmail command would be coming from a PHP5 application. I'm assuming the best way is to use .bashrc, but .htaccess is also available.The remote server is a shared web host which is running Debian 4.0.I do not have root access.I have SSH access.
View 2 Replies
View Related
Mar 5, 2011
Generating avi files for movies directly from gfortran programs. I make movies from my Fortran codes using seismic unix - SU. Need to modernize this method to make avi movies or something similar. I am quite adept at generating "C" binary files from Fortran. Have not been able to find the documented definition of AVI file format.
View 1 Replies
View Related
Mar 4, 2011
i want to generate random number in c programming from -1 to 1
View 1 Replies
View Related
Jul 21, 2010
I'm using debian and, though i'm new to c++, i'm writing a program using it which needs some HTTPs functionalities . I found these libcurl libraries could help me but I haven been able to use them from my program. I installed them (power trio configure -make -make install ) but i guess i'm doing something wrong ... i feel like i should copy or link them somehow in my project (besides the include sentences in my code). I hope you could give me a hand with this im quite lost
View 9 Replies
View Related
Jun 9, 2010
I am using the API libpcap in order to filter the traffic of the port 53 from my PC ro other PCs, in other words the DNS traffic.I want to get more information about the DNS traffic that is being sent to the DNS server, in other words the queries. So far I have no idea how to read the information data or payload of the UDP package in order to read the content of the traffic for example if there is any PTR, A, MX, etc Resource Record.According to the RFC 1053 there is a header that is possible to use in order to easily get this info.
View 5 Replies
View Related
Jun 1, 2009
Any good tutorial on sharing dynamically allocated objects across shared libraries in the same process and between shared libaries and main(). In particular, I need to know what creation and destruction sequences are valid when libraries are being loaded and unloaded. For example, is it valid to allocate an object from inside a shared library procedure, and then delete that pointer from a different module, especially in the case where the allocating module has already been unloaded.
I imagine there might be all kinds of problems with this. Although my preliminary tests seem to work most of the time, I get crashes from time to time, but I'm not sure if they're caused by memory management or by threading issues. I've been restructuring my code to use a global context object to manage object creation and destruction from main(), but I'd like to find a clear exposition of the specific issues I'm dealing with before I go too much further.
View 4 Replies
View Related
Mar 10, 2010
I have been a predominant Windows user for a long time but shifted to Ubuntu recently. I was just trying out a few basic C functions when i realized that the "conio.h" header file isn't included in the libraries and therefore i was unable to use the "clrscr()" function.
I downloaded a tarball which contained the necessary library and header files including conio.h. Once extracted, i specified the location and included in the program as " #include "path to the header file" ".
I still didn't call the "clrscr()" function, and it compiled successfully. Next i edited the program to call that function and it gave the following error...
How i can add new libraries in the future?
View 14 Replies
View Related
Aug 21, 2010
Arm-linux-strip for removing the symbols from binary executable file after compilation. What exactly the symbols means.
View 1 Replies
View Related
Oct 10, 2010
My senior project team at Penn State is starting to write our code, and I was looking for a revision control system to manage it. I was going to use CVS, but I can't find a client that doesn't have to install something on the local machine(we dont have administrative permissions on school computers). Is there a CVS(or Subversion or anything else) client that comes as a single executable file or web interface?
View 3 Replies
View Related