Recent Posts

Pages: 1 2 3 4 [5] 6 7 8 9 10
41
I did set exe toolchain and it can compiled successfully.

but I get no error on build message whenever there's an error on build log.

 :(

Thank you.
 
42
Using Code::Blocks / Re: SQLite3 in a C::B GUI
« Last post by Landslyde on April 20, 2018, 08:24:29 am »
Hi New Pagodi:

Works like a charm! A million thanks for your help.
43
Using Code::Blocks / Re: SQLite3 in a C::B GUI
« Last post by New Pagodi on April 20, 2018, 04:58:38 am »
I'm pretty sure wxSqlite has been dead for over a decade.  Use wxSqlite3 instead.

Just build and install the library according to the instructions.

Here's a minimal example that only opens a database (or creates one if it doesn't exist).  Create an empty wxWidgets project, add an empty cpp source file and paste this into it:

Code: [Select]
// For compilers that support precompilation, includes "wx/wx.h".
#include "wx/wxprec.h"

#ifdef __BORLANDC__
    #pragma hdrstop
#endif

// for all others, include the necessary headers (this file is usually all you
// need because it includes almost all "standard" wxWidgets headers)
#ifndef WX_PRECOMP
    #include "wx/wx.h"
#endif

#include <wx/wxsqlite3.h>

class MyFrame : public wxFrame
{
    public:
        MyFrame( wxWindow* parent, int id = wxID_ANY, wxString title = "Demo",
                 wxPoint pos = wxDefaultPosition, wxSize size = wxDefaultSize,
                 int style = wxDEFAULT_FRAME_STYLE|wxTAB_TRAVERSAL );
        ~MyFrame();
    private:
        wxSQLite3Database db;
};

MyFrame::MyFrame( wxWindow* parent, int id, wxString title, wxPoint pos,
                  wxSize size, int style )
        :wxFrame( parent, id, title, pos, size, style )
{
    db.Open("data.db");

    if(db.IsOpen())
    {
        SetTitle("db opened");
    }
}

MyFrame::~MyFrame()
{
    if(db.IsOpen())
    {
        db.Close();
    }
}

class MyApp : public wxApp
{
    public:
        virtual bool OnInit()
        {
            MyFrame* frame = new MyFrame(NULL);
            frame->Show();
            return true;
        }
};

wxIMPLEMENT_APP(MyApp);

Add the wxSqlite3 library to the code::blocks projects link libraries the build and run. 
44
Using Code::Blocks / Re: SQLite3 in a C::B GUI
« Last post by Landslyde on April 20, 2018, 04:41:57 am »
Hi stahta01:

I run Linux. I think wxSQLite3 might just be a wrapper for Windows. When I tried to use it, I recall it used *.dll files. But I might be wrong on it being strictly for Windows. I hope I am. Anyway, here are a few links:

https://www.youtube.com/watch?v=KHjSiVQbvX0

https://github.com/utelle/wxsqlite3

https://en.wikipedia.org/wiki/WxSQLite3

https://forums.wxwidgets.org/viewtopic.php?t=37675

If wxSQLite3 is a Windows-only SQLite3 wrapper for C++, then how can SQLite3 be used in a C::B GUI on Linux? I use SQLite3 in C::B console programs. That's easy. But when I try to use the same SQLite3 files in a C::B GUI, all hell breaks loose!

I hope you can figure this out. I sure can't. And thank you for trying. Than you very much for that.
45
Using Code::Blocks / Re: SQLite3 in a C::B GUI
« Last post by stahta01 on April 20, 2018, 04:10:32 am »
Post an link to wxSQLite sample code; and, I might get a chance in  the next week to figure it out.

Tim S.
46
Using Code::Blocks / [SOLVED] SQLite3 in a C::B GUI
« Last post by Landslyde on April 20, 2018, 03:53:28 am »
There are a LOT of tutorials on youtube showing how to use SQLite3 with a C::B console program. ONE shows a GUI through the use of wxSQLite3, but this guy doesn't speak or explain anything. And some of what he does is obscure as hell! Will someone puhleeeez point me to a link that goes step by step on how I can implement SQLite3 in a C::B GUI program? I'm doing this right now using Qt (they have the SQL drivers built in and accessing them is a breeze), but I detest using their hybrid C++! I want pure C++ through C::B to build my SQLite3 programs.

I've tried adding the sqlite3.c and sqlite3.h to a C::PB GUI and immediately get a mile of errors in the buffer.h file:
Code: [Select]
||=== Build: Debug in Assistant (compiler: GNU GCC Compiler) ===|
||warning: command line option ‘-std=c++1z’ is valid for C++/ObjC++ but not for C|
||warning: ./wx_pch.h.gch/Debug_wx_pch_h_gch: not for GNU C11|
/usr/include/wx-3.0/wx/buffer.h|19|error: unknown type name ‘class’|
/usr/include/wx-3.0/wx/buffer.h|27|error: unknown type name ‘namespace’; did you mean ‘isspace’?|
/usr/include/wx-3.0/wx/buffer.h|28|error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ token|
/usr/include/wx-3.0/wx/buffer.h|65|error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘<’ token|
/usr/include/wx-3.0/wx/buffer.h|241|error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘<’ token|
/usr/include/wx-3.0/wx/buffer.h|242|error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘<’ token|
/usr/include/wx-3.0/wx/buffer.h|246|error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘<’ token|
/usr/include/wx-3.0/wx/buffer.h|360|error: unknown type name ‘class’|
/usr/include/wx-3.0/wx/buffer.h|360|error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘:’ token|
/usr/include/wx-3.0/wx/buffer.h|380|error: unknown type name ‘class’|
/usr/include/wx-3.0/wx/buffer.h|380|error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘:’ token|
/usr/include/wx-3.0/wx/buffer.h|398|error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘<’ token|
/usr/include/wx-3.0/wx/buffer.h|416|error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘<’ token|
/usr/include/wx-3.0/wx/buffer.h|417|error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘<’ token|
/usr/include/wx-3.0/wx/buffer.h|446|error: unknown type name ‘class’|
/usr/include/wx-3.0/wx/buffer.h|447|error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ token|
/usr/include/wx-3.0/wx/buffer.h|518|error: unknown type name ‘class’|
/usr/include/wx-3.0/wx/buffer.h|519|error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ token|
/usr/include/wx-3.0/wx/strconv.h|29|error: unknown type name ‘class’|
/usr/include/wx-3.0/wx/strconv.h|47|warning: data definition has no type or storage class|
/usr/include/wx-3.0/wx/strconv.h|47|warning: type defaults to ‘int’ in declaration of ‘class’ [-Wimplicit-int]|
/usr/include/wx-3.0/wx/strconv.h|47|error: expected ‘,’ or ‘;’ before ‘wxMBConv’|
/usr/include/wx-3.0/wx/strconv.h|183|warning: data definition has no type or storage class|
/usr/include/wx-3.0/wx/strconv.h|183|warning: type defaults to ‘int’ in declaration of ‘class’ [-Wimplicit-int]|
/usr/include/wx-3.0/wx/strconv.h|183|error: expected ‘,’ or ‘;’ before ‘wxMBConvLibc’|
/usr/include/wx-3.0/wx/strconv.h|205|warning: data definition has no type or storage class|
/usr/include/wx-3.0/wx/strconv.h|205|warning: type defaults to ‘int’ in declaration of ‘class’ [-Wimplicit-int]|
/usr/include/wx-3.0/wx/strconv.h|205|error: expected ‘,’ or ‘;’ before ‘wxConvBrokenFileNames’|
/usr/include/wx-3.0/wx/strconv.h|251|warning: data definition has no type or storage class|
/usr/include/wx-3.0/wx/strconv.h|251|warning: type defaults to ‘int’ in declaration of ‘class’ [-Wimplicit-int]|
/usr/include/wx-3.0/wx/strconv.h|251|error: expected ‘,’ or ‘;’ before ‘wxMBConvUTF7’|
/usr/include/wx-3.0/wx/strconv.h|341|warning: data definition has no type or storage class|
/usr/include/wx-3.0/wx/strconv.h|341|warning: type defaults to ‘int’ in declaration of ‘class’ [-Wimplicit-int]|
/usr/include/wx-3.0/wx/strconv.h|341|error: expected ‘,’ or ‘;’ before ‘wxMBConvStrictUTF8’|
/usr/include/wx-3.0/wx/strconv.h|360|warning: data definition has no type or storage class|
/usr/include/wx-3.0/wx/strconv.h|360|warning: type defaults to ‘int’ in declaration of ‘class’ [-Wimplicit-int]|
/usr/include/wx-3.0/wx/strconv.h|360|error: expected ‘,’ or ‘;’ before ‘wxMBConvUTF8’|
/usr/include/wx-3.0/wx/strconv.h|393|warning: data definition has no type or storage class|
/usr/include/wx-3.0/wx/strconv.h|393|warning: type defaults to ‘int’ in declaration of ‘class’ [-Wimplicit-int]|
/usr/include/wx-3.0/wx/strconv.h|393|error: expected ‘,’ or ‘;’ before ‘wxMBConvUTF16Base’|
/usr/include/wx-3.0/wx/strconv.h|412|warning: data definition has no type or storage class|
/usr/include/wx-3.0/wx/strconv.h|412|warning: type defaults to ‘int’ in declaration of ‘class’ [-Wimplicit-int]|
/usr/include/wx-3.0/wx/strconv.h|412|error: expected ‘,’ or ‘;’ before ‘wxMBConvUTF16LE’|
/usr/include/wx-3.0/wx/strconv.h|426|warning: data definition has no type or storage class|
/usr/include/wx-3.0/wx/strconv.h|426|warning: type defaults to ‘int’ in declaration of ‘class’ [-Wimplicit-int]|
/usr/include/wx-3.0/wx/strconv.h|426|error: expected ‘,’ or ‘;’ before ‘wxMBConvUTF16BE’|
/usr/include/wx-3.0/wx/strconv.h|440|warning: data definition has no type or storage class|
/usr/include/wx-3.0/wx/strconv.h|440|warning: type defaults to ‘int’ in declaration of ‘class’ [-Wimplicit-int]|
/usr/include/wx-3.0/wx/strconv.h|440|error: expected ‘,’ or ‘;’ before ‘wxMBConvUTF32Base’|
/usr/include/wx-3.0/wx/strconv.h|458|warning: data definition has no type or storage class|
/usr/include/wx-3.0/wx/strconv.h|458|warning: type defaults to ‘int’ in declaration of ‘class’ [-Wimplicit-int]|
/usr/include/wx-3.0/wx/strconv.h|458|error: expected ‘,’ or ‘;’ before ‘wxMBConvUTF32LE’|
/usr/include/wx-3.0/wx/strconv.h|472|warning: data definition has no type or storage class|
/usr/include/wx-3.0/wx/strconv.h|472|warning: type defaults to ‘int’ in declaration of ‘class’ [-Wimplicit-int]|
/usr/include/wx-3.0/wx/strconv.h|472|error: expected ‘,’ or ‘;’ before ‘wxMBConvUTF32BE’|
/usr/include/wx-3.0/wx/strconv.h|488|warning: data definition has no type or storage class|
/usr/include/wx-3.0/wx/strconv.h|488|warning: type defaults to ‘int’ in declaration of ‘class’ [-Wimplicit-int]|
/usr/include/wx-3.0/wx/strconv.h|488|error: expected ‘,’ or ‘;’ before ‘wxCSConv’|
/usr/include/wx-3.0/wx/strconv.h|576|error: unknown type name ‘wxMBConv’|
/usr/include/wx-3.0/wx/dlimpexp.h|116|note: in definition of macro ‘WXDLLIMPEXP_DATA_BASE’|
/usr/include/wx-3.0/wx/strconv.h|576|note: in expansion of macro ‘WX_DECLARE_GLOBAL_CONV’|
/usr/include/wx-3.0/wx/strconv.h|576|error: unknown type name ‘wxMBConv’|
/usr/include/wx-3.0/wx/strconv.h|565|note: in definition of macro ‘WX_DECLARE_GLOBAL_CONV’|
/usr/include/wx-3.0/wx/strconv.h|566|error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘&’ token|
/usr/include/wx-3.0/wx/strconv.h|576|note: in expansion of macro ‘WX_DECLARE_GLOBAL_CONV’|
/usr/include/wx-3.0/wx/strconv.h|580|error: unknown type name ‘wxCSConv’|
/usr/include/wx-3.0/wx/dlimpexp.h|116|note: in definition of macro ‘WXDLLIMPEXP_DATA_BASE’|
/usr/include/wx-3.0/wx/strconv.h|580|note: in expansion of macro ‘WX_DECLARE_GLOBAL_CONV’|
/usr/include/wx-3.0/wx/strconv.h|580|error: unknown type name ‘wxCSConv’|
/usr/include/wx-3.0/wx/strconv.h|565|note: in definition of macro ‘WX_DECLARE_GLOBAL_CONV’|
/usr/include/wx-3.0/wx/strconv.h|566|error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘&’ token|
/usr/include/wx-3.0/wx/strconv.h|580|note: in expansion of macro ‘WX_DECLARE_GLOBAL_CONV’|
/usr/include/wx-3.0/wx/strconv.h|583|error: unknown type name ‘wxMBConvStrictUTF8’|
/usr/include/wx-3.0/wx/dlimpexp.h|116|note: in definition of macro ‘WXDLLIMPEXP_DATA_BASE’|
/usr/include/wx-3.0/wx/strconv.h|583|note: in expansion of macro ‘WX_DECLARE_GLOBAL_CONV’|
/usr/include/wx-3.0/wx/strconv.h|583|error: unknown type name ‘wxMBConvStrictUTF8’|
/usr/include/wx-3.0/wx/strconv.h|565|note: in definition of macro ‘WX_DECLARE_GLOBAL_CONV’|
/usr/include/wx-3.0/wx/strconv.h|566|error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘&’ token|
/usr/include/wx-3.0/wx/strconv.h|583|note: in expansion of macro ‘WX_DECLARE_GLOBAL_CONV’|
/usr/include/wx-3.0/wx/strconv.h|586|error: unknown type name ‘wxMBConvUTF7’|
/usr/include/wx-3.0/wx/dlimpexp.h|116|note: in definition of macro ‘WXDLLIMPEXP_DATA_BASE’|
/usr/include/wx-3.0/wx/strconv.h|586|note: in expansion of macro ‘WX_DECLARE_GLOBAL_CONV’|
/usr/include/wx-3.0/wx/strconv.h|586|error: unknown type name ‘wxMBConvUTF7’|
/usr/include/wx-3.0/wx/strconv.h|565|note: in definition of macro ‘WX_DECLARE_GLOBAL_CONV’|
/usr/include/wx-3.0/wx/strconv.h|566|error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘&’ token|
/usr/include/wx-3.0/wx/strconv.h|586|note: in expansion of macro ‘WX_DECLARE_GLOBAL_CONV’|
/usr/include/wx-3.0/wx/strconv.h|596|error: unknown type name ‘wxMBConv’|
/usr/include/wx-3.0/wx/dlimpexp.h|116|note: in definition of macro ‘WXDLLIMPEXP_DATA_BASE’|
/usr/include/wx-3.0/wx/strconv.h|603|error: unknown type name ‘wxMBConv’|
/usr/include/wx-3.0/wx/dlimpexp.h|116|note: in definition of macro ‘WXDLLIMPEXP_DATA_BASE’|
/usr/include/wx-3.0/wx/strconv.h|606|error: unknown type name ‘wxCSConv’|
/usr/include/wx-3.0/wx/dlimpexp.h|116|note: in definition of macro ‘WXDLLIMPEXP_DATA_BASE’|
/usr/include/wx-3.0/wx/strconv.h|606|note: in expansion of macro ‘WX_DECLARE_GLOBAL_CONV’|
/usr/include/wx-3.0/wx/strconv.h|606|error: unknown type name ‘wxCSConv’|
/usr/include/wx-3.0/wx/strconv.h|565|note: in definition of macro ‘WX_DECLARE_GLOBAL_CONV’|
/usr/include/wx-3.0/wx/strconv.h|566|error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘&’ token|
/usr/include/wx-3.0/wx/strconv.h|606|note: in expansion of macro ‘WX_DECLARE_GLOBAL_CONV’|
/usr/include/wx-3.0/wx/strconv.h|613|error: unknown type name ‘wxMBConv’|
||More errors follow but not being shown.|
||Edit the max errors limit in compiler options...|
||=== Build finished: 50 error(s), 28 warning(s) (0 minute(s), 0 second(s)) ===|
Am I getting all of these errors because I'm adding sqlite3.c to mix in with the *.cpp files?

I just want to know how to use SQLite3 with a C::B GUI. That's all! Help me get this sorted out and I'll get out of your hair for life. I've been fighting this for over a month. Haven't said a word here because those here who know how to do things are already stretched thin as hell. And I'm not talking abt queries and stuff like that. I can do sql. I just want to know how to access SQLite3 in a C::B GUI.
47
Development / Re: Give (some) user the right to edit sf Tickets
« Last post by oBFusCATed on April 20, 2018, 01:08:44 am »
Mark them as patch... Or tell me and I'll mark them if I've forgotten.
48
Development / Re: Ticket #108 App crashes when pressing F9 / compile+run
« Last post by BlueHazzard on April 20, 2018, 12:40:32 am »
Still a problem with wx3.0.2 on win 7 64bit

interesting that a conversion from "internal" utf16 to "external" utf16 fails, but
Code: [Select]
wxString msg = wxT("abcă");
    const char *pppp = msg.ToUTF8();
is working like a charm....

Anyway: codeblocks should not crash if a conversation fails, so there should be a null check, because wxString::mb_str() can fail:
http://docs.wxwidgets.org/trunk/classwx_string.html
Quote
String in the current locale encoding implicitly or using c_str() or mb_str() methods. This is a potentially destructive operation as an empty string is returned if the conversion fails.
49
Development / Re: Give (some) user the right to edit sf Tickets
« Last post by BlueHazzard on April 19, 2018, 11:58:41 pm »
it is not about the devs, its about me... i keep opening tickets where a patch is already posted... would like to have a mechanism to see where a patch is already posted...
50
Development / Re: Give (some) user the right to edit sf Tickets
« Last post by oBFusCATed on April 19, 2018, 08:51:45 pm »
In my opinion pending is used when a dev has decided to check this patch, so the patch is pending commit.
This tells other devs that someone is working on this patch.

Don't worry about your patches. I know about them, but I'm doing something else at the moment.
Soon I'll be in patch-apply-spree and I'll check them.
Pages: 1 2 3 4 [5] 6 7 8 9 10