Disclaimer:  I am not a programmer!

I am trying to compile scribus-0.7.2, a Page Layout program, built 
against qt3.  /usr/ports/print/scribus contains scribus-0.5, which 
is the qt2 version.

On my Debian GNU/Linux, make works without a hitch.  On my FreeBSD 
stable box, I get a series of errors of the following type:

scribus.cpp:4217: assignment to `char *' from `const char *' 
discards qualifiers
scribus.cpp: In method `int ScribusApp::DLLType(QString)':
scribus.cpp:4240: assignment to `char *' from `const char *' 
discards qualifiers
*** Error code 1

Stop in /usr/local/scribus-0.7.2/scribus

These errors come from code similar to code that is given as an 
example of how to handle exceptions in the Linux man page for 
dlerror, /usr/compat/linux/man/man3/dlopen.3  Specifically, the 
last error was produced by

int ScribusApp::DLLType(QString name)
{
        void *mo;
        char *error;
        typedef int (*sdem0)();
        sdem0 demo;
        QString pfad = PREL;
        pfad += "/share/scribus/plugins/" + name;
        mo = dlopen(pfad, RTLD_LAZY);
        if (!mo)
                return 0;
        dlerror();
        demo = (sdem0)dlsym(mo, "Type");
        if ((error = dlerror()) != NULL)   <-- line 4240
                {
                dlclose(mo);
                return 0;
                }
        int an = (*demo)();
        dlclose(mo);
        return an;
}


Both the FreeBSD and the Linux man pages list

const char *dlerror(void)

Why does c++ on FreeBSD produce an error on
error = dlerror()
and c++ on Debian Linux does not?  What is the proper fix?

Al

-- 
Albert Kinderman  California State University, Northridge
     Department of Systems and Operations Management


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to