Hello there.

I'm having a problem with a linker error. I am trying to compile a project (just a hobby). It manages to compile, but I get a link error when trying to link. I don't see anything wrong with the code at all.

I am using Dev-C++. This is the error:

[Linker error] undefined reference to 'std::ios_base::ios_base(std::ios_base const&)'

ld returned 1 exit status

C:\Documents and Settings\Marco\My Documents\interpreter\Makefile.win [Build Error] [interpreter.exe] Error 1

Could anyone please help me? I would appreciate it.

8 Years
Discussion Span
Last Post by nexocentric

A lot of times when you have a linker error, it means that one of your functions is looking for a function prototype ( the things that you usually put in a header file so that other functions can call each other ). That's what we use #include for.

In this case your made some includes, declared main, and then made some includes below main. You might want to try to see if you're still getting the linker errors after you put all your includes at the top of your cpp file.


I still get the linker error, even after you suggestion.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.