Author Topic: SOLVED: Strange Compiler Misconfiguration?  (Read 3953 times)

Offline arew264

  • Multiple posting newcomer
  • *
  • Posts: 22
SOLVED: Strange Compiler Misconfiguration?
« on: April 29, 2007, 05:37:25 am »
I think I did something wrong configuring the compiler options, but I can't find anything. I'm using MinGW, and I get this:
Code
-------------- Build: Debug in test ---------------
Linking console executable: bin\Debug\test.exe
obj\Debug\main.o: In function `ZSt17__verify_groupingPKcjRKSs':C:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/locale_facets.tcc:2494: undefined reference to `std::string::size() const'
:C:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/locale_facets.tcc:2503: undefined reference to `std::string::operator[](unsigned int) const'
:C:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/locale_facets.tcc:2505: undefined reference to `std::string::operator[](unsigned int) const'
:C:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/locale_facets.tcc:2508: undefined reference to `std::string::operator[](unsigned int) const'
obj\Debug\main.o: In function `main':C:/Documents and Settings/Andrew/My Documents/My Projects/SGC/Client/test/main.cpp:6: undefined reference to `_alloca'
:C:/Documents and Settings/Andrew/My Documents/My Projects/SGC/Client/test/main.cpp:6: undefined reference to `__main'
:C:/Documents and Settings/Andrew/My Documents/My Projects/SGC/Client/test/main.cpp:7: undefined reference to `std::cout'
:C:/Documents and Settings/Andrew/My Documents/My Projects/SGC/Client/test/main.cpp:7: undefined reference to `std::basic_ostream<char, std::char_traits<char> >& std::operator<< <std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*)'
:C:/Documents and Settings/Andrew/My Documents/My Projects/SGC/Client/test/main.cpp:7: undefined reference to `std::basic_ostream<char, std::char_traits<char> >& std::endl<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&)'
:C:/Documents and Settings/Andrew/My Documents/My Projects/SGC/Client/test/main.cpp:7: undefined reference to `std::ostream::operator<<(std::ostream& (*)(std::ostream&))'
obj\Debug\main.o: In function `Z41__static_initialization_and_destruction_0ii':C:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/iostream:77: undefined reference to `std::ios_base::Init::Init()'
:C:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/iostream:77: undefined reference to `std::ios_base::Init::~Init()'
Process terminated with status 1 (0 minutes, 0 seconds)
12 errors, 0 warnings

when compiling this:
Code
#include <iostream>

using namespace std;

int main()
{
cout << "Hello world!" << endl;
return 0;
}

I'm using a recent nightly.
« Last Edit: April 29, 2007, 05:41:11 am by arew264 »

Offline arew264

  • Multiple posting newcomer
  • *
  • Posts: 22
Re: Strange Compiler Misconfiguration?
« Reply #1 on: April 29, 2007, 05:40:45 am »
Well, I figured I screwed it up and clicked restore to defaults... It changed the dynamic lib linker and now everything works. Don't remember when/why I messed with it anyway, think I did it by mistake...