Search:

Type: Posts; User: onako

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Replies
    1
    Views
    841

    Tell compiler to look for include files

    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...
  2. Thread: No change effect

    by onako
    Replies
    6
    Views
    1,211

    The code: void myFunct(Agraph_t * g, GVC_t *...

    The code:


    void myFunct(Agraph_t * g, GVC_t * gvc) {
    FILE *fp;
    Agnode_t *v;
    Agedge_t *e;

    gvc=gvContext();
  3. Thread: No change effect

    by onako
    Replies
    6
    Views
    1,211

    Thanks for the message. Bellow is the struct...

    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) {
  4. Thread: No change effect

    by onako
    Replies
    6
    Views
    1,211

    No change effect

    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

    ...
  5. Replies
    4
    Views
    4,534

    Thanks for the message. Well, I suppose there is...

    Thanks for the message. Well, I suppose there is a workaround. Doing the type change might be costly.
  6. Replies
    4
    Views
    4,534

    extern "C" around template function

    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...
  7. Replies
    16
    Views
    3,282

    First option produced the following: source.o:...

    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...
  8. Replies
    16
    Views
    3,282

    Given the file content as defined above, what is...

    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...
  9. Replies
    16
    Views
    3,282

    Done that! Now, it complains about the actual...

    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
  10. Replies
    16
    Views
    3,282

    Thanks! Could you provide me with the minimal...

    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...
  11. Replies
    16
    Views
    3,282

    I understand that. But, hauzer suggest that by...

    I understand that.

    But, hauzer suggest that by importing certain library in C I might utilize my C++ code.
    Anyway, what is your suggestion?
  12. Replies
    16
    Views
    3,282

    Thanks for the message. What external library...

    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.
  13. Replies
    16
    Views
    3,282

    Using C++ within C implementation

    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...
  14. Replies
    6
    Views
    1,558

    cpp files are included in other cpp files (or h...

    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...
  15. Replies
    6
    Views
    1,558

    Avoid double compile

    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"

    ...
  16. Thread: Compile time

    by onako
    Replies
    5
    Views
    1,334

    Thanks for your answers. I understand your point,...

    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...
  17. Thread: Compile time

    by onako
    Replies
    5
    Views
    1,334

    Compile time

    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...
  18. Replies
    6
    Views
    1,303

    Actually, I'm working with external memory...

    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...
  19. Replies
    6
    Views
    1,303

    Faster squaring for a vector of floats

    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...
  20. Replies
    3
    Views
    979

    Can you help me somehow? Thanks

    Can you help me somehow?
    Thanks
  21. Replies
    3
    Views
    979

    RAM memory consumption

    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...
  22. Replies
    2
    Views
    911

    This is the content of my Makefile: ...

    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 ...
  23. Replies
    2
    Views
    911

    "make" and library

    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...
  24. Replies
    15
    Views
    5,117

    Do you think that THE ABOVE might the explanation...

    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...
  25. Replies
    15
    Views
    5,117

    I found the following (swapping contents) on: A...

    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...
Results 1 to 25 of 43
Page 1 of 2 1 2