← Back to team overview

kicad-developers team mailing list archive

Re: Python scripting cmake build macros.


Hi Wayne,

You're right - it's not exactly straight forward, there are problems to

I got the specs file to work correctly with the variable substitution,
perhaps you could try the spec90 file I attached to another mail on the
list? I'm using the latest MinGW version - 4.7.2 too.

I wonder if you have a link library ordering issue as write should
definitely be linked from any C runtime.

I am getting some other issues, relating to "time" which I think went under
"breaking changes" as Microsoft seem to word it during the VS2005 (msvcr80)

In the link to Anselm's notes:
http://developer.berlios.de/devlog/akruis/2012/06/10/msvcr90dll-and-mingw/ it's
worth looking at the section about the MinGW Runtime. There is some
patching required to get around the differences between the old CRT and the
newer CRTs where Microsoft decided to just delete functions and types! This
breaks the glue.

I haven't yet got around to patching the MinGW Runtime and trying
compilation with that, hopefully I will at the weekend, but time is very
tight at the moment.

We are a bit ahead of the curve on this really. But at least the MinGW guys
are gradually adding this support into MinGW.

Best Regards, Brian.

On 28 January 2013 20:00, Wayne Stambaugh <stambaughw@xxxxxxxxxxx> wrote:

> On 1/25/2013 9:55 AM, Brian Sidebotham wrote:
> <<<snipped>>>
> >
> >
> > Hi Wayne,
> >
> > Thanks for that information. I soon realised that this wasn't really the
> > way we should probably head, but at the time it seemed like useful
> > information. Sorry, I'm being a bit noisy on the list today!
> >
> > Anyway, the specs file modifications I mentioned in another mail seem
> > like a possible solution for linking MinGW executables against different
> > MS CRT versions. But I can't get round to testing until tonight.
> Brian,
> I wanted to give you a quick update.  I tried the spec file solution on
> the MinGW wiki and it appears that this syntax is no longer valid
> because it completely breaks the linker.  The variable expansion doesn't
> work properly.  I created a hard coded spec file from -dumpspec that
> defines -lmsvcr90 in the link option list and
> -D__MSVCRT_VERSION__=0x0900 in the compile option list.  This seemed to
> work except now the linker is complaining:
> c:/mingw/bin/../lib/gcc/mingw32/4.7.2\libstdc++.a(pure.o):(.text$__cxa_pure_virtual+0x1b):
> undefined reference to `write'
> c:/mingw/bin/../lib/gcc/mingw32/4.7.2\libstdc++.a(pure.o):(.text$__cxa_deleted_virtual+0x1b):
> undefined reference to `write'
> c:/mingw/bin/../lib/gcc/mingw32/4.7.2/../../../../mingw32/bin/ld.exe:
> c:/mingw/bin/../lib/gcc/mingw32/4.7.2\libstdc++.a(pure.o): bad reloc
> address 0x1b in section `.text$__cxa_deleted_virtual'
> collect2.exe: error: ld returned 1 exit status
> make[2]: *** [cvpcb/cvpcb.exe] Error 1
> make[1]: *** [cvpcb/CMakeFiles/cvpcb.dir/all] Error 2
> make: *** [all] Error 2
> I'm not sure which undefined reference to "write" that it's complaining
> about.  So this solution is not a slam dunk. There may be some KiCad
> changes required to make this work.  One nice thing is the latest
> version of the MinGW GCC compiler (4.7.2) includes all of the version
> specific link stubs for msvcrt in /mingw/lib.
> Wayne
> >
> > Best Regards, Brian.

Follow ups