Forum > Windows

BOINC as library

(1/9) > >>

Raistmer:
I wonder maybe it's worth to distribute boinc as set of libs to link with (for windows) and headers to include (just as usual API-library)?
Just to reduce initial compilation time (and time spent on efforts to make it compile ;) ).

For example gutil_text.C from BOINC 5.5 (sources taken from this site) failed to compile with Intel(R) C++ 10.0.027 [IA-32] used with MS VS 2005 .
Error message:
..\..\..\boinc\api\gutil_text.C(335): error: a value of type "const char *" cannot be used to initialize an entity of type "char *"
      char* q = strchr(p, '\n');
                ^
(this line from next function
void MOVING_TEXT_PANEL::set_text(int lineno, const char* p) {
    char* q = strchr(p, '\n');
    while (p) {
        if (q) *q = 0;
        strlcpy(text[lineno++], p, 256);
        if (!q) break;
        p = q+1;
        q = strchr(p, '\n');
    }
}
)

Jason G:
LOL, and the rest of the errors.  I think they should just clean up the source and we can build our own to our own optimisation settings.  which version of boinc api did you use?[I see now, 5.5 sources]  I had the same issues... (VS2005 w/ ICC&IPP)

-  so what did you do about the const char * one ?

-  what about-  position_history(0) on line 126 of seti_header.cpp ?

(just curious to see if you did the same as I did :D, I'd have to go back and look what I did and compare)

Jason

Raistmer:
For now I just downloaded 5.10.20 release sources :)
So libboincapi compiles w/o errors now but setiboincdb leads to error:
"
..\..\db\xml_util.cpp(641): error: identifier "strlcpy" is undefined
        strlcpy(tmp_tag,tag,BUFSIZ);
        ^
"
It seems some include line or define is missing.... strange, uncompilable release?  :o

About seti_header.cpp : got such error
"
seti_header.cpp
compilation aborted for ..\seti_header.cpp (code 4)
Command-line error: cannot open precompiled header input file Release32-NoGFX-xP\KWSN_2.3S9_MB_SSE.pchi
"
I use MS VS very occasionally so need some time to understand why compilation is bothered by lack of precompiled header at fresh build run... why it cant generate new precomp header?  :-\

P.S. Ah, generate precomp headers  was just turned off :) So now it complains only about "ipp_t7.h" missing (i use eval version of IPP so probably need to edit all these includes ).
No mention of position_history in errors log so far.

Jason G:
first have a look in Util.h line 31, and see if the #if !defined(HAVE_STRLCOPY)) , is active... if it is then implementation in util.c will be active too.  If those aren't active then HAVE_STRLCOPY is defined, you can 'find in files' to locate the definition if there is one.  If it is defined then maybe a wrong preprocessor definition is there (e.g _GCC or _MSCVER)

that bit was okay for me.

The precompiled headers need to be generated at least the first time,  In the master projects I just set them on the C++ section -> Precompiled Headers to 'Create Precompiled Headers' and left them there for now.  It'll save time to change it back later when you build pieces often, but don't need to alter the headers anymore.
[ I see you found this -- Good one :D]

For now you probably do need to creat them(because they aren't there, and) because some of the includes and defines are messed up.

[The Intel Include will be processor specific, chosen by ICC,  just add the right directory in your 'additional include directories' to your ICC installation, and add IPP for good measure :D]




Raistmer:
thanks  :)
I found that addition of
#include "str_util.h"
line to xml_util.cpp heals setiboincdb project.
tomorrow will continue with IPP.

Navigation

[0] Message Index

[#] Next page

Go to full version