Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » file not recognized: File format not recognized (linker error )
file not recognized: File format not recognized [message #759517] Mon, 28 November 2011 21:45 Go to next message
deerie_2000 is currently offline deerie_2000Friend
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 Go to previous message
Russell Bateman is currently offline Russell BatemanFriend
Messages: 3798
Registered: July 2009
Location: Provo, Utah, USA
Senior Member

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.
Previous Topic:Error on Starting AUT that is a RCP
Next Topic:Eclipse won't Start
Goto Forum:
  


Current Time: Sat Jun 19 08:55:55 GMT 2021

Powered by FUDForum. Page generated in 0.03066 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top