I am trying to use Geographic lib in a Qt project (Qt 5.13.0 MinGw 64-bit) but building the library with CMake is not working for me(I spent the last two days trying to figure it out) and I was wondering if Qt is stil supored and if there is another way to use the library in Qt(without having to build it using CMake). Maybe if someone can post commands that worked for them in Qt 5.13.0 that would be great.
Thanks for your time
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
It's not clear to what extent your question is about the coupling for
GeographicLib and Qt or is a problem with one or both of these packages
separately. So here are two questions:
Can you build an application which uses Qt but not GeographicLib? If
the answer is no, then you need to take the question to a forum which
addresses Qt questions.
Can you build an application which uses GeographicLib but not Qt? If
the answer is no, then I should be able to help you.
If the answer to these questions is yes, and you still can't build an
application which uses both, then you'll need to describe in detail
how you set up the two libraries and how you're trying to link to them.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
Anonymous
-
2019-12-13
Sorry for not being clear.
I am trying to build GeographicLib as described by this site so that I can use the library in Qt Creator (With the Desktop Qt 5.13.0 MinGw 64-bit kit). I cant build the GeographicLib library as described here using CMake.
The way I understand it is that I should :
1. Build the library as described here
2. Add the library to my Qt Widgets Aplication.
I am strugeling with step one(to build the library using CMake).
To answer your questions I can build an application witch uses Qt and not geographic lib but I cant build the geographic lib library. So my question is how do you build the GeograhicLib library so that it can be used in Qt Creator.
Thanks for your time
Regards
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Whoops, leave out the "-m" in cygpath! I'll fix the documentation.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
Anonymous
-
2019-12-13
I changed left out the "-m" in cygpath and changed the export path as you sugested but I am still getting errors. Do you think I maybe installed CMake or Cygwin incorrectley or might there be someting else wrong?
You may have messing up your PATH environment thoroughly. You need the
command
typegcctypeg++
to return the paths to the Qt versions of the compilers. If this isn't
the case, start a new shell and try again. I don't have a MinGW version
of Qt installed on my system. However I assume
C:/Qt/Tools/mingw730_64/bin
contains these compilers?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
Anonymous
-
2019-12-13
The commands return the following:
$ type gcc
gcc is /cygdrive/c/Qt/Tools/mingw730_64/bin/gcc
$ type g++
g++ is /cygdrive/c/Qt/Tools/mingw730_64/bin/g++
so C:/Qt/Tools/mingw730_64/bin contains the compilers?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The path seems to be the same. I think the double C: might have been me when I pasted C:/path/to/my/GeographicLib-1.50 over the real path(just to make it easier to understand)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
Anonymous
-
2019-12-13
I deleted the GeographicLib file and extracted a new one in the same location witch changed the errors a bit:
Good day,
I am trying to use Geographic lib in a Qt project (Qt 5.13.0 MinGw 64-bit) but building the library with CMake is not working for me(I spent the last two days trying to figure it out) and I was wondering if Qt is stil supored and if there is another way to use the library in Qt(without having to build it using CMake). Maybe if someone can post commands that worked for them in Qt 5.13.0 that would be great.
Thanks for your time
It's not clear to what extent your question is about the coupling for
GeographicLib and Qt or is a problem with one or both of these packages
separately. So here are two questions:
Can you build an application which uses Qt but not GeographicLib? If
the answer is no, then you need to take the question to a forum which
addresses Qt questions.
Can you build an application which uses GeographicLib but not Qt? If
the answer is no, then I should be able to help you.
If the answer to these questions is yes, and you still can't build an
application which uses both, then you'll need to describe in detail
how you set up the two libraries and how you're trying to link to them.
Sorry for not being clear.
I am trying to build GeographicLib as described by this site so that I can use the library in Qt Creator (With the Desktop Qt 5.13.0 MinGw 64-bit kit). I cant build the GeographicLib library as described here using CMake.
The way I understand it is that I should :
1. Build the library as described here
2. Add the library to my Qt Widgets Aplication.
I am strugeling with step one(to build the library using CMake).
These are the commands I enter in cyqwin
The on;ey thing I changed from here is in stead of saying :
I say
so that I dont have to "maunualy" delete the BUILD directory if there was a problem with CMake. The output I get is the following :
To answer your questions I can build an application witch uses Qt and not geographic lib but I cant build the geographic lib library. So my question is how do you build the GeograhicLib library so that it can be used in Qt Creator.
Thanks for your time
Regards
Just taking a stab at your problem here... Try changing
to
This is what the documentation tells you to do!
I changed it like you said but I am still getting the same errors
Whoops, leave out the "-m" in cygpath! I'll fix the documentation.
I changed left out the "-m" in cygpath and changed the export path as you sugested but I am still getting errors. Do you think I maybe installed CMake or Cygwin incorrectley or might there be someting else wrong?
Here are the errors:
Sorry for asking all these questions I am new to CMake and Cygwin. And thanks for all your help
You may have messing up your PATH environment thoroughly. You need the
command
to return the paths to the Qt versions of the compilers. If this isn't
the case, start a new shell and try again. I don't have a MinGW version
of Qt installed on my system. However I assume
contains these compilers?
The commands return the following:
so
C:/Qt/Tools/mingw730_64/bin
contains the compilers?Please restart your shell, set your PATH, and verify with
that it is sane. The presence of the double C: in
indicates that something is awry.
The path seems to be the same. I think the double C: might have been me when I pasted
C:/path/to/my/GeographicLib-1.50
over the real path(just to make it easier to understand)I deleted the GeographicLib file and extracted a new one in the same location witch changed the errors a bit:
I am able to get an output now but the bin and lib files are emptey
You still need to do the steps:
Sorry for replying so late. It worked Thanks for all your help I apreciate it!