Re: Trouble compiling code win7 32 bit.

Eli Zaretskii <eliz-mXXj517/[email protected]>
Newsgroups gmane.comp.gnu.mingw.user
Message-ID <[email protected]>
> From: sunwukong <[email protected]>
> 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.

_______________________________________________
MinGW-Users mailing list
[email protected]

This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.osdn.me/mailman/listinfo/mingw-users
Also: mailto:[email protected]?subject=unsubscribe
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.