Page 1 of 5

wxSQLite - how to build?

Posted: Sun Sep 12, 2010 8:20 pm
by MarlonDean
Hey guys,

I am quite familiar with standard wxWidgets as I use it on a daily basis in my job, but building wxSQLite is proving difficult for me.

I have my wxSQLite folder in the following directory:
C:\Build_Environments\wxWidgets-2.8.9\components\wxsqlite3

I am using win7, widgets 2.8.9, VS 2008 express and SQLite 3.7.2. I believe all my environmental variables are setup correctly as I have no problem compiling wxWidget samples and other applications.

Now, for my problem... Whenever I try to compile wxSQLite using the VS project file, I receive the following error:
LINK : fatal error LNK1104: cannot open file 'wxmsw28d.lib'

I did not build wxWidgets myself, just copied it from work so I am unsure of the settings used when building.

Where is the wxmswd.lib located? I can only find files such as wxmsw28d_core.lib etc.

Please help as I am losing my mind

Thanks

Posted: Sun Sep 12, 2010 8:46 pm
by MarlonDean
I have tried building wqsqlite with mingw32 instead of VS. This is the result:

C:\Build_Environments\wxWidgets-2.8.9\components\wxsqlite3\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.
----------------------------------------------------------------------------
mingw32-make: *** [test_for_selected_wxbuild] Error 1

C:\Build_Environments\wxWidgets-2.8.9\components\wxsqlite3\build>

Re: wxSQLite - how to build?

Posted: Mon Sep 13, 2010 1:10 pm
by utelle
MarlonDean wrote:I am quite familiar with standard wxWidgets as I use it on a daily basis in my job, but building wxSQLite is proving difficult for me.

Using one of the project files, makefiles or configure script coming with wxSQLite3 it really shouldn't be too hard to build wxSQLite3.

MarlonDean wrote:I have my wxSQLite folder in the following directory:
C:\Build_Environments\wxWidgets-2.8.9\components\wxsqlite3

I am using win7, widgets 2.8.9, VS 2008 express and SQLite 3.7.2. I believe all my environmental variables are setup correctly as I have no problem compiling wxWidget samples and other applications.

Now, for my problem... Whenever I try to compile wxSQLite using the VS project file, I receive the following error:
LINK : fatal error LNK1104: cannot open file 'wxmsw28d.lib'

This indicates that you try to compile for a wxWidgets build which is not available on your system. You have to select a build configuration from the list shown in Visual Studio matching your wxWidgets build.

MarlonDean wrote:I did not build wxWidgets myself, just copied it from work so I am unsure of the settings used when building.

Where is the wxmswd.lib located? I can only find files such as wxmsw28d_core.lib etc.

All wxWidgets lib files are located in the lib directory (resp. a subdirectory thereof) of the wxWidgets directory. As far as I can remember wxmswd.lib would correspond to the monolithic debug build of wxWidgets. if you didn't build the monolithic version of wxWidgets this particular lib file doesn't exist.

MarlonDean wrote:I have tried building wqsqlite with mingw32 instead of VS. This is the result:

C:\Build_Environments\wxWidgets-2.8.9\components\wxsqlite3\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.
----------------------------------------------------------------------------
mingw32-make: *** [test_for_selected_wxbuild] Error 1

C:\Build_Environments\wxWidgets-2.8.9\components\wxsqlite3\build>

Well, if your wxWidgets libraries were build using VC++ you can't use them to build a MinGW library or application. In that case you have to rebuild wxWidgets using MinGW.

If makefiles are used to build wxSQLite3 you have to specify all options related to the wxWidgets build to be used either on the command line or in the makefile itself. Inspect the makefile to see the default values of the wxWidgets options.

Regards,

Ulrich

Posted: Fri Sep 17, 2010 7:14 pm
by MarlonDean
I have tried recompiling wxWidgets with mingw. I used the following command

Code: Select all

mingw32-make -f makefile.gcc MONOLITHIC=1 SHARED=1 UNICODE=0 BUILD=debug


This worked fine. Next I tried building wxSqlite3 again using the following command

Code: Select all

mingw32-make -f makefile.gcc WX_MONOLITHIC=1 WX_SHARED=1 WX_UNICODE=0 WX_DEBUG=1 WX_VERSION=28


This is where everthing went downhill.

Received the following error

Code: Select all

----------------------------------------------------------------------------
The selected wxWidgets build is not available!
Please use the options prefixed with WX_ to select another wxWidgets build.
----------------------------------------------------------------------------
mingw32-make: *** [test_for_selected_wxbuild] Error 1


I am using wxWidgets 2.8.9 Please help. This has been draggin on far too long

  [SOLVED]

Posted: Fri Sep 17, 2010 7:55 pm
by utelle
MarlonDean wrote:Next I tried building wxSqlite3 again using the following command

Code: Select all

mingw32-make -f makefile.gcc WX_MONOLITHIC=1 WX_SHARED=1 WX_UNICODE=0 WX_DEBUG=1 WX_VERSION=28

This is where everthing went downhill.

Received the following error

Code: Select all

----------------------------------------------------------------------------
The selected wxWidgets build is not available!
Please use the options prefixed with WX_ to select another wxWidgets build.
----------------------------------------------------------------------------
mingw32-make: *** [test_for_selected_wxbuild] Error 1


My guess is that the environment variable WXWIN isn't set correctly or isn't set at all. All wxCode components expect that this variable points to the root folder of the wxWidgets installation to be used.

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

Posted: Sat Sep 18, 2010 2:06 pm
by evstevemd
i always edit makefile and at the top I explicitly define the absolute path i.e WXWIN=C:\blahblah

edit also some options like monolithic, debug et al. Then build it with mingw32-make -f makefile.gcc

Re: wxSQLite - how to build?

Posted: Fri Oct 02, 2015 11:49 am
by sly_chandan
What did you do to solve the problem?

I have copied sqllite3 in wxwidgets/components folder

Then I ran he following command:-
mingw32-make -f makefile.gcc BUILD=release SHARED=1 MONOLITHIC=1 UNICODE=1 CXXFLAGS=-fno-keep-inline-dllexport

I get the following error:
if not exist ..\..\lib\gcc_dll\mswu\wx mkdir ..\..\lib\gcc_dll\mswu\wx


Please tell me what to do?

Re: wxSQLite - how to build?

Posted: Fri Oct 02, 2015 11:52 am
by evstevemd
sly_chandan wrote:What did you do to solve the problem?

I have copied sqllite3 in wxwidgets/components folder

Then I ran he following command:-
mingw32-make -f makefile.gcc BUILD=release SHARED=1 MONOLITHIC=1 UNICODE=1 CXXFLAGS=-fno-keep-inline-dllexport

I get the following error:
if not exist ..\..\lib\gcc_dll\mswu\wx mkdir ..\..\lib\gcc_dll\mswu\wx


Please tell me what to do?

Check My Comment

Re: wxSQLite - how to build?

Posted: Fri Oct 02, 2015 12:04 pm
by sly_chandan
Sorry I don't understand, can you please tell me the steps I need to do?

Thanks

Re:

Posted: Fri Oct 02, 2015 12:05 pm
by evstevemd
evstevemd wrote:i always edit makefile and at the top I explicitly define the absolute path i.e WXWIN=C:\blahblah

edit also some options like monolithic, debug et al. Then build it with mingw32-make -f makefile.gcc


did you see this? That's what am referring to!

Re: wxSQLite - how to build?

Posted: Fri Oct 02, 2015 12:08 pm
by sly_chandan
which makefile? makefile.vc?

what do I need to add?

Its not working...can u please tell me the steps in detail??????

Thanks

Re: wxSQLite - how to build?

Posted: Fri Oct 02, 2015 12:10 pm
by evstevemd
sly_chandan wrote:which makefile? makefile.vc?

what do I need to add?

makefile.gcc inside build/msw
I believe there is better way but I just do that and its harmless so far

Re: wxSQLite - how to build?

Posted: Fri Oct 02, 2015 12:17 pm
by sly_chandan
Ok so this is what I have done.

I copied the sqllite3 files in components folder in wxwidgets folder.

I edited the makefile.gcc in wxwidgets/build/msw

and then I ran the following code:

mingw32-make -f makefile.gcc

Will this compile sqllite3 along with wxwidgets?

I have the compilation process running.....will it work?

How do I know that I have installed sqllite successfully?

Re: wxSQLite - how to build?

Posted: Fri Oct 02, 2015 12:34 pm
by evstevemd
sly_chandan wrote:
I copied the sqllite3 files in components folder in wxwidgets folder.

Why? wxSQLite3 is not part of wxwidgets but depends on it. so don't copy it in wxWidgets

sly_chandan wrote:
I edited the makefile.gcc in wxwidgets/build/msw

and then I ran the following code:

mingw32-make -f makefile.gcc

Correct

sly_chandan wrote: Will this compile sqllite3 along with wxwidgets?

No. You have to run "mingw32-make -f makefile.gcc" in wxwidgets directory/build/msw

sly_chandan wrote:
How do I know that I have installed sqllite successfully?

[/quote]
Its a library, so you will see DLLs/.a files after building.

Have you ever dealt with library with C++?

Re: wxSQLite - how to build?

Posted: Fri Oct 02, 2015 12:48 pm
by sly_chandan
So u r saying that wxsqllite3 should be compiled separately....


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

I am sorry buddy...But I don't quite follow what needs to be done to build sqllite library