wxSQLIte3 from sources...

Talk here about issues with one of the components hosted at wxCode, or suggest features for it.
Post Reply
dkaip
Super wx Problem Solver
Super wx Problem Solver
Posts: 333
Joined: Wed Jan 20, 2010 1:15 pm

wxSQLIte3 from sources...

Post by dkaip »

Hello, very thanks for lib.
I am trying to compile minimal with only source files , so i post a piece of source CodeBlocks file, because compiler says ..
...wxsqlite3-3.5.9/src/wxsqlite3.cpp|1329|undefined reference to `sqlite3_column_database_name'
But there is at "sqlite3.h"

Code: Select all

<Compiler>
<Add option="-Wall" />
<Add option="-std=c++14" />
<Add option="`/home/a/wxWidgets-3.0.3/gtk-build/wx-config --cflags`" />
<Add directory="/home/a/wxsqlite3-3.5.9/include" />
<Add directory="/home/a/wxsqlite3-3.5.9/sqlite-amalgamation-3220000" />
<Add directory="/home/a/wxsqlite3-3.5.9/sqlite3/secure/src" />
</Compiler>
<Linker>
<Add option="`/home/a/wxWidgets-3.0.3/gtk-build/wx-config  --libs all`" />
</Linker>
<Unit filename="include/wx/wxsqlite3.h" />
<Unit filename="include/wx/wxsqlite3_version.h" />
<Unit filename="include/wx/wxsqlite3def.h" />
<Unit filename="include/wx/wxsqlite3dyn.h" />
<Unit filename="include/wx/wxsqlite3opt.h" />
<Unit filename="samples/minimal.cpp" />
<Unit filename="sqlite-amalgamation-3220000/sqlite3.c">
<Option compilerVar="CC" />
</Unit>
<Unit filename="sqlite-amalgamation-3220000/sqlite3.h" />
<Unit filename="sqlite-amalgamation-3220000/sqlite3ext.h" />
<Unit filename="src/wxsqlite3.cpp" />
Linux Mint, Gcc, CodeBlocks.
User avatar
xaviou
Super wx Problem Solver
Super wx Problem Solver
Posts: 437
Joined: Mon Aug 21, 2006 3:18 pm
Location: Annecy - France
Contact:

Re: wxSQLIte3 from sources...

Post by xaviou »

Hi.

When you get a "undefined reference to ...." error, it generaly comes from the linker.
And it generaly means you forgot a lib (or, in case you use gcc, your libs are not in the correct order)

In your case, it seems you didn't add the wxsqlite lib to your linker options.

Do it, and it should solve your problem.

Regards
Xav'
My wxWidgets stuff web page : X@v's wxStuff
utelle
Moderator
Moderator
Posts: 1125
Joined: Tue Jul 05, 2005 10:00 pm
Location: Cologne, Germany
Contact:

Re: wxSQLIte3 from sources...

Post by utelle »

dkaip wrote:Hello, very thanks for lib.
I am trying to compile minimal with only source files , so i post a piece of source CodeBlocks file, because compiler says ..
...wxsqlite3-3.5.9/src/wxsqlite3.cpp|1329|undefined reference to `sqlite3_column_database_name'
But there is at "sqlite3.h"

Code: Select all

<Compiler>
<Add option="-Wall" />
<Add option="-std=c++14" />
<Add option="`/home/a/wxWidgets-3.0.3/gtk-build/wx-config --cflags`" />
<Add directory="/home/a/wxsqlite3-3.5.9/include" />
<Add directory="/home/a/wxsqlite3-3.5.9/sqlite-amalgamation-3220000" />
<Add directory="/home/a/wxsqlite3-3.5.9/sqlite3/secure/src" />
</Compiler>
<Linker>
<Add option="`/home/a/wxWidgets-3.0.3/gtk-build/wx-config  --libs all`" />
</Linker>
<Unit filename="include/wx/wxsqlite3.h" />
<Unit filename="include/wx/wxsqlite3_version.h" />
<Unit filename="include/wx/wxsqlite3def.h" />
<Unit filename="include/wx/wxsqlite3dyn.h" />
<Unit filename="include/wx/wxsqlite3opt.h" />
<Unit filename="samples/minimal.cpp" />
<Unit filename="sqlite-amalgamation-3220000/sqlite3.c">
<Option compilerVar="CC" />
</Unit>
<Unit filename="sqlite-amalgamation-3220000/sqlite3.h" />
<Unit filename="sqlite-amalgamation-3220000/sqlite3ext.h" />
<Unit filename="src/wxsqlite3.cpp" />
Linux Mint, Gcc, CodeBlocks.
The wxSQLite3 distribution is self-contained. That is, you don't need to download the SQLite sources separately; they are included in subfolder sqlite3/secure/src of the wxSQLite3 distribution. No need for sqlite-amalgamation-3220000. (And usually wxSQLite3 is updated shortly after a release of a new SQLite3 version.)

There are several compile time options required to compile SQLite3 and wxSQLite3, some of them have to match, so that you don't get conflicts. For example, the option WXSQLITE3_HAVE_METADATA is enabled by default (see include/wx/wxsqlite3opt.h). However, this option requires that SQLite3 is compiled with the option SQLITE_ENABLE_COLUMN_METADATA. In your Code::Blocks project file I see no trace of any compile time options ... and this means you are seeking for trouble ... as you experienced.

Regards,

Ulrich
dkaip
Super wx Problem Solver
Super wx Problem Solver
Posts: 333
Joined: Wed Jan 20, 2010 1:15 pm

Re: wxSQLIte3 from sources...

Post by dkaip »

Thank you very match for instructions. I am just find some time to see it.
I hope to find a litle time to try.
Thank's
Jim.
dkaip
Super wx Problem Solver
Super wx Problem Solver
Posts: 333
Joined: Wed Jan 20, 2010 1:15 pm

Re: wxSQLIte3 from sources...

Post by dkaip »

Hello, now i have some time to try wxSqlite3 from sources.
I am taking an error in try to compile minimal in Linux Mint...
/home/a/repo/wxsqlite3/sqlite3secure/src/chacha20poly1305.c|85|error: unknown type name ‘size_t’|
I am sending the source code from CodeBlocks source file.
I have put the options ...
<Add option="-DSQLITE_ENABLE_COLUMN_METADATA" />
<Add option="-DWXSQLITE3_HAVE_METADATA" />
Thank you
Jim.

Code: Select all

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<CodeBlocks_project_file>
	<FileVersion major="1" minor="6" />
	<Project>
		<Option title="2" />
		<Option pch_mode="2" />
		<Option compiler="gcc" />
		<Build>
			<Target title="Debug">
				<Option output="bin/Debug/1" prefix_auto="1" extension_auto="1" />
				<Option object_output="obj/Debug/" />
				<Option type="0" />
				<Option compiler="gcc" />
				<Option projectLinkerOptionsRelation="2" />
				<Compiler>
					<Add option="-std=c++14" />
					<Add option="-g" />
				</Compiler>
			</Target>
			<Target title="Release">
				<Option output="bin/Release/1" prefix_auto="1" extension_auto="1" />
				<Option object_output="obj/Release/" />
				<Option type="0" />
				<Option compiler="gcc" />
				<Option projectLinkerOptionsRelation="2" />
				<Compiler>
					<Add option="-O2" />
				</Compiler>
				<Linker>
					<Add option="-s" />
				</Linker>
			</Target>
		</Build>
		<Compiler>
			<Add option="-Wall" />
			<Add option="-std=c++14" />
			<Add option="`wx-config --cflags`" />
			<Add option="-DSQLITE_ENABLE_COLUMN_METADATA" />
			<Add option="-DWXSQLITE3_HAVE_METADATA" />
			<Add directory="../wxsqlite3" />
			<Add directory="../wxsqlite3/src" />
			<Add directory="../wxsqlite3/include" />
		</Compiler>
		<Linker>
			<Add option="`wx-config --libs`" />
		</Linker>
		<Unit filename="../wxsqlite3/include/wx/wxsqlite3.h" />
		<Unit filename="../wxsqlite3/include/wx/wxsqlite3_version.h" />
		<Unit filename="../wxsqlite3/include/wx/wxsqlite3def.h" />
		<Unit filename="../wxsqlite3/include/wx/wxsqlite3dyn.h" />
		<Unit filename="../wxsqlite3/include/wx/wxsqlite3opt.h" />
		<Unit filename="../wxsqlite3/samples/minimal.cpp" />
		<Unit filename="../wxsqlite3/sqlite3secure/src/carray.c">
			<Option compilerVar="CC" />
		</Unit>
		<Unit filename="../wxsqlite3/sqlite3secure/src/chacha20poly1305.c">
			<Option compilerVar="CC" />
		</Unit>
		<Unit filename="../wxsqlite3/sqlite3secure/src/codec.c">
			<Option compilerVar="CC" />
		</Unit>
		<Unit filename="../wxsqlite3/sqlite3secure/src/codec.h" />
		<Unit filename="../wxsqlite3/sqlite3secure/src/codecext.c">
			<Option compilerVar="CC" />
		</Unit>
		<Unit filename="../wxsqlite3/sqlite3secure/src/csv.c">
			<Option compilerVar="CC" />
		</Unit>
		<Unit filename="../wxsqlite3/sqlite3secure/src/extensionfunctions.c">
			<Option compilerVar="CC" />
		</Unit>
		<Unit filename="../wxsqlite3/sqlite3secure/src/fastpbkdf2.c">
			<Option compilerVar="CC" />
		</Unit>
		<Unit filename="../wxsqlite3/sqlite3secure/src/fastpbkdf2.h" />
		<Unit filename="../wxsqlite3/sqlite3secure/src/fileio.c">
			<Option compilerVar="CC" />
		</Unit>
		<Unit filename="../wxsqlite3/sqlite3secure/src/md5.c">
			<Option compilerVar="CC" />
		</Unit>
		<Unit filename="../wxsqlite3/sqlite3secure/src/regexp.c">
			<Option compilerVar="CC" />
		</Unit>
		<Unit filename="../wxsqlite3/sqlite3secure/src/rekeyvacuum.c">
			<Option compilerVar="CC" />
		</Unit>
		<Unit filename="../wxsqlite3/sqlite3secure/src/rijndael.c">
			<Option compilerVar="CC" />
		</Unit>
		<Unit filename="../wxsqlite3/sqlite3secure/src/rijndael.h" />
		<Unit filename="../wxsqlite3/sqlite3secure/src/series.c">
			<Option compilerVar="CC" />
		</Unit>
		<Unit filename="../wxsqlite3/sqlite3secure/src/sha1.c">
			<Option compilerVar="CC" />
		</Unit>
		<Unit filename="../wxsqlite3/sqlite3secure/src/sha1.h" />
		<Unit filename="../wxsqlite3/sqlite3secure/src/sha2.c">
			<Option compilerVar="CC" />
		</Unit>
		<Unit filename="../wxsqlite3/sqlite3secure/src/sha2.h" />
		<Unit filename="../wxsqlite3/sqlite3secure/src/shathree.c">
			<Option compilerVar="CC" />
		</Unit>
		<Unit filename="../wxsqlite3/sqlite3secure/src/shell.c">
			<Option compilerVar="CC" />
		</Unit>
		<Unit filename="../wxsqlite3/sqlite3secure/src/sqlite3.c">
			<Option compilerVar="CC" />
		</Unit>
		<Unit filename="../wxsqlite3/sqlite3secure/src/sqlite3.h" />
		<Unit filename="../wxsqlite3/sqlite3secure/src/sqlite3.rc" />
		<Unit filename="../wxsqlite3/sqlite3secure/src/sqlite3ext.h" />
		<Unit filename="../wxsqlite3/sqlite3secure/src/sqlite3secure.c">
			<Option compilerVar="CC" />
		</Unit>
		<Unit filename="../wxsqlite3/sqlite3secure/src/sqlite3secure.h" />
		<Unit filename="../wxsqlite3/sqlite3secure/src/sqlite3userauth.h" />
		<Unit filename="../wxsqlite3/sqlite3secure/src/test_windirent.c">
			<Option compilerVar="CC" />
		</Unit>
		<Unit filename="../wxsqlite3/sqlite3secure/src/test_windirent.h" />
		<Unit filename="../wxsqlite3/sqlite3secure/src/userauth.c">
			<Option compilerVar="CC" />
		</Unit>
		<Unit filename="../wxsqlite3/src/wxsqlite3.cpp" />
		<Extensions>
			<envvars />
			<code_completion />
			<lib_finder disable_auto="1" />
			<debugger />
		</Extensions>
	</Project>
</CodeBlocks_project_file>
utelle
Moderator
Moderator
Posts: 1125
Joined: Tue Jul 05, 2005 10:00 pm
Location: Cologne, Germany
Contact:

Re: wxSQLIte3 from sources...

Post by utelle »

dkaip wrote:Hello, now i have some time to try wxSqlite3 from sources.
I am taking an error in try to compile minimal in Linux Mint...
/home/a/repo/wxsqlite3/sqlite3secure/src/chacha20poly1305.c|85|error: unknown type name ‘size_t’|
Obviously you try to compile the source files in wxsqlite3/sqlite3secure/src separately. This is not how it works.

The only file from directory wxsqlite3/sqlite3secure/src you have to compile is sqlite3secure.c. This file automatically includes all other required source files. The current version 4.0.4 of wxSQLite3 defines the following symbols as default:

Code: Select all

    THREADSAFE=1
    SQLITE_MAX_ATTACHED=10
    SQLITE_SOUNDEX
    SQLITE_ENABLE_COLUMN_METADATA
    SQLITE_HAS_CODEC=1
    CODEC_TYPE=CODEC_TYPE_CHACHA20
    SQLITE_SECURE_DELETE
    SQLITE_ENABLE_FTS3
    SQLITE_ENABLE_FTS3_PARENTHESIS
    SQLITE_ENABLE_FTS4
    SQLITE_ENABLE_FTS5
    SQLITE_ENABLE_JSON1
    SQLITE_ENABLE_RTREE
    SQLITE_CORE
    SQLITE_ENABLE_EXTFUNC
    SQLITE_ENABLE_CSV
    SQLITE_ENABLE_SHA3
    SQLITE_ENABLE_CARRAY
    SQLITE_ENABLE_FILEIO
    SQLITE_ENABLE_SERIES
    SQLITE_TEMP_STORE=2
    SQLITE_USE_URI
    SQLITE_USER_AUTHENTICATION
And for the wxWidgets wrapper the following defines are used:

Code: Select all

    wxUSE_DYNAMIC_SQLITE3_LOAD=0
    WXSQLITE3_HAVE_METADATA=1
    WXSQLITE3_USER_AUTHENTICATION=1
    WXSQLITE3_HAVE_CODEC=1
    WXSQLITE3_HAVE_LOAD_EXTENSION=0
Good luck!

Regards,

Ulrich
dkaip
Super wx Problem Solver
Super wx Problem Solver
Posts: 333
Joined: Wed Jan 20, 2010 1:15 pm

Re: wxSQLIte3 from sources...

Post by dkaip »

Hello. Now it seems much better. But i have a little problem...
Something i don’t make with right way.
I send the last C::B file.

Thank you
Jim.
/usr/bin/ld: obj/Debug/wxsqlite3/sqlite3secure/src/sqlite3secure.o||undefined reference to symbol 'dlclose@@GLIBC_2.2.5'|

Code: Select all

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<CodeBlocks_project_file>
	<FileVersion major="1" minor="6" />
	<Project>
		<Option title="2" />
		<Option pch_mode="2" />
		<Option compiler="gcc" />
		<Build>
			<Target title="Debug">
				<Option output="bin/Debug/1" prefix_auto="1" extension_auto="1" />
				<Option object_output="obj/Debug/" />
				<Option type="0" />
				<Option compiler="gcc" />
				<Option projectLinkerOptionsRelation="2" />
				<Compiler>
					<Add option="-std=c++14" />
					<Add option="-g" />
				</Compiler>
			</Target>
			<Target title="Release">
				<Option output="bin/Release/1" prefix_auto="1" extension_auto="1" />
				<Option object_output="obj/Release/" />
				<Option type="0" />
				<Option compiler="gcc" />
				<Option projectLinkerOptionsRelation="2" />
				<Compiler>
					<Add option="-O2" />
				</Compiler>
				<Linker>
					<Add option="-s" />
				</Linker>
			</Target>
		</Build>
		<Compiler>
			<Add option="-Wall" />
			<Add option="-std=c++14" />
			<Add option="`wx-config --cflags`" />
			<Add option="-DwxUSE_DYNAMIC_SQLITE3_LOAD=0" />
			<Add option="-DWXSQLITE3_HAVE_METADATA=1" />
			<Add option="-DWXSQLITE3_USER_AUTHENTICATION=1" />
			<Add option="-DWXSQLITE3_HAVE_CODEC=1" />
			<Add option="-DWXSQLITE3_HAVE_LOAD_EXTENSION=0" />
			<Add directory="../wxsqlite3" />
			<Add directory="../wxsqlite3/src" />
			<Add directory="../wxsqlite3/include" />
			<Add directory="../wxsqlite3/sqlite3secure/src" />
		</Compiler>
		<Linker>
			<Add option="`wx-config --libs`" />
		</Linker>
		<Unit filename="../wxsqlite3/include/wx/wxsqlite3.h" />
		<Unit filename="../wxsqlite3/include/wx/wxsqlite3_version.h" />
		<Unit filename="../wxsqlite3/include/wx/wxsqlite3def.h" />
		<Unit filename="../wxsqlite3/include/wx/wxsqlite3dyn.h" />
		<Unit filename="../wxsqlite3/include/wx/wxsqlite3opt.h" />
		<Unit filename="../wxsqlite3/samples/minimal.cpp" />
		<Unit filename="../wxsqlite3/sqlite3secure/src/sqlite3secure.c">
			<Option compilerVar="CC" />
		</Unit>
		<Unit filename="../wxsqlite3/src/wxsqlite3.cpp" />
		<Extensions>
			<envvars />
			<code_completion />
			<lib_finder disable_auto="1" />
			<debugger />
		</Extensions>
	</Project>
</CodeBlocks_project_file>
utelle
Moderator
Moderator
Posts: 1125
Joined: Tue Jul 05, 2005 10:00 pm
Location: Cologne, Germany
Contact:

Re: wxSQLIte3 from sources...

Post by utelle »

dkaip wrote:Now it seems much better. But i have a little problem...
Something i don’t make with right way.
I send the last C::B file.
I don't know and haven't used Code::Blocks myself. So most likely I will be of little help to solve C::B issues.
dkaip wrote:
/usr/bin/ld: obj/Debug/wxsqlite3/sqlite3secure/src/sqlite3secure.o||undefined reference to symbol 'dlclose@@GLIBC_2.2.5'|
However, this error message indicates that the linker requires you to link your application against libdl. You will have to add for the linker something like

Code: Select all

		<Add option="-ldl" />
Additionally, I see no trace of all the SQlite related preprocessor symbols I listed in my previous post in the C::B config file. Although compiling will usually not fail, if the symbols are missing, executing the application will most likely fail.

Regards,

Ulrich
dkaip
Super wx Problem Solver
Super wx Problem Solver
Posts: 333
Joined: Wed Jan 20, 2010 1:15 pm

Re: wxSQLIte3 from sources...

Post by dkaip »

Hi, it works, no compile error.

I am putting C::B code for LINUX MINT for use of anybody.
I am thinking, all developers make so much pain for all that.
It will nice to write books like wxWidgets book, with all details of products, so in case to can anyone helps in future and to take some money from books. I have buy wxWidgets the book and the online version.
Best regards and thank you again.
Jim.

Code: Select all

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<CodeBlocks_project_file>
	<FileVersion major="1" minor="6" />
	<Project>
		<Option title="2" />
		<Option pch_mode="2" />
		<Option compiler="gcc" />
		<Build>
			<Target title="Debug">
				<Option output="bin/Debug/1" prefix_auto="1" extension_auto="1" />
				<Option object_output="obj/Debug/" />
				<Option type="0" />
				<Option compiler="gcc" />
				<Option projectLinkerOptionsRelation="2" />
				<Compiler>
					<Add option="-std=c++14" />
					<Add option="-g" />
				</Compiler>
			</Target>
			<Target title="Release">
				<Option output="bin/Release/1" prefix_auto="1" extension_auto="1" />
				<Option object_output="obj/Release/" />
				<Option type="0" />
				<Option compiler="gcc" />
				<Option projectLinkerOptionsRelation="2" />
				<Compiler>
					<Add option="-O2" />
				</Compiler>
				<Linker>
					<Add option="-s" />
					<Add option="-ldl" />
				</Linker>
			</Target>
		</Build>
		<Compiler>
			<Add option="-Wall" />
			<Add option="-std=c++14" />
			<Add option="`wx-config --cflags`" />
			<Add option="-DTHREADSAFE=1" />
			<Add option="-DSQLITE_MAX_ATTACHED=10" />
			<Add option="-DSQLITE_SOUNDEX" />
			<Add option="-DSQLITE_ENABLE_COLUMN_METADATA" />
			<Add option="-DSQLITE_HAS_CODEC=1" />
			<Add option="-DCODEC_TYPE=CODEC_TYPE_CHACHA20" />
			<Add option="-DSQLITE_SECURE_DELETE" />
			<Add option="-DSQLITE_ENABLE_FTS3" />
			<Add option="-DSQLITE_ENABLE_FTS3_PARENTHESIS" />
			<Add option="-DSQLITE_ENABLE_FTS4" />
			<Add option="-DSQLITE_ENABLE_FTS5" />
			<Add option="-DSQLITE_ENABLE_JSON1" />
			<Add option="-DSQLITE_ENABLE_RTREE" />
			<Add option="-DSQLITE_CORE" />
			<Add option="-DSQLITE_ENABLE_EXTFUNC" />
			<Add option="-DSQLITE_ENABLE_CSV" />
			<Add option="-DSQLITE_ENABLE_SHA3" />
			<Add option="-DSQLITE_ENABLE_CARRAY" />
			<Add option="-DSQLITE_ENABLE_FILEIO" />
			<Add option="-DSQLITE_ENABLE_SERIES" />
			<Add option="-DSQLITE_TEMP_STORE=2" />
			<Add option="-DSQLITE_USE_URI" />
			<Add option="-DSQLITE_USER_AUTHENTICATION" />
			<Add option="-DwxUSE_DYNAMIC_SQLITE3_LOAD=0" />
			<Add option="-DWXSQLITE3_HAVE_METADATA=1" />
			<Add option="-DWXSQLITE3_USER_AUTHENTICATION=1" />
			<Add option="-DWXSQLITE3_HAVE_CODEC=1" />
			<Add option="-DWXSQLITE3_HAVE_LOAD_EXTENSION=0" />
			<Add directory="../wxsqlite3" />
			<Add directory="../wxsqlite3/src" />
			<Add directory="../wxsqlite3/include" />
			<Add directory="../wxsqlite3/sqlite3secure/src" />
		</Compiler>
		<Linker>
			<Add option="`wx-config --libs`" />
			<Add option="-ldl" />
		</Linker>
		<Unit filename="../wxsqlite3/include/wx/wxsqlite3.h" />
		<Unit filename="../wxsqlite3/include/wx/wxsqlite3_version.h" />
		<Unit filename="../wxsqlite3/include/wx/wxsqlite3def.h" />
		<Unit filename="../wxsqlite3/include/wx/wxsqlite3dyn.h" />
		<Unit filename="../wxsqlite3/include/wx/wxsqlite3opt.h" />
		<Unit filename="../wxsqlite3/samples/minimal.cpp" />
		<Unit filename="../wxsqlite3/sqlite3secure/src/sqlite3secure.c">
			<Option compilerVar="CC" />
		</Unit>
		<Unit filename="../wxsqlite3/sqlite3secure/src/sqlite3secure.h" />
		<Unit filename="../wxsqlite3/src/wxsqlite3.cpp" />
		<Extensions>
			<envvars />
			<code_completion />
			<lib_finder disable_auto="1" />
			<debugger />
		</Extensions>
	</Project>
</CodeBlocks_project_file>
ouch67
Earned some good credits
Earned some good credits
Posts: 135
Joined: Sun Mar 23, 2008 12:09 am

Re: wxSQLIte3 from sources...

Post by ouch67 »

I noticed your using direct directory references in CodeBlocks. You should really avoid doing that and use global variables instead. This insures all the project files, libraries and other necessary things will be found on any computer no matter where the files get installed or what operating system it's running on as long as the global variables are set up properly on that computer.

Plus it cleans up your project file a bit and makes it easier to read.

For instance, one of your search include directory settings goes from looking like this:

/home/a/wxsqlite3-3.5.9/include

to

$(#wxsqlite3.include)

Which makes it far easier to read and understand what it is and why it's there.
dkaip
Super wx Problem Solver
Super wx Problem Solver
Posts: 333
Joined: Wed Jan 20, 2010 1:15 pm

Re: wxSQLIte3 from sources...

Post by dkaip »

That is right way as you say.
Thank you.
Jim
dkaip
Super wx Problem Solver
Super wx Problem Solver
Posts: 333
Joined: Wed Jan 20, 2010 1:15 pm

Re: wxSQLIte3 from sources...

Post by dkaip »

Hello.
This time i am trying to compile minimal last download version from sources in windows 10.
But i am taking error ...

C:\wxsqlite3\sqlite3secure\src\chacha20poly1305.c|347|undefined reference to `SystemFunction036@8'|


defines are ...

Code: Select all

__GNUWIN32__
__WXMSW__
wxUSE_UNICODE
_WIN32
THREADSAFE=1
SQLITE_MAX_ATTACHED=10
SQLITE_SOUNDEX
SQLITE_ENABLE_COLUMN_METADATA
SQLITE_HAS_CODEC=1
CODEC_TYPE=CODEC_TYPE_CHACHA20
SQLITE_SECURE_DELETE
SQLITE_ENABLE_FTS3
SQLITE_ENABLE_FTS3_PARENTHESIS
SQLITE_ENABLE_FTS4
SQLITE_ENABLE_FTS5
SQLITE_ENABLE_JSON1
SQLITE_ENABLE_RTREE
SQLITE_CORE
SQLITE_ENABLE_EXTFUNC
SQLITE_ENABLE_CSV
SQLITE_ENABLE_SHA3
SQLITE_ENABLE_CARRAY
SQLITE_ENABLE_FILEIO
SQLITE_ENABLE_SERIES
SQLITE_TEMP_STORE=2
SQLITE_USE_URI
SQLITE_USER_AUTHENTICATION
wxUSE_DYNAMIC_SQLITE3_LOAD=0
WXSQLITE3_HAVE_METADATA=1
WXSQLITE3_USER_AUTHENTICATION=1
WXSQLITE3_HAVE_CODEC=1
WXSQLITE3_HAVE_LOAD_EXTENSION=0
SQLITE_ENABLE_DEBUG=0
SQLITE_ENABLE_EXPLAIN_COMMENTS
linker settings ...
<Linker>
<Add option="-static" />
<Add library="advapi32" />
<Add library="../../wxWidgets-3.0.4/lib/gcc_lib/libwxmsw30u.a" />
<Add library="../../wxWidgets-3.0.4/lib/gcc_lib/libwxmsw30u_gl.a" />
<Add library="../../wxWidgets-3.0.4/lib/gcc_lib/libwxregexu.a" />
<Add library="../../wxWidgets-3.0.4/lib/gcc_lib/libwxexpat.a" />
<Add library="../../wxWidgets-3.0.4/lib/gcc_lib/libwxjpeg.a" />
<Add library="../../wxWidgets-3.0.4/lib/gcc_lib/libwxpng.a" />
<Add library="../../wxWidgets-3.0.4/lib/gcc_lib/libwxscintilla.a" />
<Add library="../../wxWidgets-3.0.4/lib/gcc_lib/libwxtiff.a" />
<Add library="../../wxWidgets-3.0.4/lib/gcc_lib/libwxzlib.a" />
<Add library="libkernel32.a" />
<Add library="libuser32.a" />
<Add library="libgdi32.a" />
<Add library="libwinspool.a" />
<Add library="libcomdlg32.a" />
<Add library="libadvapi32.a" />
<Add library="libshell32.a" />
<Add library="libole32.a" />
<Add library="liboleaut32.a" />
<Add library="libuuid.a" />
<Add library="libcomctl32.a" />
<Add library="libwsock32.a" />
<Add library="libodbc32.a" />
<Add library="msvcrt" />
Thank you
Jim.
utelle
Moderator
Moderator
Posts: 1125
Joined: Tue Jul 05, 2005 10:00 pm
Location: Cologne, Germany
Contact:

Re: wxSQLIte3 from sources...

Post by utelle »

dkaip wrote:Hello.
This time i am trying to compile minimal last download version from sources in windows 10.
But i am taking error ...

Code: Select all

C:\wxsqlite3\sqlite3secure\src\chacha20poly1305.c|347|undefined reference to `SystemFunction036@8'|
SystemFunction036 corresponds to RtlGenRandom, a function that is part of the Windows DLL advapi32.dll - and that was the case even for Windows versions as old as Windows XP.

You didn't tell in your post, but I suspect that you may be using a C++ compiler like TDM-GCC 5.1.0. Unfortunately, the link library libadvapi32.a coming with that compiler does not export the function SystemFunction036 for whatever reason. There may be other affected older GCC versions out there.

AFAIK the link library libadvapi32.a of all recent versions of MinGW does export SystemFunction036. That is, I would recommend that you use a recent MinGW compiler version.

Regards,

Ulrich
dkaip
Super wx Problem Solver
Super wx Problem Solver
Posts: 333
Joined: Wed Jan 20, 2010 1:15 pm

Re: wxSQLIte3 from sources...

Post by dkaip »

Yes, as i see i have the C:\Program Files (x86)\CodeBlocks\MinGW compiler from CodeBlocks installation, the TDM-GCC. I will try newer compiler and i will upload the source cbp file soon i have some time.
Thank you.
Jim
Post Reply