Hi all,
I just tried to do a cmake build on win64 and (what did I expect?) it didn't work...
I followed the instructions at [1] but when linking libinkscape_base.dll I got the following errors:
[ 99%] Linking CXX shared library
..\lib\libinkscape_base.dll
CMakeFiles\inkscape_base.dir/objects.a(demangle.cpp.obj):demangle.cpp:(.text+0x278):
undefined reference to `strdup'
CMakeFiles\inkscape_base.dir/objects.a(xslt.cpp.obj):xslt.cpp:(.text+0x78b):
undefined reference to `close'
CMakeFiles\inkscape_base.dir/objects.a(script.cpp.obj):script.cpp:(.text+0x2a):
undefined reference to `close'
CMakeFiles\inkscape_base.dir/objects.a(script.cpp.obj):script.cpp:(.text+0x33):
undefined reference to `unlink'
CMakeFiles\inkscape_base.dir/objects.a(script.cpp.obj):script.cpp:(.text+0x166):
undefined reference to `close'
CMakeFiles\inkscape_base.dir/objects.a(script.cpp.obj):script.cpp:(.text+0x16f):
undefined reference to `unlink'
CMakeFiles\inkscape_base.dir/objects.a(script.cpp.obj):script.cpp:(.text+0x38e3):
undefined reference to `close'
CMakeFiles\inkscape_base.dir/objects.a(script.cpp.obj):script.cpp:(.text+0x38ed):
undefined reference to `unlink'
CMakeFiles\inkscape_base.dir/objects.a(script.cpp.obj):script.cpp:(.text+0x3d19):
undefined reference to `close'
CMakeFiles\inkscape_base.dir/objects.a(script.cpp.obj):script.cpp:(.text+0x3d23):
undefined reference to `unlink'
CMakeFiles\inkscape_base.dir/objects.a(script.cpp.obj):script.cpp:(.text+0x4998):
undefined reference to `close'
CMakeFiles\inkscape_base.dir/objects.a(emf-inout.cpp.obj):emf-inout.cpp:(.text+0xf21):
undefined reference to `strdup'
CMakeFiles\inkscape_base.dir/objects.a(emf-inout.cpp.obj):emf-inout.cpp:(.text+0xf82):
undefined reference to `strdup'
CMakeFiles\inkscape_base.dir/objects.a(emf-inout.cpp.obj):emf-inout.cpp:(.text+0x1356):
undefined reference to `strdup'
CMakeFiles\inkscape_base.dir/objects.a(emf-inout.cpp.obj):emf-inout.cpp:(.text+0x13e5):
undefined reference to `strdup'
CMakeFiles\inkscape_base.dir/objects.a(emf-inout.cpp.obj):emf-inout.cpp:(.text+0x18c3):
undefined reference to `strdup'
CMakeFiles\inkscape_base.dir/objects.a(emf-inout.cpp.obj):emf-inout.cpp:(.text+0x1c04):
more undefined references to `strdup' follow
CMakeFiles\inkscape_base.dir/objects.a(print.cpp.obj):print.cpp:(.text+0x296):
undefined reference to `close'
CMakeFiles\inkscape_base.dir/objects.a(print.cpp.obj):print.cpp:(.text+0x707):
undefined reference to `unlink'
CMakeFiles\inkscape_base.dir/objects.a(ink-comboboxentry-action.cpp.obj):ink-comboboxentry-action.cpp:(.text+0x17):
undefined reference to `strdup'
CMakeFiles\inkscape_base.dir/objects.a(color-profile.cpp.obj):color-profile.cpp:(.text+0x2193):
undefined reference to `read'
CMakeFiles\inkscape_base.dir/objects.a(color-profile.cpp.obj):color-profile.cpp:(.text+0x21d3):
undefined reference to `close'
CMakeFiles\inkscape_base.dir/objects.a(inkscape.cpp.obj):inkscape.cpp:(.text+0xcfa):
undefined reference to `unlink'
CMakeFiles\inkscape_base.dir/objects.a(prefix.cpp.obj):prefix.cpp:(.text+0x1b8):
undefined reference to `strdup'
CMakeFiles\inkscape_base.dir/objects.a(prefix.cpp.obj):prefix.cpp:(.text+0x348):
undefined reference to `strdup'
CMakeFiles\inkscape_base.dir/objects.a(prefix.cpp.obj):prefix.cpp:(.text+0x359):
undefined reference to `strdup'
CMakeFiles\inkscape_base.dir/objects.a(prefix.cpp.obj):prefix.cpp:(.text+0x4a2):
undefined reference to `strdup'
CMakeFiles\inkscape_base.dir/objects.a(prefix.cpp.obj):prefix.cpp:(.text+0x1a7):
undefined reference to `strdup'
CMakeFiles\inkscape_base.dir/objects.a(prefix.cpp.obj):prefix.cpp:(.text+0x328):
more undefined references to `strdup' follow
CMakeFiles\inkscape_base.dir/objects.a(winmain.cpp.obj):winmain.cpp:(.text+0x13):
undefined reference to `fileno'
CMakeFiles\inkscape_base.dir/objects.a(winmain.cpp.obj):winmain.cpp:(.text+0x23):
undefined reference to `fileno'
CMakeFiles\inkscape_base.dir/objects.a(winmain.cpp.obj):winmain.cpp:(.text+0xad):
undefined reference to `fileno'
CMakeFiles\inkscape_base.dir/objects.a(winmain.cpp.obj):winmain.cpp:(.text+0xb9):
undefined reference to `dup2'
CMakeFiles\inkscape_base.dir/objects.a(winmain.cpp.obj):winmain.cpp:(.text+0xdd):
undefined reference to `fileno'
CMakeFiles\inkscape_base.dir/objects.a(winmain.cpp.obj):winmain.cpp:(.text+0xe9):
undefined reference to `dup2'
CMakeFiles\inkscape_base.dir/objects.a(sp-filter.cpp.obj):sp-filter.cpp:(.text+0x42f):
undefined reference to `strdup'
CMakeFiles\inkscape_base.dir/objects.a(sp-filter.cpp.obj):sp-filter.cpp:(.text+0x4e2):
undefined reference to `strdup'
CMakeFiles\inkscape_base.dir/objects.a(sp-offset.cpp.obj):sp-offset.cpp:(.text+0x238a):
undefined reference to `strdup'
CMakeFiles\inkscape_base.dir/objects.a(sp-offset.cpp.obj):sp-offset.cpp:(.text+0x29d7):
undefined reference to `strdup'
../lib/lib2geom_LIB.a(bezier-clipping.cpp.obj):bezier-clipping.cpp:(.text.startup+0x6f):
undefined reference to `nextafter'
E:/Temp/Inkscape/build/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/5.3.0/../../../../x86_64-w64-mingw32/lib/../lib/libmingwex.a(lib64_libmingwex_a-mingw_vfprintf.o):mingw_vfprintf.c:(.text+0x11):
undefined reference to `_lock_file'
E:/Temp/Inkscape/build/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/5.3.0/../../../../x86_64-w64-mingw32/lib/../lib/libmingwex.a(lib64_libmingwex_a-mingw_vfprintf.o):mingw_vfprintf.c:(.text+0x33):
undefined reference to `_unlock_file'
E:/Temp/Inkscape/build/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/5.3.0/../../../../x86_64-w64-mingw32/lib/../lib/libmingwex.a(lib64_libmingwex_a-mingw_vprintf.o):mingw_vprintf.c:(.text+0x16):
undefined reference to `_lock_file'
E:/Temp/Inkscape/build/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/5.3.0/../../../../x86_64-w64-mingw32/lib/../lib/libmingwex.a(lib64_libmingwex_a-mingw_vprintf.o):mingw_vprintf.c:(.text+0x44):
undefined reference to `_unlock_file'
collect2.exe: error: ld returned 1 exit status
src\CMakeFiles\inkscape_base.dir\build.make:18858:
recipe for target 'lib/libinkscape_base.dll' failed
mingw32-make[2]: *** [lib/libinkscape_base.dll] Error 1
CMakeFiles\Makefile2:369: recipe for target
'src/CMakeFiles/inkscape_base.dir/all' failed
mingw32-make[1]: ***
[src/CMakeFiles/inkscape_base.dir/all] Error 2
Makefile:126: recipe for target 'all' failed
mingw32-make: *** [all] Error 2
I assume there's an issue with linking to the standard library,
but since I have no experience with CMake at all I don't have the
slightest idea where to start...
Anybody knows what might cause the issue and maybe even has a
solution?
Best Regards,
Eduard