Compilation problem in the standard x86_64 libraries
Posted
by user350282
on Stack Overflow
See other posts from Stack Overflow
or by user350282
Published on 2010-05-25T20:08:08Z
Indexed on
2010/05/25
20:11 UTC
Read the original article
Hit count: 246
Hi everyone,
I am having trouble compiling a program I have written. I have two different files with the same includes but only one generates the following error when compiled with g++
/usr/lib/gcc/x86_64-linux-gnu/4.4.1/../../../../lib/crt1.o: In function `_start':
/build/buildd/eglibc-2.10.1/csu/../sysdeps/x86_64/elf/start.S:109: undefined reference to `main'
collect2: ld returned 1 exit status
The files I am including in my header are as follows:
#include <google/sparse_hash_map>
using google::sparse_hash_map;
#include <ext/hash_map>
#include <math.h>
#include <iostream>
#include <queue>
#include <vector>
#include <stack>
using std::priority_queue;
using std::stack;
using std::vector;
using __gnu_cxx::hash_map;
using __gnu_cxx::hash;
using namespace std;
Searching the internet for those two lines hasn't resulted in anything to help me. I would be very grateful for any advice. Thank you
© Stack Overflow or respective owner