wxSQLite - how to build?  [SOLVED]

Talk here about issues with one of the components hosted at wxCode, or suggest features for it.
evstevemd
Part Of The Furniture
Part Of The Furniture
Posts: 2033
Joined: Wed Jan 28, 2009 11:57 am
Location: United Republic of Tanzania
Contact:

Re: wxSQLite - how to build?

Postby evstevemd » Fri Oct 02, 2015 12:54 pm

sly_chandan wrote:So u r saying that wxsqllite3 should be compiled separately....

Yes!

sly_chandan wrote:I need to go to the folder C:\wxsqlite3-3.2.1\wxsqlite3-3.2.1\build

and run the following command:

mingw32-make -f makefile.gcc

This does not compile the sqllite

C:\wxsqlite3-3.2.1\wxsqlite3-3.2.1\build is general build folder. For windows you need to get into msw, i.e C:\wxsqlite3-3.2.1\wxsqlite3-3.2.1\build
\msw and run command there

Note its wxSQLite3 not SQLite3. They are distinct
Chief Justice: We have trouble dear citizens!
Citizens: What it is his honor?
Chief Justice:Our president is an atheist, who will he swear to?
[Ubuntu 15.04/Windows 10 Pro - GCC/MinGW, CodeLite IDE et al]

sly_chandan
Knows some wx things
Knows some wx things
Posts: 41
Joined: Fri Sep 25, 2015 2:33 pm

Re: wxSQLite - how to build?

Postby sly_chandan » Fri Oct 02, 2015 1:03 pm

wxSQLite3 does not have C:\wxsqlite3-3.2.1\wxsqlite3-3.2.1\build\msw folder.


Where is the msw folder?

the build folder has makefile.gcc file

evstevemd
Part Of The Furniture
Part Of The Furniture
Posts: 2033
Joined: Wed Jan 28, 2009 11:57 am
Location: United Republic of Tanzania
Contact:

Re: wxSQLite - how to build?

Postby evstevemd » Fri Oct 02, 2015 1:13 pm

then your command should work.
If its not working post build log.
am not in front of your machine!
Chief Justice: We have trouble dear citizens!
Citizens: What it is his honor?
Chief Justice:Our president is an atheist, who will he swear to?
[Ubuntu 15.04/Windows 10 Pro - GCC/MinGW, CodeLite IDE et al]

sly_chandan
Knows some wx things
Knows some wx things
Posts: 41
Joined: Fri Sep 25, 2015 2:33 pm

Re: wxSQLite - how to build?

Postby sly_chandan » Fri Oct 02, 2015 1:22 pm

When I run the command.....this is what I get


C:\wxsqlite3-3.2.1\wxsqlite3-3.2.1\build>mingw32-make -f makefile.gcc
----------------------------------------------------------------------------
The selected wxWidgets build is not available!
Please use the options prefixed with WX_ to select another wxWidgets build.
----------------------------------------------------------------------------
makefile.gcc:276: recipe for target 'test_for_selected_wxbuild' failed
mingw32-make: *** [test_for_selected_wxbuild] Error 1

This is what Ulrich typed in.....

The error message you experience is emitted by make when the following file

$(WX_DIR)$(WXLIBPATH)\msw$(WXLIBPOSTFIX)\wx\setup.h

was not found. WX_DIR is set to the value of WXWIN within the makefile.

Try to use the make option -v to find out where make looks for this file.

Regards,

Ulrich

What does that mean????

evstevemd
Part Of The Furniture
Part Of The Furniture
Posts: 2033
Joined: Wed Jan 28, 2009 11:57 am
Location: United Republic of Tanzania
Contact:

Re: wxSQLite - how to build?

Postby evstevemd » Fri Oct 02, 2015 1:49 pm

sly_chandan wrote:When I run the command.....this is what I get


C:\wxsqlite3-3.2.1\wxsqlite3-3.2.1\build>mingw32-make -f makefile.gcc
----------------------------------------------------------------------------
The selected wxWidgets build is not available!
Please use the options prefixed with WX_ to select another wxWidgets build.
----------------------------------------------------------------------------
makefile.gcc:276: recipe for target 'test_for_selected_wxbuild' failed
mingw32-make: *** [test_for_selected_wxbuild] Error 1

Can you tell me the WXWIN folder path step again?

First Build wxWidgets using command below

Code: Select all

mingw32-make SHELL=CMD.exe -j4 -f makefile.gcc BUILD=debug UNICODE=1 SHARED=1


Remember to run make clean before that command.
Then Open makefile.gcc and modify the following lines

Code: Select all

# Use DLL build of wx library? [0,1]
WX_SHARED ?= 0 // change to 1
# Version of the wx library to build against.
WX_VERSION ?= 28  //change to 30
# The directory where wxWidgets library is installed
WX_DIR ?= $(WXWIN) //replace $(WXWIN) with full path to wx folder


Then compile with same command

Code: Select all

mingw32-make SHELL=CMD.exe -j4 -f makefile.gcc BUILD=debug UNICODE=1 SHARED=1
Chief Justice: We have trouble dear citizens!
Citizens: What it is his honor?
Chief Justice:Our president is an atheist, who will he swear to?
[Ubuntu 15.04/Windows 10 Pro - GCC/MinGW, CodeLite IDE et al]

sly_chandan
Knows some wx things
Knows some wx things
Posts: 41
Joined: Fri Sep 25, 2015 2:33 pm

Re: wxSQLite - how to build?

Postby sly_chandan » Fri Oct 02, 2015 1:56 pm

I have run the following command

First Build wxWidgets using command below
mingw32-make SHELL=CMD.exe -j4 -f makefile.gcc BUILD=debug UNICODE=1 SHARED=1

What is the make clean command now?
Last edited by sly_chandan on Fri Oct 02, 2015 2:10 pm, edited 2 times in total.

evstevemd
Part Of The Furniture
Part Of The Furniture
Posts: 2033
Joined: Wed Jan 28, 2009 11:57 am
Location: United Republic of Tanzania
Contact:

Re: wxSQLite - how to build?

Postby evstevemd » Fri Oct 02, 2015 2:04 pm

sly_chandan wrote:I have run the following command

First Build wxWidgets using command below
mingw32-make SHELL=CMD.exe -j4 -f makefile.gcc BUILD=debug UNICODE=1 SHARED=1

What is the make clean command now?
Can you please be precise....I am new to all of this....


Code: Select all

mingw32-make SHELL=CMD.exe -j4 -f makefile.gcc  clean
mingw32-make SHELL=CMD.exe -j4 -f makefile.gcc BUILD=debug UNICODE=1 SHARED=1
Chief Justice: We have trouble dear citizens!
Citizens: What it is his honor?
Chief Justice:Our president is an atheist, who will he swear to?
[Ubuntu 15.04/Windows 10 Pro - GCC/MinGW, CodeLite IDE et al]

sly_chandan
Knows some wx things
Knows some wx things
Posts: 41
Joined: Fri Sep 25, 2015 2:33 pm

Re: wxSQLite - how to build?

Postby sly_chandan » Fri Oct 02, 2015 2:11 pm

I missed doing the clean command....is it neccessary????


After that I have done the following...


I have changed the wsqlite3 makefile.gcc file with the changes you mentioned in the wx_dir, wx_version, wx_shared....

I am going to run this command on wsqlite3

mingw32-make SHELL=CMD.exe -j4 -f makefile.gcc BUILD=debug UNICODE=1 SHARED=1


Is that all right?

evstevemd
Part Of The Furniture
Part Of The Furniture
Posts: 2033
Joined: Wed Jan 28, 2009 11:57 am
Location: United Republic of Tanzania
Contact:

Re: wxSQLite - how to build?

Postby evstevemd » Fri Oct 02, 2015 2:22 pm

Necessary to clean out the object files (.o files) libraries and exes
Not necessary to successful build.

Go ahead ....!
Chief Justice: We have trouble dear citizens!
Citizens: What it is his honor?
Chief Justice:Our president is an atheist, who will he swear to?
[Ubuntu 15.04/Windows 10 Pro - GCC/MinGW, CodeLite IDE et al]

sly_chandan
Knows some wx things
Knows some wx things
Posts: 41
Joined: Fri Sep 25, 2015 2:33 pm

Re: wxSQLite - how to build?

Postby sly_chandan » Fri Oct 02, 2015 2:26 pm

This is what I have got now.....

C:\wxsqlite3-3.2.1\wxsqlite3-3.2.1\build>mingw32-make SHELL=CMD.exe -j4 -f makefile.gcc BUILD=debug UNICODE=1 SHARED=1
if not exist gccmswud_dll mkdir gccmswud_dll
if not exist ..\lib\gcc_dll mkdir ..\lib\gcc_dll
g++ -c -o gccmswud_dll\wxsqlite3_dll_wxsqlite3.o -DHAVE_W32API_H -DWXUSINGDLL -D_UNICODE -D__WXDEBUG__ -D__WXMSW__ -IC:\
wxWidgets-3.0.2 Build this wxCode component as DLL or as static library? [0,1]\lib\gcc_dll\mswud -IC:\wxWidgets-3.0.2 Bu
ild this wxCode component as DLL or as static library? [0,1]\include -O0 -g -W -Wall -I..\include -DWXMAKINGDLL_WXSQLITE
3 -DwxUSE_DYNAMIC_SQLITE3_LOAD=0 -DWXSQLITE3_HAVE_METADATA=0 -DWXSQLITE3_HAVE_CODEC=0 -DWXSQLITE3_HAVE_LOAD_EXTENSION=0
-I..\sqlite3\include -MTgccmswud_dll\wxsqlite3_dll_wxsqlite3.o -MFgccmswud_dll\wxsqlite3_dll_wxsqlite3.o.d -MD -MP ../
src/wxsqlite3.cpp
g++ -c -o gccmswud_dll\minimal_minimal.o -DHAVE_W32API_H -DWXUSINGDLL -D_UNICODE -D__WXDEBUG__ -D__WXMSW__ -IC:\wxWidget
s-3.0.2 Build this wxCode component as DLL or as static library? [0,1]\lib\gcc_dll\mswud -IC:\wxWidgets-3.0.2 Build this
wxCode component as DLL or as static library? [0,1]\include -O0 -g -W -Wall -I..\include -I..\samples -I..\sqlite3\incl
ude -MTgccmswud_dll\minimal_minimal.o -MFgccmswud_dll\minimal_minimal.o.d -MD -MP ../samples/minimal.cpp
g++: error: Build: No such file or directory
g++: error: this: No such file or directory
g++: error: wxCode: No such file or directory
g++: error: component: No such file or directory
g++: error: as: No such file or directory
g++: error: DLL: No such file or directory
g++: error: or: No such file or directory
g++: error: as: No such file or directory
g++: error: static: No such file or directory
g++: error: library?: Invalid argument
g++: error: [0,1]\lib\gcc_dll\mswud: No such file or directory
g++: error: Build: No such file or directory
g++: error: this: No such file or directory
g++: error: wxCode: No such file or directory
g++: error: component: No such file or directory
g++: error: as: No such file or directory
g++: error: DLL: No such file or directory
g++: error: or: No such file or directory
g++: error: as: No such file or directory
g++: error: static: No such file or directory
g++: error: library?: Invalid argument
g++: error: [0,1]\include: No such file or directory
windres --use-temp-file -i../samples/minimal.rc -ogccmswud_dll\minimal_minimal_rc.o --define HAVE_W32API_H --define WXU
SINGDLL --define _UNICODE --define __WXDEBUG__ --define __WXMSW__ --include-dir C:\wxWidgets-3.0.2 Build this wxCode com
ponent as DLL or as static library? [0,1]\lib\gcc_dll\mswud --include-dir C:\wxWidgets-3.0.2 Build this wxCode component
as DLL or as static library? [0,1]/include --include-dir ../include --include-dir ../samples --include-dir ..\sqliteg++
: error: Build: No such file or directory
3\include
g++: error: this: No such file or directory
g++: error: wxCode: No such file or directory
g++: error: component: No such file or directory
g++: error: as: No such file or directory
g++: error: DLL: No such file or directory
g++: error: or: No such file or directory
g++: error: as: No such file or directory
g++: error: static: No such file or directory
g++: error: library?: Invalid argument
g++: error: [0,1]\lib\gcc_dll\mswud: No such file or directory
g++: error: Build: No such file or directory
g++: error: this: No such file or directory
makefile.gcc:311: recipe for targetg++: error: wxCode: No such file or directory
'g++: error: component: No such file or directory
gg++: error: as: No such file or directory
ccmswud_dll\wxsqlite3_dll_wxsqlite3.o' failed
g++: error: DLL: No such file or directory
mg++: error: or: No such file or directory
ig++: error: as: No such file or directory
ng++: error: static: No such file or directory
gg++: error: library?: Invalid argument
wg++: error: [0,1]\include: No such file or directory
32-make: *** [gccmswud_dll\wxsqlite3_dll_wxsqlite3.o] Error 1
mingw32-make: *** Waiting for unfinished jobs....
makefile.gcc:314: recipe for target 'gccmswud_dll\minimal_minimal.o' failed
mingw32-make: *** [gccmswud_dll\minimal_minimal.o] Error 1
Usage: windres [option(s)] [input-file] [output-file]
The options are:
-i --input=<file> Name input file
-o --output=<file> Name output file
-J --input-format=<format> Specify input format
-O --output-format=<format> Specify output format
-F --target=<target> Specify COFF target
--preprocessor=<program> Program to use to preprocess rc file
--preprocessor-arg=<arg> Additional preprocessor argument
-I --include-dir=<dir> Include directory when preprocessing rc file
-D --define <sym>[=<val>] Define SYM when preprocessing rc file
-U --undefine <sym> Undefine SYM when preprocessing rc file
-v --verbose Verbose - tells you what it's doing
-c --codepage=<codepage> Specify default codepage
-l --language=<val> Set language when reading rc file
--use-temp-file Use a temporary file instead of popen to read
the preprocessor output
--no-use-temp-file Use popen (default)
-r Ignored for compatibility with rc
@<file> Read options from <file>
-h --help Print this help message
-V --version Print version information
FORMAT is one of rc, res, or coff, and is deduced from the file name
extension if not specified. A single file name is an input file.
No input-file is stdin, default rc. No output-file is stdout, default rc.
windres: supported targets: pe-i386 pei-i386 elf32-i386 elf32-little elf32-big srec symbolsrec verilog tekhex binary ihe
x
makefile.gcc:317: recipe for target 'gccmswud_dll\minimal_minimal_rc.o' failed
mingw32-make: *** [gccmswud_dll\minimal_minimal_rc.o] Error 1

evstevemd
Part Of The Furniture
Part Of The Furniture
Posts: 2033
Joined: Wed Jan 28, 2009 11:57 am
Location: United Republic of Tanzania
Contact:

Re: wxSQLite - how to build?

Postby evstevemd » Fri Oct 02, 2015 2:33 pm

Post your makefile.gcc
Chief Justice: We have trouble dear citizens!
Citizens: What it is his honor?
Chief Justice:Our president is an atheist, who will he swear to?
[Ubuntu 15.04/Windows 10 Pro - GCC/MinGW, CodeLite IDE et al]

sly_chandan
Knows some wx things
Knows some wx things
Posts: 41
Joined: Fri Sep 25, 2015 2:33 pm

Re: wxSQLite - how to build?

Postby sly_chandan » Fri Oct 02, 2015 2:35 pm

Here is the wxSQLite3/build/makefile.gcc contents

# =========================================================================
# This makefile was generated by
# Bakefile 0.2.9 (http://www.bakefile.org)
# Do not modify, all changes will be overwritten!
# =========================================================================



# -------------------------------------------------------------------------
# These are configurable options:
# -------------------------------------------------------------------------

# Compiler flags to link shared library
LINK_DLL_FLAGS ?= -shared

# C++ compiler
CXX = g++

# Standard flags for C++
CXXFLAGS ?=

# Standard preprocessor flags (common for CC and CXX)
CPPFLAGS ?=

# Standard linker flags
LDFLAGS ?=

# Use DLL build of wx library? [0,1]
WX_SHARED ?= 1

# Use Unicode build of wxWidgets? [0,1]
WX_UNICODE ?= 1

# Use debug build of wxWidgets (linked with debug CRT)? [0,1]
WX_DEBUG ?= 1

# Version of the wx library to build against.
WX_VERSION ?= 30# Use monolithic build of wxWidgets? [0,1]
WX_MONOLITHIC ?= 0

# The directory where wxWidgets library is installed
WX_DIR ?= C:\wxWidgets-3.0.2 Build this wxCode component as DLL or as static library? [0,1]
SHARED ?= 0

# If 1 then the SQLite library will be loaded dynamically at run time [1,0]
USE_DYNAMIC_SQLITE3_LOAD ?= 0

# If 1 then the SQLite library has to be compiled with meta data support [1,0]
HAVE_METADATA ?= 0

# If 1 then the SQLite library has to be compiled with codec support [1,0]
HAVE_CODEC ?= 0

# If 1 then the SQLite library has to be compiled with loadable extension support [1,0]
HAVE_LOAD_EXTENSION ?= 0

# Folder where the SQLite3 link library is located
SQLITE3_DIR ?= ..\sqlite3



# -------------------------------------------------------------------------
# Do not modify the rest of this file!
# -------------------------------------------------------------------------

### Variables: ###

CPPDEPS = -MT$@ -MF$@.d -MD -MP
COMPILER_PREFIX = gcc
WXSQLITE3_LIB_CXXFLAGS = -DHAVE_W32API_H $(____WX_SHARED) \
$(__WXUNICODE_DEFINE_p) $(__WXDEBUG_DEFINE_p) -D__WXMSW__ \
-I$(WX_DIR)$(WXLIBPATH)\msw$(WXLIBPOSTFIX) -I$(WX_DIR)\include $(VAR) \
$(VAR_3) -W -Wall -I..\include $(__SQLITE3_DYNAMICLOAD_DEF_p) \
$(__SQLITE3_HAVE_METADATA_DEF_p) $(__SQLITE3_HAVE_CODEC_DEF_p) \
$(__SQLITE3_HAVE_LOAD_EXTENSION_DEF_p) -I$(SQLITE3_DIR)\include \
$(CPPFLAGS) $(CXXFLAGS)
WXSQLITE3_LIB_OBJECTS = \
gccmsw$(WXLIBPOSTFIX)$(_BUILDDIR_SHARED_SUFFIX)\wxsqlite3_lib_wxsqlite3.o
WXSQLITE3_DLL_CXXFLAGS = -DHAVE_W32API_H $(____WX_SHARED) \
$(__WXUNICODE_DEFINE_p) $(__WXDEBUG_DEFINE_p) -D__WXMSW__ \
-I$(WX_DIR)$(WXLIBPATH)\msw$(WXLIBPOSTFIX) -I$(WX_DIR)\include $(VAR) \
$(VAR_3) -W -Wall -I..\include -DWXMAKINGDLL_WXSQLITE3 \
$(__SQLITE3_DYNAMICLOAD_DEF_p) $(__SQLITE3_HAVE_METADATA_DEF_p) \
$(__SQLITE3_HAVE_CODEC_DEF_p) $(__SQLITE3_HAVE_LOAD_EXTENSION_DEF_p) \
-I$(SQLITE3_DIR)\include $(CPPFLAGS) $(CXXFLAGS)
WXSQLITE3_DLL_OBJECTS = \
gccmsw$(WXLIBPOSTFIX)$(_BUILDDIR_SHARED_SUFFIX)\wxsqlite3_dll_wxsqlite3.o
MINIMAL_CXXFLAGS = -DHAVE_W32API_H $(____WX_SHARED) $(__WXUNICODE_DEFINE_p) \
$(__WXDEBUG_DEFINE_p) -D__WXMSW__ \
-I$(WX_DIR)$(WXLIBPATH)\msw$(WXLIBPOSTFIX) -I$(WX_DIR)\include $(VAR) \
$(VAR_3) -W -Wall -I..\include -I..\samples -I$(SQLITE3_DIR)\include \
$(CPPFLAGS) $(CXXFLAGS)
MINIMAL_OBJECTS = \
gccmsw$(WXLIBPOSTFIX)$(_BUILDDIR_SHARED_SUFFIX)\minimal_minimal.o \
gccmsw$(WXLIBPOSTFIX)$(_BUILDDIR_SHARED_SUFFIX)\minimal_minimal_rc.o
TREEVIEW_CXXFLAGS = -DHAVE_W32API_H $(____WX_SHARED) $(__WXUNICODE_DEFINE_p) \
$(__WXDEBUG_DEFINE_p) -D__WXMSW__ \
-I$(WX_DIR)$(WXLIBPATH)\msw$(WXLIBPOSTFIX) -I$(WX_DIR)\include $(VAR) \
$(VAR_3) -W -Wall -I..\include -I..\samples\treeview -I$(SQLITE3_DIR)\include \
$(CPPFLAGS) $(CXXFLAGS)
TREEVIEW_OBJECTS = \
gccmsw$(WXLIBPOSTFIX)$(_BUILDDIR_SHARED_SUFFIX)\treeview_foldertree.o \
gccmsw$(WXLIBPOSTFIX)$(_BUILDDIR_SHARED_SUFFIX)\treeview_projectlist.o \
gccmsw$(WXLIBPOSTFIX)$(_BUILDDIR_SHARED_SUFFIX)\treeview_treeviewapp.o \
gccmsw$(WXLIBPOSTFIX)$(_BUILDDIR_SHARED_SUFFIX)\treeview_treeviewsample.o \
gccmsw$(WXLIBPOSTFIX)$(_BUILDDIR_SHARED_SUFFIX)\treeview_treeview_rc.o

### Conditionally set variables: ###

ifeq ($(WX_DEBUG),1)
WX3RDPARTYLIBPOSTFIX = d
endif
ifeq ($(SHARED),0)
_BUILDDIR_SHARED_SUFFIX =
endif
ifeq ($(SHARED),1)
_BUILDDIR_SHARED_SUFFIX = _dll
endif
ifeq ($(SHARED),0)
__wxsqlite3_lib___depname = \
..\lib\gcc_$(____wxsqlite3_lib__DIRNAME_SHARED_SUFFIX_FILENAMES)\libwxcode_msw$(WX_VERSION)$(WXLIBPOSTFIX)_wxsqlite3.a
endif
ifeq ($(SHARED),1)
__wxsqlite3_dll___depname = \
..\lib\$(COMPILER_PREFIX)_$(____wxsqlite3_dll__DIRNAME_SHARED_SUFFIX_FILENAMES)\wxcode_msw$(WX_VERSION)$(WXLIBPOSTFIX)_wxsqlite3.dll
endif
ifeq ($(WX_MONOLITHIC),0)
__WXLIB_ADV_NAME_p = -lwxmsw$(WX_VERSION)$(WXLIBPOSTFIX)_adv
endif
ifeq ($(WX_MONOLITHIC),0)
__WXLIB_XML_NAME_p = -lwxbase$(WX_VERSION)$(WXLIBPOSTFIX)_xml
endif
ifeq ($(SHARED),0)
____wxsqlite3_lib__DIRNAME_SHARED_SUFFIX_FILENAMES = lib
endif
ifeq ($(SHARED),1)
____wxsqlite3_lib__DIRNAME_SHARED_SUFFIX_FILENAMES = dll
endif
ifeq ($(USE_DYNAMIC_SQLITE3_LOAD),0)
__SQLITE3_DYNAMICLOAD_DEF_p = -DwxUSE_DYNAMIC_SQLITE3_LOAD=0
endif
ifeq ($(USE_DYNAMIC_SQLITE3_LOAD),1)
__SQLITE3_DYNAMICLOAD_DEF_p = -DwxUSE_DYNAMIC_SQLITE3_LOAD=1
endif
ifeq ($(HAVE_METADATA),0)
__SQLITE3_HAVE_METADATA_DEF_p = -DWXSQLITE3_HAVE_METADATA=0
endif
ifeq ($(HAVE_METADATA),1)
__SQLITE3_HAVE_METADATA_DEF_p = -DWXSQLITE3_HAVE_METADATA=1
endif
ifeq ($(HAVE_CODEC),0)
__SQLITE3_HAVE_CODEC_DEF_p = -DWXSQLITE3_HAVE_CODEC=0
endif
ifeq ($(HAVE_CODEC),1)
__SQLITE3_HAVE_CODEC_DEF_p = -DWXSQLITE3_HAVE_CODEC=1
endif
ifeq ($(HAVE_LOAD_EXTENSION),0)
__SQLITE3_HAVE_LOAD_EXTENSION_DEF_p = -DWXSQLITE3_HAVE_LOAD_EXTENSION=0
endif
ifeq ($(HAVE_LOAD_EXTENSION),1)
__SQLITE3_HAVE_LOAD_EXTENSION_DEF_p = -DWXSQLITE3_HAVE_LOAD_EXTENSION=1
endif
ifeq ($(WX_SHARED),0)
____wxsqlite3_dll__DIRNAME_SHARED_SUFFIX_FILENAMES = lib
endif
ifeq ($(WX_SHARED),1)
____wxsqlite3_dll__DIRNAME_SHARED_SUFFIX_FILENAMES = dll
endif
ifeq ($(WX_SHARED),0)
____WX_SHARED =
endif
ifeq ($(WX_SHARED),1)
____WX_SHARED = -DWXUSINGDLL
endif
ifeq ($(WX_SHARED),0)
____WX_SHARED_1 =
endif
ifeq ($(WX_SHARED),1)
____WX_SHARED_1 = --define WXUSINGDLL
endif
ifeq ($(WX_UNICODE),1)
__WXUNICODE_DEFINE_p = -D_UNICODE
endif
ifeq ($(WX_UNICODE),1)
__WXUNICODE_DEFINE_p_0 = --define _UNICODE
endif
ifeq ($(WX_DEBUG),1)
__WXDEBUG_DEFINE_p = -D__WXDEBUG__
endif
ifeq ($(WX_DEBUG),1)
__WXDEBUG_DEFINE_p_0 = --define __WXDEBUG__
endif
ifeq ($(WX_DEBUG),0)
ifeq ($(WX_UNICODE),1)
WXLIBPOSTFIX = u
endif
endif
ifeq ($(WX_DEBUG),1)
ifeq ($(WX_UNICODE),0)
WXLIBPOSTFIX = d
endif
endif
ifeq ($(WX_DEBUG),1)
ifeq ($(WX_UNICODE),1)
WXLIBPOSTFIX = ud
endif
endif
ifeq ($(WX_DEBUG),0)
VAR = -O2
endif
ifeq ($(WX_DEBUG),1)
VAR = -O0
endif
ifeq ($(SHARED),0)
__COMPONENT_LIB_DEP = $(__wxsqlite3_lib___depname)
endif
ifeq ($(SHARED),1)
__COMPONENT_LIB_DEP = $(__wxsqlite3_dll___depname)
endif
ifeq ($(SHARED),0)
__COMPONENT_LIB_LIBR = \
..\lib\gcc_$(____wxsqlite3_lib__DIRNAME_SHARED_SUFFIX_FILENAMES)\libwxcode_msw$(WX_VERSION)$(WXLIBPOSTFIX)_wxsqlite3.a
endif
ifeq ($(SHARED),1)
__COMPONENT_LIB_LIBR = \
..\lib\$(COMPILER_PREFIX)_$(____wxsqlite3_dll__DIRNAME_SHARED_SUFFIX_FILENAMES)\libwxcode_msw$(WX_VERSION)$(WXLIBPOSTFIX)_wxsqlite3.a
endif
ifeq ($(USE_DYNAMIC_SQLITE3_LOAD),0)
__SQLITE3_DEP_p = -lsqlite3
endif
ifeq ($(WX_MONOLITHIC),0)
__WXLIB_CORE_NAME_p = -lwxmsw$(WX_VERSION)$(WXLIBPOSTFIX)_core
endif
ifeq ($(WX_MONOLITHIC),0)
__WXLIB_BASE_NAME_p = -lwxbase$(WX_VERSION)$(WXLIBPOSTFIX)
endif
ifeq ($(WX_MONOLITHIC),1)
__WXLIB_BASE_NAME_p = -lwxmsw$(WX_VERSION)$(WXLIBPOSTFIX)
endif
ifeq ($(WX_SHARED),0)
WXLIBPATH = \lib\$(COMPILER_PREFIX)_lib
endif
ifeq ($(WX_SHARED),1)
WXLIBPATH = \lib\$(COMPILER_PREFIX)_dll
endif
ifeq ($(WX_DEBUG),0)
VAR_3 =
endif
ifeq ($(WX_DEBUG),1)
VAR_3 = -g
endif


all: gccmsw$(WXLIBPOSTFIX)$(_BUILDDIR_SHARED_SUFFIX)
gccmsw$(WXLIBPOSTFIX)$(_BUILDDIR_SHARED_SUFFIX):
-if not exist gccmsw$(WXLIBPOSTFIX)$(_BUILDDIR_SHARED_SUFFIX) mkdir gccmsw$(WXLIBPOSTFIX)$(_BUILDDIR_SHARED_SUFFIX)

### Targets: ###

all: test_for_selected_wxbuild $(__wxsqlite3_lib___depname) $(__wxsqlite3_dll___depname) ..\samples\minimal.exe ..\samples\treeview\treeview.exe

clean:
-if exist gccmsw$(WXLIBPOSTFIX)$(_BUILDDIR_SHARED_SUFFIX)\*.o del gccmsw$(WXLIBPOSTFIX)$(_BUILDDIR_SHARED_SUFFIX)\*.o
-if exist gccmsw$(WXLIBPOSTFIX)$(_BUILDDIR_SHARED_SUFFIX)\*.d del gccmsw$(WXLIBPOSTFIX)$(_BUILDDIR_SHARED_SUFFIX)\*.d
-if exist ..\lib\gcc_$(____wxsqlite3_lib__DIRNAME_SHARED_SUFFIX_FILENAMES)\libwxcode_msw$(WX_VERSION)$(WXLIBPOSTFIX)_wxsqlite3.a del ..\lib\gcc_$(____wxsqlite3_lib__DIRNAME_SHARED_SUFFIX_FILENAMES)\libwxcode_msw$(WX_VERSION)$(WXLIBPOSTFIX)_wxsqlite3.a
-if exist ..\lib\$(COMPILER_PREFIX)_$(____wxsqlite3_dll__DIRNAME_SHARED_SUFFIX_FILENAMES)\wxcode_msw$(WX_VERSION)$(WXLIBPOSTFIX)_wxsqlite3.dll del ..\lib\$(COMPILER_PREFIX)_$(____wxsqlite3_dll__DIRNAME_SHARED_SUFFIX_FILENAMES)\wxcode_msw$(WX_VERSION)$(WXLIBPOSTFIX)_wxsqlite3.dll
-if exist ..\lib\$(COMPILER_PREFIX)_$(____wxsqlite3_dll__DIRNAME_SHARED_SUFFIX_FILENAMES)\libwxcode_msw$(WX_VERSION)$(WXLIBPOSTFIX)_wxsqlite3.a del ..\lib\$(COMPILER_PREFIX)_$(____wxsqlite3_dll__DIRNAME_SHARED_SUFFIX_FILENAMES)\libwxcode_msw$(WX_VERSION)$(WXLIBPOSTFIX)_wxsqlite3.a
-if exist ..\samples\minimal.exe del ..\samples\minimal.exe
-if exist ..\samples\treeview\treeview.exe del ..\samples\treeview\treeview.exe

test_for_selected_wxbuild:
@if not exist $(WX_DIR)$(WXLIBPATH)\msw$(WXLIBPOSTFIX)\wx\setup.h \
echo ----------------------------------------------------------------------------
@if not exist $(WX_DIR)$(WXLIBPATH)\msw$(WXLIBPOSTFIX)\wx\setup.h \
echo The selected wxWidgets build is not available!
@if not exist $(WX_DIR)$(WXLIBPATH)\msw$(WXLIBPOSTFIX)\wx\setup.h \
echo Please use the options prefixed with WX_ to select another wxWidgets build.
@if not exist $(WX_DIR)$(WXLIBPATH)\msw$(WXLIBPOSTFIX)\wx\setup.h \
echo ----------------------------------------------------------------------------
@if not exist $(WX_DIR)$(WXLIBPATH)\msw$(WXLIBPOSTFIX)\wx\setup.h \
exit 1

ifeq ($(SHARED),0)
..\lib\gcc_$(____wxsqlite3_lib__DIRNAME_SHARED_SUFFIX_FILENAMES)\libwxcode_msw$(WX_VERSION)$(WXLIBPOSTFIX)_wxsqlite3.a: make_dir_wxsqlite3_lib $(WXSQLITE3_LIB_OBJECTS)
if exist $@ del $@
ar rcu $@ $(WXSQLITE3_LIB_OBJECTS)
ranlib $@
endif

make_dir_wxsqlite3_lib:
if not exist ..\lib\gcc_$(____wxsqlite3_lib__DIRNAME_SHARED_SUFFIX_FILENAMES) mkdir ..\lib\gcc_$(____wxsqlite3_lib__DIRNAME_SHARED_SUFFIX_FILENAMES)

ifeq ($(SHARED),1)
..\lib\$(COMPILER_PREFIX)_$(____wxsqlite3_dll__DIRNAME_SHARED_SUFFIX_FILENAMES)\wxcode_msw$(WX_VERSION)$(WXLIBPOSTFIX)_wxsqlite3.dll: make_dir_wxsqlite3_dll $(WXSQLITE3_DLL_OBJECTS)
$(CXX) $(LINK_DLL_FLAGS) -fPIC -o $@ $(WXSQLITE3_DLL_OBJECTS) -mthreads -L$(WX_DIR)$(WXLIBPATH) $(VAR_3) -L..$(WXLIBPATH) -Wl,--out-implib=..\lib\$(COMPILER_PREFIX)_$(____wxsqlite3_dll__DIRNAME_SHARED_SUFFIX_FILENAMES)\libwxcode_msw$(WX_VERSION)$(WXLIBPOSTFIX)_wxsqlite3.a -L$(SQLITE3_DIR)\lib $(LDFLAGS) $(__SQLITE3_DEP_p) $(__WXLIB_CORE_NAME_p) $(__WXLIB_BASE_NAME_p) -lwxtiff$(WX3RDPARTYLIBPOSTFIX) -lwxjpeg$(WX3RDPARTYLIBPOSTFIX) -lwxpng$(WX3RDPARTYLIBPOSTFIX) -lwxzlib$(WX3RDPARTYLIBPOSTFIX) -lwxregex$(WXLIBPOSTFIX) -lwxexpat$(WX3RDPARTYLIBPOSTFIX) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32
endif

make_dir_wxsqlite3_dll:
if not exist ..\lib\$(COMPILER_PREFIX)_$(____wxsqlite3_dll__DIRNAME_SHARED_SUFFIX_FILENAMES) mkdir ..\lib\$(COMPILER_PREFIX)_$(____wxsqlite3_dll__DIRNAME_SHARED_SUFFIX_FILENAMES)

..\samples\minimal.exe: $(MINIMAL_OBJECTS) $(__COMPONENT_LIB_DEP) gccmsw$(WXLIBPOSTFIX)$(_BUILDDIR_SHARED_SUFFIX)\minimal_minimal_rc.o
$(CXX) -o $@ $(MINIMAL_OBJECTS) -mthreads -L$(WX_DIR)$(WXLIBPATH) $(VAR_3) -L..$(WXLIBPATH) -L$(SQLITE3_DIR)\lib $(LDFLAGS) $(__COMPONENT_LIB_LIBR) $(__SQLITE3_DEP_p) $(__WXLIB_CORE_NAME_p) $(__WXLIB_BASE_NAME_p) -lwxtiff$(WX3RDPARTYLIBPOSTFIX) -lwxjpeg$(WX3RDPARTYLIBPOSTFIX) -lwxpng$(WX3RDPARTYLIBPOSTFIX) -lwxzlib$(WX3RDPARTYLIBPOSTFIX) -lwxregex$(WXLIBPOSTFIX) -lwxexpat$(WX3RDPARTYLIBPOSTFIX) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32

..\samples\treeview\treeview.exe: $(TREEVIEW_OBJECTS) $(__COMPONENT_LIB_DEP) gccmsw$(WXLIBPOSTFIX)$(_BUILDDIR_SHARED_SUFFIX)\treeview_treeview_rc.o
$(CXX) -o $@ $(TREEVIEW_OBJECTS) -mthreads -L$(WX_DIR)$(WXLIBPATH) $(VAR_3) -L..$(WXLIBPATH) -Wl,--subsystem,windows -mwindows -L$(SQLITE3_DIR)\lib $(LDFLAGS) $(__COMPONENT_LIB_LIBR) $(__SQLITE3_DEP_p) $(__WXLIB_ADV_NAME_p) $(__WXLIB_XML_NAME_p) $(__WXLIB_CORE_NAME_p) $(__WXLIB_BASE_NAME_p) -lwxtiff$(WX3RDPARTYLIBPOSTFIX) -lwxjpeg$(WX3RDPARTYLIBPOSTFIX) -lwxpng$(WX3RDPARTYLIBPOSTFIX) -lwxzlib$(WX3RDPARTYLIBPOSTFIX) -lwxregex$(WXLIBPOSTFIX) -lwxexpat$(WX3RDPARTYLIBPOSTFIX) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32

gccmsw$(WXLIBPOSTFIX)$(_BUILDDIR_SHARED_SUFFIX)\wxsqlite3_lib_wxsqlite3.o: ../src/wxsqlite3.cpp
$(CXX) -c -o $@ $(WXSQLITE3_LIB_CXXFLAGS) $(CPPDEPS) $<

gccmsw$(WXLIBPOSTFIX)$(_BUILDDIR_SHARED_SUFFIX)\wxsqlite3_dll_wxsqlite3.o: ../src/wxsqlite3.cpp
$(CXX) -c -o $@ $(WXSQLITE3_DLL_CXXFLAGS) $(CPPDEPS) $<

gccmsw$(WXLIBPOSTFIX)$(_BUILDDIR_SHARED_SUFFIX)\minimal_minimal.o: ../samples/minimal.cpp
$(CXX) -c -o $@ $(MINIMAL_CXXFLAGS) $(CPPDEPS) $<

gccmsw$(WXLIBPOSTFIX)$(_BUILDDIR_SHARED_SUFFIX)\minimal_minimal_rc.o: ../samples/minimal.rc
windres --use-temp-file -i$< -o$@ --define HAVE_W32API_H $(____WX_SHARED_1) $(__WXUNICODE_DEFINE_p_0) $(__WXDEBUG_DEFINE_p_0) --define __WXMSW__ --include-dir $(WX_DIR)$(WXLIBPATH)\msw$(WXLIBPOSTFIX) --include-dir $(WX_DIR)/include --include-dir ../include --include-dir ../samples --include-dir $(SQLITE3_DIR)\include

gccmsw$(WXLIBPOSTFIX)$(_BUILDDIR_SHARED_SUFFIX)\treeview_foldertree.o: ../samples/treeview/foldertree.cpp
$(CXX) -c -o $@ $(TREEVIEW_CXXFLAGS) $(CPPDEPS) $<

gccmsw$(WXLIBPOSTFIX)$(_BUILDDIR_SHARED_SUFFIX)\treeview_projectlist.o: ../samples/treeview/projectlist.cpp
$(CXX) -c -o $@ $(TREEVIEW_CXXFLAGS) $(CPPDEPS) $<

gccmsw$(WXLIBPOSTFIX)$(_BUILDDIR_SHARED_SUFFIX)\treeview_treeviewapp.o: ../samples/treeview/treeviewapp.cpp
$(CXX) -c -o $@ $(TREEVIEW_CXXFLAGS) $(CPPDEPS) $<

gccmsw$(WXLIBPOSTFIX)$(_BUILDDIR_SHARED_SUFFIX)\treeview_treeviewsample.o: ../samples/treeview/treeviewsample.cpp
$(CXX) -c -o $@ $(TREEVIEW_CXXFLAGS) $(CPPDEPS) $<

gccmsw$(WXLIBPOSTFIX)$(_BUILDDIR_SHARED_SUFFIX)\treeview_treeview_rc.o: ../samples/treeview/treeview.rc
windres --use-temp-file -i$< -o$@ --define HAVE_W32API_H $(____WX_SHARED_1) $(__WXUNICODE_DEFINE_p_0) $(__WXDEBUG_DEFINE_p_0) --define __WXMSW__ --include-dir $(WX_DIR)$(WXLIBPATH)\msw$(WXLIBPOSTFIX) --include-dir $(WX_DIR)/include --include-dir ../include --include-dir ../samples/treeview --include-dir $(SQLITE3_DIR)\include

.PHONY: all clean


SHELL := $(COMSPEC)

# Dependencies tracking:
-include gccmsw$(WXLIBPOSTFIX)$(_BUILDDIR_SHARED_SUFFIX)/*.d

sly_chandan
Knows some wx things
Knows some wx things
Posts: 41
Joined: Fri Sep 25, 2015 2:33 pm

Re: wxSQLite - how to build?

Postby sly_chandan » Fri Oct 02, 2015 2:46 pm

Can you help me with databaselayer library on wxcode website.

If wxSQLite3 is not gonna work then we could try databaselayer 1.8 on wxcode website.....

evstevemd
Part Of The Furniture
Part Of The Furniture
Posts: 2033
Joined: Wed Jan 28, 2009 11:57 am
Location: United Republic of Tanzania
Contact:

Re: wxSQLite - how to build?

Postby evstevemd » Fri Oct 02, 2015 2:47 pm

check these lines are messed up. Be careful when you edit

Code: Select all

# The directory where wxWidgets library is installed
WX_DIR ?= C:\wxWidgets-3.0.2 Build this wxCode component as DLL or as static library? [0,1]
SHARED ?= 0


Should be

Code: Select all

# The directory where wxWidgets library is installed
WX_DIR ?= C:\wxWidgets-3.0.2
#Build this wxCode component as DLL or as static library? [0,1]
SHARED ?= 0
Chief Justice: We have trouble dear citizens!
Citizens: What it is his honor?
Chief Justice:Our president is an atheist, who will he swear to?
[Ubuntu 15.04/Windows 10 Pro - GCC/MinGW, CodeLite IDE et al]

sly_chandan
Knows some wx things
Knows some wx things
Posts: 41
Joined: Fri Sep 25, 2015 2:33 pm

Re: wxSQLite - how to build?

Postby sly_chandan » Fri Oct 02, 2015 2:52 pm

This is what I get.......

Please note.....I am running the mingw32 command on wxsqlite

C:\wxsqlite3-3.2.1\wxsqlite3-3.2.1\build>mingw32-make SHELL=CMD.exe -j4 -f makefile.gcc BUILD=debug UNICODE=1 SHARED=1
if not exist ..\lib\gcc_dll mkdir ..\lib\gcc_dll
g++ -c -o gccmswud_dll\wxsqlite3_dll_wxsqlite3.o -DHAVE_W32API_H -DWXUSINGDLL -D_UNICODE -D__WXDEBUG__ -D__WXMSW__ -IC:\
wxWidgets-3.0.2 \lib\gcc_dll\mswud -IC:\wxWidgets-3.0.2 \include -O0 -g -W -Wall -I..\include -DWXMAKINGDLL_WXSQLITE3 -D
wxUSE_DYNAMIC_SQLITE3_LOAD=0 -DWXSQLITE3_HAVE_METADATA=0 -DWXSQLITE3_HAVE_CODEC=0 -DWXSQLITE3_HAVE_LOAD_EXTENSION=0 -I..
\sqlite3\include -MTgccmswud_dll\wxsqlite3_dll_wxsqlite3.o -MFgccmswud_dll\wxsqlite3_dll_wxsqlite3.o.d -MD -MP ../src/
wxsqlite3.cpp
g++ -c -o gccmswud_dll\minimal_minimal.o -DHAVE_W32API_H -DWXUSINGDLL -D_UNICODE -D__WXDEBUG__ -D__WXMSW__ -IC:\wxWidget
s-3.0.2 \lib\gcc_dll\mswud -IC:\wxWidgets-3.0.2 \include -O0 -g -W -Wall -I..\ing++: error: \lib\gcc_dll\mswud: No such
file or directory
clude -I..\samples -I..\sqlite3\include -MTgccmswud_dll\minimal_minimal.o -MFgccmswud_dll\minimal_minimal.o.d -MD -MP
../samples/minimal.cpp
g++: error: \include: No such file or directory
makefile.gcc:312: recipe for target 'gccmswud_dll\wxsqlite3_dll_wxsqlite3.o' failed
mingw32-make: *** [gccmswud_dll\wxsqlite3_dll_wxsqlite3.o] Error 1
mingwg++: error: \lib\gcc_dll\mswud: No such file or directory
3g++: error: \include: No such file or directory
2-make: *** Waiting for unfinished jobs....
makefile.gcc:315: recipe for target 'gccmswud_dll\minimal_minimal.o' failed
mingw32-make: *** [gccmswud_dll\minimal_minimal.o] Error 1


Return to “wxCode”

Who is online

Users browsing this forum: No registered users and 2 guests