Hello!
Can you please recommend a free HTTP library, for C/C++, that works
in Linux? It should provide simple functions like connecting to a URL,
and reading data from a URL.
If you know, please specify whether it is multithread-safe(it's important
that it is).
Thank you very much,
Simbasaurus.
User Profile
Collapse
-
Could you please elaborate on the part with setting that flag.
I don't want the thread to be interrupted during IO, but i haven't
found any mechanism to block the signal delivery during IO.
Thanks for clearing things,
Simbasaurus.... -
weak symbols in shared library
Hello!
I built a shared object on linux from several object files.
In one of the files i redefined the global new and delete C++
operators. I deffinately do not want these operators to be seen from
outside the library, however the output i get from nm shows that
delete is exported as a weak symbol.
Output of nm -C -l | grep delete :
0004cab4 W operator delete(void*) ... -
Timers on Linux vs Windows
Hello!!
I am trying to create a Linux timer that emulates the functionality of
SetTimer from Windows.
I used timer_create() which sends a signal to the current process when
the timer expires, so the process stops execution and enters the
signal handler.
However, the functionality of SetTimer on Windows is different: the
current process is interrupted if and only if it is in... -
-
overloaded global new and delete operators
Hello!
I am working on a really big project, in which the global new and delete operators can be overloaded, by including the file "overloadedops. h".
The graphical interface was written using wxWidgets.
The program crashes with SIGSEGV because my new and operators get called by wx functions.
Could anyone explain why this happens and how can i avoid it (how can i make wx functions use the normal new and... -
void* to int / int to void *
Is the following code in any way illegal/wrong/dirty?
Could it fail to compile on some platforms?
void *p;
int x,y;
x=3;
p=(void*)x;
p=&y;
x=(int)p;
Thanks for your help,
Simbasaurus -
Thank you, this has been of great help.
I guess that vpath only builds a list of object files once and that's why it doesn't know about the new object files that were created.
Your idea with a separate makefile that builds only binaries works great.
Regards,
SimbasaurusLeave a comment:
-
well, one mistake was that i wrote
vpath %.obj $(OBJ)
instead of
vpath %.o $(OBJ)
But i still have to call make twice to produce the shared object.Leave a comment:
-
makefile problem
Hello!
I am trying to write a simple makefile that compiles some C++
sources from ~/testmake/src and places the object files in
~/testmake/obj.
The makefile looks like this:
CC=g++
BASEDIR = ~/testmake
SRC = $(BASEDIR)/src
OBJ = $(BASEDIR)/obj
SOURCES = s1.cpp s2.cpp
OBJECTS = $(SOURCES:.cpp= .o)
vpath %.cpp $(SRC)
vpath... -
Jos, thanks for the reply.
But should i wrap each of the two int* in a separate class, so that the destructor of the wrapper will release the fully allocated array?
Is this the only way?Leave a comment:
-
behaviour of "new" on bad_alloc
Hello!
I am trying to make sure that I clean up and free all the resources that I allocate in my code.
In the following code, I am assuming that if new throws bad_alloc, than the value of array1 or array2 is unmodified,
that is, they remain NULL.
In this case, if allocation of array1 succeeds, and allocation of array2 fails, then array1 will be deallocated.
What if new does modify the value of the...
No activity results to display
Show More
Leave a comment: