paragui-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [paragui-users] pg 1.0.4 patches (Mac OS X)


From: Asko Kauppi
Subject: Re: [paragui-users] pg 1.0.4 patches (Mac OS X)
Date: Mon, 1 Sep 2003 09:52:35 +0300


yes, the code (seems to) work after the below mentioned changes. And yes, they only affect the very limited portions.

in the long time goals, i have creation of a 'fink' package about ParaGui 1.0.4 but if someone else does it before me, i'd only be so glad! :)

-ak


Ulf Lorenz kirjoittaa perjantaina, 29. elokuuta 2003, kello 00:21:

On Wed, Aug 20, 2003 at 10:41:58AM +0300, Asko Kauppi wrote:

Needed to make two modifications to ParaGui 1.0.4 sources, in order to
make it compile on OS X.
I'm not using the regular auto* tools, but my own building engine.

If anyone knows, which compiler flags etc. could be used to make these
changes unnecessary, please tell. AFIK it's a matter of some gcc (or
library) bugs of some kind.

My OS X is 10.2.6 and gcc is:
        Apple Computer, Inc. GCC version 1151, based on gcc version 3.1
20020420 (prerelease)

Here goes:

(pglog.cpp):
        PG_LogMessage_t(PG_LOG_LEVEL _id, const char* txt)
//              : Id(_id), TimeStamp(time(0)) {Text = txt;}
                : Id(_id), TimeStamp(time(0)), Text(txt) { }  //AKP(20-Aug-03)

The assign() method of 'basic_string' gets "multiple definitions"
otherwise.. weird?

        ld: multiple definitions of symbol std::basic_string<char,
std::char_traits<char>,   std::allocator<char> >::assign(char const*,
unsigned long)
        temp/darwin/pglog.os definition of std::basic_string<char,
std::char_traits<char>,   std::allocator<char> >::assign(char const*,
unsigned long) in section (__TEXT,__text)
        /usr/lib/gcc/darwin/3.1/libstdc++.a(string-inst.o) private external
definition of   std::basic_string<char, std::char_traits<char>,
std::allocator<char> >::assign(char const*, unsigned long) in section
(__TEXT,__text)
        /usr/bin/libtool: internal link edit command failed
And if you change the code like above it works ???
My knowledges are a bit limited, but would the following scenario be possible? AFAIK, normally STL is a header library. However, some (all?) implementations
place parts of the code in a shared library. Now imagine you have two
implementations, one which has std::string::assign() in a header and one which places the code itsef in a lib. The compiler won't complain, but the linker
suddenly finds two instances of std::string::assign(); the one from the
header, which has been compiled together with pglog.cpp and the other one in
the shared lib.




(stretch.cpp):
/*inline*/ double B_spline_filter(double t)     /* box (*) box (*) box (*)
box */

Otherwise i get this:

        ld: common symbols not allowed with MH_DYLIB output format
        temp/darwin/stretch.os definition of common
        _ZZ15B_spline_filterdE2tt (size 8)
        /usr/bin/libtool: internal link edit command failed
And this affects only this single function?

Ulf

--
'Oh, I never play to win.' She smiled. 'But I do play not to lose.'
(Interesting Times)


_______________________________________________
paragui-users mailing list
address@hidden
http://mail.nongnu.org/mailman/listinfo/paragui-users






reply via email to

[Prev in Thread] Current Thread [Next in Thread]