← Back to team overview

kicad-developers team mailing list archive

Re: Python scripting cmake build macros.

 

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

> 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.
>

Hi Wayne,

You might want to check -lmoldname90 is included and correct. Looking at
moldname.def.in in the mingwrt (technically the mingw-org-wsl now!) sources
includes a definition to write.

I was only looking as I don't know what -lmoldname has to do with this
problem, but it is a required component of linking - it appears to contain
the original crt functions.

Best Regards, Brian.

Best Regards, Brian.

References