Bug report #1214

Python not loading in Windows QGIS (build from source)

Added by Steven Mizuno over 15 years ago. Updated over 14 years ago.

Status:Closed
Priority:Low
Assignee:nobody -
Category:Build/Install
Affected QGIS version: Regression?:No
Operating System:Windows Easy fix?:No
Pull Request or Patch supplied: Resolution:fixed
Crashes QGIS or corrupts data: Copied to github as #:11274

Description

For Windows platform, when I build from source the file libqgispython.dll is not loaded by QGIS, therefore there is no Python support.

I have found in src/app/qgisapp.cpp in line 3820 (file is r9003)

QString pythonlibName("qgispython");

If I make the string "libqgispython" then the .dll is loaded and Python support is available.

With Linux the name doesn't seem to matter.

So, for Windows the name should be "libqgispython" or the file should be built as qgispython.dll

Associated revisions

Revision 6884c502
Added by Jürgen Fischer over 15 years ago

fix library naming on MinGW (fixes #1214)

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@9030 c8812cc2-4d05-0410-92ff-de0c093fc19c

Revision 4040ddd6
Added by Jürgen Fischer over 15 years ago

fix library naming on MinGW (fixes #1214)

git-svn-id: http://svn.osgeo.org/qgis/trunk@9030 c8812cc2-4d05-0410-92ff-de0c093fc19c

History

#1 Updated by Jürgen Fischer over 15 years ago

  • Resolution set to fixed
  • Status changed from Open to Closed

MinGW issue fixed in 4040ddd6 (SVN r9031)

#2 Updated by Steven Mizuno over 15 years ago

  • Resolution deleted (fixed)
  • Status changed from Closed to Feedback

I am reopening this ticket because 4040ddd6 (SVN r9031) builds the dll as liblibqgispython.dll, which won't be loaded unless it is renamed to qgispython.dll.

I neglected to mention that it was MinGW that I was building with, but you picked up on it. Thanks.

I believe the the file should be referenced from qgisapp.cpp by the name "libqgispython" rather than "qgispython". This is what I have been doing when I build for Windows and Mandriva Linux.

I don't have have any experience with MSVC building or Macs, so I'm not sure whether the name of the library and how it is referenced has any problems if the name is libqgispython in those situations.

#3 Updated by Jürgen Fischer over 15 years ago

Replying to [comment:2 smizuno]:

I am reopening this ticket because 4040ddd6 (SVN r9031) builds the dll as liblibqgispython.dll, which won't be loaded unless it is renamed to qgispython.dll.

ouch.

I neglected to mention that it was MinGW that I was building with, but you picked up on it. Thanks.

hopefully fixes the problem correctly...

#4 Updated by Steven Mizuno over 15 years ago

  • Resolution set to fixed
  • Status changed from Feedback to Closed

Replying to [comment:3 jef]:

hopefully fixes the problem correctly...

Yes, the problem is fixed. Thank you.

I am closing the ticket.

#5 Updated by Anonymous over 14 years ago

Milestone Version 1.0.0 deleted

Also available in: Atom PDF