Building 32-bit Qt Mysql plugin fails with MinGw - mysql

I'm building a MySQL plugin for Qt 4.4.3 Open Source Edition (Qt documentation), and using command:
cd %QTDIR%\src\plugins\sqldrivers\mysql
qmake "INCLUDEPATH+=C:\MySQL\include" "LIBS+=C:\MYSQL\MySQL Server <version>\lib\opt\libmysql.lib" mysql.pro
make
I manage to build it to my 64-bit Qt just fine using 64-bit MySQL dev files (using nmake). However, 32-bit build (with mingw-make) fails with linking problems:
Creating library file: c:\Coding\Qt\4.4.3\plugins\sqldrivers\libqsqlmysqld4.a
tmp/obj/debug_shared/qsql_mysql.o(.text+0x10d): In function `Z5codecP8st_mysql':
...lots of same stuff...
The dev files installed by MySQL 5.1 32-bit and 64-bit library are also different: the 64-bit includes libmysql.dll and six .lib files, while 32-bit includes those plus six .pdb files. Relevant to this issue?
Is anyone able to build the 32-bit plugin with Qt 4.4.3/MinGW using MySQL 5.1? Suggestions?

use mysql-noinstall-5.1.14-beta-win32

Related

Is NVRTC unavailable for Win32?

I'm running Python27 x32 and getting this error:
Could not load "nvrtc64_75.dll": %1 is not a valid Win32 application.
I've also tried with cuda8.
As I realized, NVRTC docs list x64 as a requirement:
NVRTC requires the following system configuration:
Operating System: Linux x86_64, Linux ppc64le, Linux aarch64, Windows x86_64, or Mac OS X.
(nvrtc64_75.dll really does have 0x8664 in IMAGE_FILE_HEADER and 0x20b (pe32+) magic.)
I'm trying to use libgpuarray's pygpu with theano and I've previously built it with Win32 mingw.
My understanding now is that I'll need to install an x64 version of python and start from there. I know I could use conda instead and the docs in libgpuarray talk about msvc, btw. it worked with mingw so far.
Am I interpreting this right? Is NVRTC really have no working Win32 edition?
edit: got the same %1 is not a valid Win32 error with conda x32 and msvc (no real surprise here).
Just as the documentation you linked indicates, NVRTC requires a 64-bit environment.

create 32 bit using 64 bit netbeans javapackager

i have a java swing application made using
netbeans (jdk1.8.0_111)
jre1.8.0_111
pavapckager to create exe file
application has some library's
When i package i get a 64bit installer using javapackager which is expected.
I am trying to create a 32bit installer.
i have tried:
installing 32 bit jre and jdk
setting path to the 32bit version
changing netbeans config to use:
netbeans_jdkhome="C:\Program Files (x86)\Java\jdk1.8.0_111"
using : -Bruntime="C:\Program Files (x86)\Java\jdk1.8.0_111\jre" in the javapackager
How do i create a 32 bit Self-Contained Application Packaging using javapackager on a 64 bit windows system using netbeans
after restarting my pc everything started to work.
this is what i done:
Install 32 bit jdk and jre
In netbeans project add a new platform and choose the 32 bit version (restart pc)
Install inno and set path.
run javapackager specifing the 32 bit i.e javapackager -deploy -native exe -B
systemWide=true -Bruntime="C:\Program Files (x86)\Java\jdk1.8.0_111\jre" -Bshort
cutHint=true -outdir packages ...etc
test with Exe64bitDetector

Installing QMYSQL driver

Basically when I try to connect to the mysql database i get this error:
QSqlDatabase: QMYSQL driver not loaded
QSqlDatabase: available drivers: QSQLITE QODBC QODBC3
I tried to install the drivers, extracting just qtbase from http://download.qt-project.org/official_releases/qt/5.0/5.0.2/single/qt-everywhere-opensource-src-5.0.2.zip and placing it in my Qt directory. I have also followed this guide by inbush: http://www.qtcentre.org/threads/45295-using-mysql-plugin doing this: http://puu.sh/3nyG9.png
inbush says to copy libmysql.dll from C:\mysql\bin to C:\Qt\bin but I didn't find libmysql.dll in bin, but I did find it in lib. So I took that and went to my Qt\bin, and noticed that it was just these files http://puu.sh/3nB5m.png so I thought to place it in Qt\lib instead. I tried re-running my project but it still gave me the same error. My .pro file does indeed have Qt += sql, and I did run qmake afterwards. What am I doing wrong?
Take a look at this post for Qt5, there's also a seperate set of instructions for Qt4 (although somewhat similar).
Qt - How to get|compile Mysql driver
Download a version of MySQL
Download Qt source
Build the MySQL plugin for Qt
Copy the DLL from the MySQL install folder to a Qt folder (see link above)
Copy the DLL you built for the Qt MySQL plugin to a Qt folder
And obviously, when you distribute you'll need to remember to package those DLLs together (always check dependency walker)

MySQL++ Application error at launch

I compiled MySQL++ with no issues. When I launched some of the executables (resetdb.exe and simple1.exe) they suggest to run to test if the installation has been successful, the first error I got was that libmysql.dll was missing.
Adding its path to the PATH environment variable did not fix the problem, even after launching a new command prompt; I had to copy the DLL in the directory where MySQL++ executables are.
Now the DLL is found, but I get this error:
simple1.exe - Application error
The application was unable to start correctly (0xc000007b).
Click OK to close the application.
even launching from the command line, I get no more information than these.
Thank you for any help!
MySQL 5.5 -
MySQL++ 3.0.9 -
Windows 7 64 bits -
MINGW32 -
GCC 4.4.0
0xC000007B is a Windows error that means the executable is corrupted. It could refer either to simple1.exe or to one of the DLLs it's linking against.
Some reasons this could happen:
You're mixing toolchains in an incompatible way. In your case, you may have built simple1.exe using pieces built by MinGW GCC and pieces built by Visual C++. MinGW should be compatible with any pure C DLL built by Visual C++, including the MySQL C API DLL. However, you may have other pieces interfering. MinGW isn't compatible with VC++ at the C++ level, but then, it shouldn't have linked at all if this were your problem.
You didn't follow the MySQL C API import library build steps in README-MinGW.txt. You either missed a step, or skipped it entirely and are trying to use the import library that shipped with MySQL.
In your previous gyrations, you ended up with a corrupt object file, which got linked in. Try saying make clean all at the top level of MySQL++ to force a complete rebuild.
You're mixing versions of MySQL or MySQL++. If you have more than one version of each on the system, make sure you're consistent in their use. That is, build the C API import library from the same DLL you run the programs against, use exrun.bat to run the examples to ensure you're using the just-built version of the MySQL++ DLL instead of another you have in your PATH, etc.
Additionally, I note that you're using an older version of MySQL++. If you were on Linux, I could understand that as some distributions still ship with 3.0.9. But since you have to build MySQL++ from source with MinGW, I don't see why you're not using 3.1.0. Did you get a binary build from somewhere?
As for your PATH problem, did you restart the MinGW shell after doing this? PATH updates don't affect running programs; they keep the value they saw when they started.

location of octave header files

I am trying to use Octave as an external solver in my C/C++ code.
I read here that one needs to include the octave/oct.h header file. However I am not able to find it on my computer. I have searched everywhere including the octave root directory version 3.0.5.
What should I do?
I found it in my Octave 3.2.2 installation in Windows: C:\Octave\3.2.2_gcc-4.3.0\include\octave-3.2.2\octave.
Are you using another operating system? If so, you may need to install the headers separately. For example, Ubuntu 10.10 has a separate octave3.2-headers package.
If you are using Windows and your Octave installation does not have the headers, you could try upgrading to 3.2.2 or greater. I got the Windows installer from Octave-Forge.
For newer versions on Ubuntu, e.g., Octave 3.8.1, the package you must install to get the headers is now called liboctave-dev
The include folder of the Octave 4.0.0 installed on Ubuntu can be found at /usr/include/octave-4.0.0/octave.