file not recognized: File format not recognized [message #759517] |
Mon, 28 November 2011 21:45 |
deerie_2000 Messages: 2 Registered: November 2011 |
Junior Member |
|
|
Hi, I'm trying to compile and I get the following error output:
**** Build of configuration Debug for project Lab8 ****
**** Internal Builder is used for build ****
g++ -o Lab8.exe Lab_8_3.o KMLWriter.o ..\..\lab_8_2\GeoTools.o
..\..\lab_8_2\GeoTools.o: file not recognized: File format not recognized
collect2: ld returned 1 exit status
Build error occurred, build is stopped
Time consumed: 163 ms.
The code is:
#include <iostream>
#include <iomanip>
#include <vector>
#include <cmath>
#include "Coordinate.h"
#include "GeoTools.h"
#include "KMLWriter.h"
using namespace std;
// define the mathematical constant 'pi'
const double pi = atan(1.0) * 4.0;
int main()
{
Coordinate startPt, endPt;
double distance = 0, direction = 0;
// read the start point info
cout << "Enter the starting point information..." << endl;
startPt = ReadCoordinate();
// read the end point info
cout << "Enter the ending point information..." << endl;
endPt = ReadCoordinate();
// compute distance and starting direction
ComputeDistanceAndDirection( startPt, endPt, distance, direction );
// output the results, including the names of the two points
cout << "To travel from " << startPt.label << " to " << endPt.label << endl
<< fixed << setprecision(2)
<< " Start direction (clockwise from North) : " << direction * 180.0 / pi << " degrees" << endl
<< setprecision(1)
<< " Distance : " << distance << " km" << endl;
// the following is a vector of 'Coordinate' objects that collectively form a path
vector<Coordinate> path;
// ADD CODE HERE TO:
// 1) Add the start point to the path.
// 2) Add a new point to the path starting at 0 km (i.e., the start point) and then at every 50 km until
// the final destination. You can call the ComputeLatitudeAndLongitude() function to help with this.
// 3) Add the end point to the path.
// ADD CODE HERE TO OUTPUT THE LATITUDE AND LONGITUDE OF EACH POINT ALONG THE PATH TO THE SCREEN
// NOTE: The following function is included to print the path to a *.kml file that can be opened
// in Google Earth. You are NOT responsible for knowing how this works, but you are welcome
// to look at the code in the KMLWrite.cpp file if you are interested.
KML_Print( startPt, endPt, path );
return 0;
}
|
|
|
Re: file not recognized: File format not recognized [message #759522 is a reply to message #759517] |
Mon, 28 November 2011 22:26 |
|
On 28-Nov-11 14:45, deerie_2000 wrote:
> Hi, I'm trying to compile and I get the following error output:
>
>
> **** Build of configuration Debug for project Lab8 ****
>
> **** Internal Builder is used for build ****
> g++ -o Lab8.exe Lab_8_3.o KMLWriter.o ..\..\lab_8_2\GeoTools.o
> .\..\lab_8_2\GeoTools.o: file not recognized: File format not recognized
> collect2: ld returned 1 exit status
> Build error occurred, build is stopped
> Time consumed: 163 ms.
>
> [snip]
This is probably a C/C++ issue. Please see sticky post at top of forum.
You are better off asking this sort of thing in the Eclipse CDT forum.
|
|
|
Powered by
FUDForum. Page generated in 0.03095 seconds