Compilation QGIS under Linux for Windows

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Compilation QGIS under Linux for Windows

Jack R
Hi list,

My goal is to develop a C++ plugin, which will run under QGIS. I'm
developing under Linux and having trouble making compiled plugin binary
work under Windows. Here is what I did:

I compiled QGIS from svn under Linux for Windows using Cmake and MinGW.
Then I tried to put compiled plugins in plugins folder for MSVC build
QGIS from http://qgis.org/en/download/unstable-software.html.
But after I run OSGeo/QGIS it does not see this plugins.

I then run MinGW/QGIS with its plugins and QGIS was able to load my
plugin under Win without problems. But when I put plugins from MSVC
build QGIS to MinGW build QGIS it cannot see them again.

My question is, does anybody know how to tune MinGW to build compatible
binaries of plugins whith MSVC build QGIS?

I will appreciate any advice.

System
OS: Gentoo
MinGW: 4.4.0
Qt: 4.5.2
gdal: 1.6.2
geos: 3.1.1
gsl: 1.12
proj: 4.6.1
sqlite: 3.6.16
_______________________________________________
Qgis-developer mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/qgis-developer
Reply | Threaded
Open this post in threaded view
|

WG: Compilation QGIS under Linux for Windows

Hugentobler  Marco



-----Urspr√ľngliche Nachricht-----
Von: Hugentobler  Marco
Gesendet: Di 04.08.2009 19:17
An: Jack R
Betreff: AW: [Qgis-developer] Compilation QGIS under Linux for Windows
 
Hi Jack

You need to compile your plugin with the same compiler QGIS is compiled with (e.g. you need to use msvc to compile plugins that run with the msvc build). This is because every C++ compiler has its own calling convention, so you cannot link binaries of different compilers. This is only possible with C code, where you have a much simpler and standardised calling convention compared to C++.

Regards,
Marco


-----Urspr√ľngliche Nachricht-----
Von: [hidden email] im Auftrag von Jack R
Gesendet: Di 04.08.2009 18:36
An: [hidden email]
Betreff: [Qgis-developer] Compilation QGIS under Linux for Windows
 
Hi list,

My goal is to develop a C++ plugin, which will run under QGIS. I'm
developing under Linux and having trouble making compiled plugin binary
work under Windows. Here is what I did:

I compiled QGIS from svn under Linux for Windows using Cmake and MinGW.
Then I tried to put compiled plugins in plugins folder for MSVC build
QGIS from http://qgis.org/en/download/unstable-software.html.
But after I run OSGeo/QGIS it does not see this plugins.

I then run MinGW/QGIS with its plugins and QGIS was able to load my
plugin under Win without problems. But when I put plugins from MSVC
build QGIS to MinGW build QGIS it cannot see them again.

My question is, does anybody know how to tune MinGW to build compatible
binaries of plugins whith MSVC build QGIS?

I will appreciate any advice.

System
OS: Gentoo
MinGW: 4.4.0
Qt: 4.5.2
gdal: 1.6.2
geos: 3.1.1
gsl: 1.12
proj: 4.6.1
sqlite: 3.6.16
_______________________________________________
Qgis-developer mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/qgis-developer


_______________________________________________
Qgis-developer mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/qgis-developer