[Mingw-users] Trouble compiling code win7 32 bit.

Back to archive index
Eli Zaretskii eliz****@gnu*****
Sun Jun 23 03:00:09 JST 2019


> From: sunwukong <sunwu****@hughe*****>
> Date: Sat, 22 Jun 2019 10:21:50 -0700
> 
> I have found some code to solve a surveying problem that I have. 
> Finding the coordinates where a ray or second line will cross a target 
> line defined by two end points.
> 
> I have installed mingw on my hard drive.  And it seems to be trying but 
> failing.  I am unsure of what the header lines that are commented out 
> do.  I am assuming that
> g++ calls the compile

Yes.

> -o intercept is telling g++ to put the output (.exe) file into

Yes.

> -I/user/local tells g++ where to get the input file of intercept.cpp

No, it tells where to find the header files.  But you don't need
that, as g++ will find its include directory automatically.

>   -LGeographic -Wl.-rpoath=/usr/local/lib tells g++ to look in 
> /usr/local/lib with the option -Wl. (????)

This is not needed with MinGW.

> Is it polite /proper to ask someone to compile this to a win32 .exe file 
> so I can try to see if it gives good results.

I don't know, but then I don't see why it shouldn't compile for you.
You didn't show any error messages, so it's hard to tell.

> Would this even work on my computer? If my installation of the Lib fils 
> are not "standard" in some obtuse way?

Yes, it will work, assuming that Gnomonic and Geodesic don't have
their code in a library, only in the 2 .hpp files.

> Is there a manual of the compile (in Win / DOS command wiondow)?  I've 
> found some brief "how-to" files but they do not answer my questions.

Just using the command you used should work, I think.

> // Find intersection of two geodesics
> // Compile with, e.g.,
> // g++ -o intercept -I/usr/local intercept.cpp \
> //    -lGeographic -Wl,-rpath=/usr/local/lib
> 
> #include <iostream>
> #include <iomanip>
> #include <C:\mingw\bin\Gnomonic.hpp>
> #include <C:\mingw\bin\Geodesic.hpp>

You didn't show these two files, and didn't tell where they come
from.  So it's hard to try to do anything with this code.



More information about the MinGW-Users mailing list
Back to archive index