wxSQLite - how to build?  [SOLVED]

Talk here about issues with one of the components hosted at wxCode, or suggest features for it.
MarlonDean
Experienced Solver
Experienced Solver
Posts: 63
Joined: Fri May 21, 2010 6:14 am

wxSQLite - how to build?

Postby MarlonDean » Sun Sep 12, 2010 8:20 pm

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

MarlonDean
Experienced Solver
Experienced Solver
Posts: 63
Joined: Fri May 21, 2010 6:14 am

Postby MarlonDean » Sun Sep 12, 2010 8:46 pm

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>

utelle
Moderator
Moderator
Posts: 748
Joined: Tue Jul 05, 2005 10:00 pm
Location: Cologne, Germany
Contact:

Re: wxSQLite - how to build?

Postby utelle » Mon Sep 13, 2010 1:10 pm

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

MarlonDean
Experienced Solver
Experienced Solver
Posts: 63
Joined: Fri May 21, 2010 6:14 am

Postby MarlonDean » Fri Sep 17, 2010 7:14 pm

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

utelle
Moderator
Moderator
Posts: 748
Joined: Tue Jul 05, 2005 10:00 pm
Location: Cologne, Germany
Contact:

  [SOLVED]

Postby utelle » Fri Sep 17, 2010 7:55 pm

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

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

Postby evstevemd » Sat Sep 18, 2010 2:06 pm

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
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 11:49 am

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?

evstevemd
Part Of The Furniture
Part Of The Furniture
Posts: 1982
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 11:52 am

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
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 12:04 pm

Sorry I don't understand, can you please tell me the steps I need to do?

Thanks

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

Re:

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

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!
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 12:08 pm

which makefile? makefile.vc?

what do I need to add?

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

Thanks
Last edited by sly_chandan on Fri Oct 02, 2015 12:10 pm, edited 1 time in total.

evstevemd
Part Of The Furniture
Part Of The Furniture
Posts: 1982
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:10 pm

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
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 12:17 pm

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?

evstevemd
Part Of The Furniture
Part Of The Furniture
Posts: 1982
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:34 pm

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++?
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 12:48 pm

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


Return to “wxCode”

Who is online

Users browsing this forum: No registered users and 1 guest