Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#358 closed defect (wontfix)

Cannot start QGIS from OSGeo4W terminal - qgis_core.dll is missing

Reported by: saultdon Owned by: osgeo4w-dev@…
Priority: minor Component: Package
Version: Keywords:
Cc:

Description

I can start QGIS 1.8 from the icons either on the desktop or the start menu, but I can't start QGIS from the OSGeo4W terminal.

The error that pops up says:

"qgis.exe - System Error,

The program can't start because qgis_core.dll is missing from your computer. Try reinstalling the program to fix this problem."

I tried a re-install but still get this error when launching qgis from the terminal.

I usually always have this terminal open to quickly launch applications and scripts =)

Attachments (2)

qgisdll_Error.png (22.5 KB) - added by saultdon 9 years ago.
picture of missing qgis_core.dll error
depends_walker.qgis.exe.png (58.6 KB) - added by saultdon 9 years ago.
screen of gui for "depends.exe qgis.exe"

Download all attachments as: .zip

Change History (15)

Changed 9 years ago by saultdon

Attachment: qgisdll_Error.png added

picture of missing qgis_core.dll error

comment:1 Changed 9 years ago by saultdon

qgis_core.dll is definitely there in the \OSGeo4W\apps\qgis\bin folder and again, the applicition launches fine when clicking icons on desktop or start menu.

It just doesn't launch from the OSGeo4W terminal.

I noticed in the OSGeo4W.bat and o4w_env.bat file there is this line:

for %%f in ("%OSGEO4W_ROOT%\etc\ini\*.bat") do call "%%f"

But in that \etc\ini folder, there is no bat file for qgis, is it needed there as well besides just in the \bin folder?

Changed 9 years ago by saultdon

Attachment: depends_walker.qgis.exe.png added

screen of gui for "depends.exe qgis.exe"

comment:2 Changed 9 years ago by jef

Resolution: fixed
Status: newclosed

Start qgis.bat not qgis.exe

comment:3 Changed 9 years ago by saultdon

Resolution: fixed
Status: closedreopened

When you launch "qgis" from the terminal, as seen in the first screen, the terminal is calling qgis.exe not qgis.bat

How do I fix that?

When I click on the icons on the desktop or start menu, they correctly launch qgis.bat

comment:4 Changed 9 years ago by saultdon

I use to be able to just type qgis into the terminal and it would start qgis (where it would call qgis.bat) but now it doesn't and the terminal defaults to the .exe calling qgis.exe I guess.

comment:5 in reply to:  4 ; Changed 9 years ago by jef

Replying to saultdon:

I use to be able to just type qgis into the terminal and it would start qgis (where it would call qgis.bat) but now it doesn't and the terminal defaults to the .exe calling qgis.exe I guess.

I'd just type qgis.bat.

comment:6 in reply to:  5 Changed 9 years ago by saultdon

Replying to jef:

Replying to saultdon:

I use to be able to just type qgis into the terminal and it would start qgis (where it would call qgis.bat) but now it doesn't and the terminal defaults to the .exe calling qgis.exe I guess.

I'd just type qgis.bat.

I know =P

But I'd really like to be able to just type "qgis" like all the other applications can be launched using their shortnames.

If I type qgis.bat and let that run qgis the first time, and keep the terminal open, the env vars are set fine and I can then successfully launch qgis again using just qgis without the .bat extension.

I have to re-load the vars from qgis.bat by running qgis.bat when ever the terminal is closed then opened again.

comment:7 Changed 9 years ago by jef

Priority: majorminor
Resolution: wontfix
Status: reopenedclosed

right, that's because qgis and qgis-dev can co-exists.

http://stackoverflow.com/questions/14311606/how-to-execute-bat-first-instead-of-exe-when-both-have-the-same-path-namel has a solution to prefer .bat over .exe.

comment:8 in reply to:  7 Changed 9 years ago by saultdon

Resolution: wontfix
Status: closedreopened

Replying to jef:

right, that's because qgis and qgis-dev can co-exists.

Not sure what you're trying to say... because I don't have qgis-dev installed and if it was, wouldn't qgis launch with qgis-dev and not qgis?

OK, I think this should stay open till it's actually fixed because it's not working like it should, or some instructions need to be updated (ie, in the osgeo4w list of applications as seen in the terminal, change it from qgis -> qgis.bat so users know to type qgis.bat instead of just qgis like it says).

How come it worked before where I could launch qgis with just the qgis command and now all of a sudden you have to type qgis.bat? I thought qgis would call qgis.bat like it always did in the past.

comment:9 Changed 9 years ago by jef

Resolution: fixed
Status: reopenedclosed

putting the stuff into etc/ini won't work as the settings for different qgis version would conflict - that's why the batch files are there.

That it changed is because qgis.exe was moved to the main bin, because that makes it use DLLs existing there even if a different version exists in system32 (ie. python27).

And now qgis.exe and qgis.bat both live in the same directory.

A note in pkg-qgis was added.

comment:10 in reply to:  9 Changed 9 years ago by saultdon

Resolution: fixed
Status: closedreopened

Replying to jef:

putting the stuff into etc/ini won't work as the settings for different qgis version would conflict - that's why the batch files are there.

That it changed is because qgis.exe was moved to the main bin, because that makes it use DLLs existing there even if a different version exists in system32 (ie. python27).

And now qgis.exe and qgis.bat both live in the same directory.

A note in pkg-qgis was added.

What about actually fixing it though? That "note" on that page is hidden from users running the osgeo4w terminal - ie, they won't see it! I've never even been to that page before you linked to it here.

Looks like this file/folder re-design actually broke something, or that note needs to be placed in the osgeo4w terminal to be obvious to end-users.

I don't think they will run to that page when they see the error when trying to launch qgis from the terminal or are even reading that page beforehand to learn how to run qgis from osgeo4w (b/c the terminal tells you to type qgis).

For an end-user, qgis will appear broken... I know a developer knows what to do and other technical users, but that doesn't help end users.

You need to look at this from an end-user perspective =)

comment:11 Changed 9 years ago by saultdon

Resolution: wontfix
Status: reopenedclosed

I'm gonna close this, but should I open another ticket to ask that the command reference for qgis in the list of applications in the osgeo4w terminal be updated to explicitly say qgis.bat and not simply qgis?

comment:12 in reply to:  11 Changed 9 years ago by jef

Replying to saultdon:

I'm gonna close this, but should I open another ticket to ask that the command reference for qgis in the list of applications in the osgeo4w terminal be updated to explicitly say qgis.bat and not simply qgis?

Well, that's not my idea - personally I don't like the command list anyway. I don't need a loooong list of commands, whenever I start the shell.

But "end user" won't start qgis from the shell anyway and use the shortcuts - and those work.

comment:13 Changed 9 years ago by jef

fixed in 1.8.0-7 - along with the bug in the browser batch file.

Note: See TracTickets for help on using tickets.