Im programming in c++, and when i compile an error comes back saying 'linker error: undefined reference to __'
Dan
2005-12-18 14:04:36 UTC
Im programming a basic application (OpenGl to be exact) and when i compile (im using bloodshed) i get (almost 20) errors saying 'linker error: undefined reference to _____' any help.. how do i fix this, do i have to fix the #include? or define specific variables?
thanks
dan
Four answers:
gstoll2003
2005-12-18 20:04:55 UTC
A linker error means that you have the correct header files included (so your #include's are fine), but you're not linking to the correct libraries (usually .lib files). You need to find the libraries (usually in a lib folder near the include files) and tell the linker to use them.
Clarissa
2016-05-20 06:21:02 UTC
I read this twice. The way you layer longer story-related prose is admirable, and something I have much trouble with. You make it seem effortless, natural, but all of us who write know the opposite is true. I often measure the effectiveness of a piece by the number of TD's........Jealousy rears it's green head. Kudos to you, Mr Carney.
dont_trust_me
2005-12-18 14:14:15 UTC
these errors r generally encountered when u change ur directory or u wanna save files in a different folder..
try copying all the header files to the forder 're using.... or change the settings(for directory of header files) in the IDE that u're using..
2005-12-18 14:06:41 UTC
i think your bin directory is not defined properly. i programmed in turbo c++, so i dont really know where it would be in bloodshed, but it should be somewhere around "Directories" setting under some tools/options/preferences thingies
ⓘ
This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.