![]() |
| ||
| Linking Error... Okay I use Dev-C++ as my IDE. I have never linked my own files. I am pretty much a noob on C++, but not to programming in general. My issue that I have been almost pulling my hair out with is this. I am using a premade MD5 header file (or rather am trying to use). I have yet to get it to work. Even using the sample I downloaded with the source files. Here is the header file: md5.h ///////////////////////////////////////////////////////////////////////// Then we have their test file they are trying to call the functions with: md5test.cpp
And now the error given is... Quote:
Thank you for anyone willing to read this long arsed post and help me. JS |
| ||
| Re: Linking Error... lol, a possible problem is because of the compiler you are using is not updated with the .lib files necessary for this project. Try commenting out the line: Quote:
Something else that might work for you (However this will limit some experience.. possibly) is this: char * MyVar = "AStringWee"; I am not fully experienced with <stdio.h> so printf might not be what you want to use for the above example. |
| ||
| Re: Linking Error... You may need to include the line: using namespace std; In the .h file after the includes statements. Can't remember the reason for it other than a change to the language a few years back. At any rate you have a scope problem and that might just fix it. - I am guessing though. I did something similar a few years back and we we had code that worked, and a year later didn't. Rather painful to work out why. |
| ||
| Re: Linking Error... I appreciate both of your responses. Below is the code I came up with to test it... it actually tries a bit of what you both said. #include <cstdlib> If you can come up with anything else please let me know. (On the first post example I actually didnt copy both errors. It has a problem with any function from that header file :(. JS |
| ||
| Re: Linking Error... Okay... for some reason I had forgotten to add the files to the project, but I also thought I didnt have to since I "#included """ them :-| Oh well I appreciate the help you offered. JS |
| ||
| Re: Linking Error... Glad to hear you got it sorted. I was just thinking that it sounds like the linker can't see the file... i.e. wrong directory. |
| All times are GMT -4. The time now is 12:41 am. |
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC