I'm trying to extend someone's work, but without success in including his header files appropriately. Namely, I compile the code by using
g++ -o myprog $(pkg-config --cflags --libs libgraph...
Type: Posts; User: onako
I'm trying to extend someone's work, but without success in including his header files appropriately. Namely, I compile the code by using
g++ -o myprog $(pkg-config --cflags --libs libgraph...
The code:
void myFunct(Agraph_t * g, GVC_t * gvc) {
FILE *fp;
Agnode_t *v;
Agedge_t *e;
gvc=gvContext();
Thanks for the message. Bellow is the struct content:
http://www.graphviz.org/pub/graphviz/development/doxygen/html/graph_8h_source.html#l00060
Using
void myFunct( Agraph_t * g) {
Since my coding work is based more on C++, I'm unclear about how to make changes take effect after function call in C.
Namely, I have the following struct declartion and function call in C
...
Thanks for the message. Well, I suppose there is a workaround. Doing the type change might be costly.
With the following code, I get errors after compiling:
[code]
#ifdef __cplusplus
extern "C"
#endif
template <typename VecType>
void displayVector(const VecType& myVec);
[\code]
Is there a...
First option produced the following:
source.o: In function `func':
source.cpp:(.text+0xa): undefined reference to `std::cout'
source.cpp:(.text+0xf): undefined reference to...
Given the file content as defined above, what is the exact sequence of commands I should use to make it work?
gcc -c source.c
gcc -c source.cpp // well, same file name
gcc source.o source.o -o...
Done that! Now, it complains about the actual function:
/tmp/cccMKk1q.o: In function `main':
source.c:(.text+0xa): undefined reference to `func'
collect2: ld returned 1 exit status
Thanks!
Could you provide me with the minimal working example, i.e. the content of .h, .cpp and .c files that I might use as the development base.
I tried C wrapping of C++ code example, but get...
I understand that.
But, hauzer suggest that by importing certain library in C I might utilize my C++ code.
Anyway, what is your suggestion?
Thanks for the message.
What external library should I use to facilitate the work?
I suppose the std:: preceding vector would fit withing the library environment.
I'm required to "transfer" my c++ implementation as an addition to already existing c code. The main problem are the structures that I use in c++, and that are not recognized by c. For instance, the...
cpp files are included in other cpp files (or h files), inherited project.
I've made the changes you proposed, but, again, after invoking the main makefile I get reports and warnings I got during...
I'm using stxxl library, and recently I noticed that compile time is significantly increased. Therefore, I tried to make use of precompiled header files.
This is the content of "precompiled.h"
...
Thanks for your answers. I understand your point, but please note that I do not have any inappropriate intentions. Given the time constraint, it was urgent to get proposals, which usually are...
Supposing I have multiple very long (large number of code lines) cpp file (one major including the others, which, it turn, include some), and given that (for a specific purpose) I would need only a...
Actually, I'm working with external memory computations; that is the main reason small improvements could be of great benefit. I do not use a profiler (dont know how to use it). Do you think using...
I wonder whether there is a faster way (faster then the obvious one a=a*a) to square the content of a vector of floats. I remember that bit shifting could be used somehow, but I'm not sure whether...
Can you help me somehow?
Thanks
I'm implementing an application that should decide whether to move computations
to external memory, depending on RAM memory consumption. Is there a C++ function that computes my maximal RAM memory...
This is the content of my Makefile:
STXXL_ROOT ?= /home/laptop/stxxl-1.2.1
STXXL_CONFIG ?= stxxl.mk
include $(STXXL_ROOT)/$(STXXL_CONFIG)
# use the variables from stxxl.mk
CXX ...
My current c++ application is compiled by calling "make", and invoked by calling "./fileName.bin".
Now, I want to add the functionality of cairo library into the application. Note that the the...
Do you think that THE ABOVE might the explanation to the following: Even by monitoring RAM consumption (using System Monitor in Ubuntu), after I free the memory consumed by vector (by some of the...
I found the following (swapping contents) on:
A Beginner's Tutorial For std::vector, Part 1 - CodeGuru
std::vector<int> v;
//...
v.clear();
v.swap(std::vector<int>(v));
I tried to adjust...