← Back to team overview

kicad-developers team mailing list archive

Re: Python scripting cmake build macros.


On 1/25/2013 9:55 AM, Brian Sidebotham wrote:
> 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.


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:

undefined reference to `write'
undefined reference to `write'
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.


> Best Regards, Brian.

Follow ups