Hello,
I wrote a C app that uses the PCRE library. Everything works on my own computer. However, when I copy the binary over to another computer and run it, it gives the following error:
/libexec/ld-elf.so.1: Shared object "libpcre.so.0" not found, required by "myapp"
I know I can probably get it to work by installing the PCRE lib on ...
Hi,
Is there some tool that can automatically convert the following c style code
A *a = b;
to
A *a = (A*)b;
Thanks,
James
...
How can I round a float (such as 37.777779) to two decimal places (37.78) in C?
...
So I take my C++ program in Visual studio, compile, and it'll spit out a nice little EXE file. But EXEs will only run on windows, and I hear a lot about how C/C++ compiles into assembly language, which is runs directly on a processor. The EXE runs with the help of windows, or I could have a program that makes an executable that runs on a...
I've got a bare-minimum Erlang port driver:
erl_driver_bridge.c -> erl_driver_bridge.dll
#define __WIN32__
#include "erl_driver.h"
typedef struct {
ErlDrvPort port;
} erl_driver_bridge_data;
static ErlDrvData bridge_start(ErlDrvPort port, char *buff) {
erl_driver_bridge_data* d =
(erl_driver_bridge_data*)driver_alloc...
By that I mean is it possible to write a program in C, compile it and then see what it looks like in ones and zeros? It would be cool to act like a 1337 hacker and pretend to actually program in ones and zeros :p .
...
I can build a executable with gcc with static link:
gcc -static xxx.c -o xxx
So I can run xxx without any external dependent library.
But what if I want to build shared library without externel dependent library? which I mean I want
the shared library statically linked its externel reference in.
...
Below is the definition of sockaddr_storage structure (rfc2553). According rfc2553, the sockaddr_storage
should be aligned with 64 bit boundary and it should be able to hold both sockaddr_in and sockaddr_in6.
Also, it must have atlest __ss_family member. Rest of the fields are implementation defined.
#define _SS_MAXSIZE 128 /* Imple...
Can anyone explain this behavior of gdb :-
900 memset(&new_ckpt_info,'\0',sizeof(CKPT_INFO));
(gdb)
**903 prev_offset = cp_node->offset;**
(gdb)
**905 m_CPND_CKPTINFO_READ(ckpt_info,(char *)cb->shm_addr.ckpt_addr+sizeof(CKPT_** HDR),i_offset);
(gdb)
**903 prev_offset = cp_node->offset;**
(gdb)
**905 ...
Here is a simple function that converts a string to an integer.
int str2int(char *str)
{
int ret = 0;
char *c;
for (c = str; (*c != '\0') && isdigit(*c); ++c)
ret = ret*10 + *c - '0';
return ret;
}
As an exercise, I'd like to write a recursive function that does the same thing. This is what I came up with.
...
Hi,
How to access Digital I/O using USB using C or C++ or Vb.net Or C#.net?
...
I absolutely loved Dive Into Python when I picked up Python.
In fact, "tutorials" such as Dive Into Python work really well for me; short brief syntax explanations, and plenty of examples to get things going.
I learn really well via examples.
I have programming experience in Java, Scheme, Python, PHP, Javascript, etc.
Is there anywhe...
I am working on an embedded system, so memory is precious for me.
One issue that has been recurring is that I've been running out of memory space when attempting to compile a program for it. This is usually fixed by limiting the number of typedefs, etc that can take up a lot of space.
There is a macro generator that I use to create a ...
I am executing my a.out file .After execution the program runs for some time then exits with the message:
** stack smashing detected : ./a.out terminated
======= Backtrace: =========
*/lib/tls/i686/cmov/libc.so.6(__fortify_fail+0x48)Aborted*
What could be the possible reasons for this and how do I rectify it?
...
Hi everyone,
I have many times opened a txt file using C language Files manipulations. But when i try to open an image using C Files, I just cant do that.
I even tried this by opening the image file in binary mode("rb").
Could you please help me out for doing this...
Thanks :)
...
I need to know if it's possible to use a tool like ctags or cscope to find all the usages of a function but filter the results depending on the value of one of its parameters.
For example, let's assume we have a function void foo(int a, int b) that is used a thousand times along all the source tree and I need to check if it's being call...
This is very specific, and a bit difficult to explain, and quite likely impossible, but here goes. Perhaps some C cracks out there have an idea...
I want to implement <errno.h>. (My hobby project is implementing a Standard C library.)
The naive way to go about it is:
// in <errno.h>
extern int errno;
// in some .c file
int errno = 0;...
Hello,
I am developing an application that will run on 64 bit computers.
However, we are using a library that has 32 bit integers that we cannot change. And we will need to compile and run on a 64 bit computer.
What would the implications be when the application is running? Is there any work around?
Many thanks for any advice,
...
I currently have a thread that I created using CreateRemoteThread(). Everything works great.
Upon finishing (or an error before completion) the thread returns one of the five return codes that we defined.
I run into a problem and I need to return the results of GetLastError() as well. Is there any way to return two values?
I am using W...
Write tertiary search program.
Notes: Tertiary search is similar to binary search. In binary search we consider two parts of the array and select one part as the next search space. In tertiary search we consider the array in 3 equal parts. For this, we take two "middle" indices, middle1 and middle2 respectively at 1/3 and 2/3 of the arra...