Page 1 of 1

[Windows] Linking bin/minetest.exe fails

PostPosted: Tue Mar 22, 2016 21:25
by Ryster
I've followed all the instructions I could find to build under windows 32bit.
Using MinGW
CMake configures and generates ok, it compiles, but then when it get to linking (link.txt) I get hundreds of

I:/MineTest_build/sqlite-3.8.7.4/bin/sqlite3.lib(sqlite3.dir/Release/sqlite3.obj):(.text[_sqliteblahblahblah]+hexnumber): undefined reference to 'variable_blahblahblah'

I'm using sqlite-3.8.7.4 , DIR is my base dir that all libraries are located in

SQLITE3_LIBRARY = DIR/sqlite-3.8.7.4/bin/sqlite3.lib
SQLITE3_INCLUDE_DIR = DIR/sqlite-3.8.7.4/include (it has sqlite3.h in it)

do I not have something in the correct place?
would any other information help diagnose this?

Re: [Windows] Linking bin/minetest.exe fails

PostPosted: Wed Mar 23, 2016 17:44
by Krock
Did you compile that sqlite3.lib with MinGW or is it a pre-compiled library? Compile it on your machine and try again.

If you need a CMakeLists.txt for this, use this (stupid simple) code:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
cmake_minimum_required(VERSION 2.6)

if(MSVC)
   set(CMAKE_C_FLAGS_RELEASE "/MT /O2 /Ob2 /D NDEBUG")
endif()

add_library(sqlite3 "sqlite3.c")
target_link_libraries(sqlite3)

Re: [Windows] Linking bin/minetest.exe fails

PostPosted: Mon Apr 04, 2016 20:53
by Ryster
I used a precompiled ver, I'll try to compile it, thanks.