News:

When registered with our forums, feel free to send a "here I am" post here to differ human beings from SPAM bots.

Main Menu

wxUSE_ODBC (Sample ddatabase project for wxWidgets)

Started by DaveK, July 25, 2006, 02:56:04 AM

Previous topic - Next topic

DaveK

In trying to compile the wx263/sample/db for wxWidgets I am constantly getting the following error

#error Sample cannot be compiled unless setup.h has wxUSE_ODBC set to 1

I set the setup.h file accordingly. I even recompiled wxWidgets using the USE_ODBC flag set to 1. This error still persists. Is there another lib I should have included? I tried located a lib that may be database related but could find none. Is this just a sample that doesn't work? Is there more to this error than is being stated?

Thanks for the help!

DaveK

well I can get around this error by simply defining wxUSE_ODBC 1 in the header files of my project. Somehow, somewhere this must get undefined or set back to zero. Strange. however there has emerged another issue.

it says there is an undefined reference to SQLGetConnectOptionW@12.

I have located this method under wx/isqlext.h. If I include this though the compile balks about redefinitions with isql.h. So I removed that #define call, however the problem remains... how do I get this method linked properly?

Thanks!

kidmosey

'setup_microwin.h' Is the only header I see that undefines wxUSE_ODBC.  So if you aren't including this file manually (because I didn't find any other headers that included it), then you may be including the wrong setup.h either when you compiled wxWidgets or when you compiled your Application.
3 years until google knows more than god.

DaveK

I think I'm using the right setup.h. Right now I am running into the following error message, "The procedure entry point _ZN14wxDbConnectInf... blah blah blah in dynamic link library wxmsw26u_gcc_custom.dll" So I believe this is telling me maybe I should make sure my dll library is up to date, so I downloaded the more recent dll library. I am noticing the library i download is called wx26u_gcc_cb.dll not gcc_custom. not sure where I got the gcc_custom dll library from and now I'm a bit confused on how I got wxmsw26u_gcc_custom.dll linked to codeblocks. Can someone refresh my memory on how I link this dll into code blocks? Am I stating that question right? Am I even on the right track with this error?

Thanks!
:D

Ceniza

You're completely lost :shock:

What you need to do is to download the wxWidgets' sources and compile them with db support. You can find how to build wxWidgets in the Code::Blocks' wiki but you'll have to find somewhere in the docs (it comes with the sources of wxWidgets) how to enable the ODBC bit for it. I suggest to use only the docs.

Just using the dll provided in the nightlies won't help.

DaveK

Quote from: Ceniza on July 27, 2006, 12:04:06 AM
You're completely lost :shock:

This doesn't surprise me.  :(

Quote from: Ceniza on July 27, 2006, 12:04:06 AM
What you need to do is to download the wxWidgets' sources and compile them with db support. You can find how to build wxWidgets in the Code::Blocks' wiki but you'll have to find somewhere in the docs (it comes with the sources of wxWidgets) how to enable the ODBC bit for it. I suggest to use only the docs.

Just using the dll provided in the nightlies won't help.

I have a feeling I have already done this but I will look into the docs again and see. Thanks!