Note that there are some explanatory texts on larger screens.

plurals
  1. POC and hashlib LNK errors
    text
    copied!<p>Okay. So i am using Visual Studios 2010 -> Visual C++ and the .NET Framework (Windows Forms Application) and when i try to hash a string with the hashlib++ i get multiple LNK errors. </p> <p>This is hashlib++ : <a href="http://hashlib2plus.sourceforge.net/" rel="nofollow">http://hashlib2plus.sourceforge.net/</a></p> <p>This is my code for the hash:</p> <pre><code>//I have more Includes but according to http://hashlib2plus.sourceforge.net/example.html these are the only ones required for hashlib++ so these are the ones i am putting on display. #include &lt;string&gt; #include &lt;iostream&gt; #include &lt;hashlibpp.h&gt; //I skipped adding namespaces to my display code private: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e) { try{ String^ atmp_user = textBox1-&gt;Text; String^ user = (myReader-&gt;GetString(1));//Connecting to MySQL Databases and grabbing usernames String^ atmp_pass = textBox2-&gt;Text; String^ pass = (myReader-&gt;GetString(2)); atmp_pass-&gt;ToLower();//LowerCase atmp_user-&gt;ToLower(); String^ total1 = gcnew String(atmp_user+atmp_pass); string totala; MarshalString(total1, totala);//Converting String^ to an std::string hashwrapper *myWrapper = new sha1wrapper();//SHA1 code begins string hash1 = myWrapper-&gt;getHashFromString(totala); delete myWrapper;//SHA1 code ends if(atmp_user == user &amp;&amp; hash1 == pass){ textBox1-&gt;Text = ("It worked!"); } } } catch(Exception^ex) { MessageBox::Show(ex-&gt;Message); } } </code></pre> <p>This is my error log:</p> <pre><code>Error 2 error LNK2028: unresolved token (0A00001E) "public: __clrcall sha1wrapper::sha1wrapper(void)" (??0sha1wrapper@@$$FQAM@XZ) referenced in function "private: void __clrcall Launcher::Form1::button1_Click(class System::Object ^,class System::EventArgs ^)" (?button1_Click@Form1@Launcher@@$$FA$AAMXP$AAVObject@System@@P$AAVEventArgs@4@@Z) C:\Users\Jeremy\Documents\Visual Studio 2010\Projects\Launcher\Launcher\Launcher.obj Error 3 error LNK2019: unresolved external symbol "public: __clrcall sha1wrapper::sha1wrapper(void)" (??0sha1wrapper@@$$FQAM@XZ) referenced in function "private: void __clrcall Launcher::Form1::button1_Click(class System::Object ^,class System::EventArgs ^)" (?button1_Click@Form1@Launcher@@$$FA$AAMXP$AAVObject@System@@P$AAVEventArgs@4@@Z) C:\Users\Jeremy\Documents\Visual Studio 2010\Projects\Launcher\Launcher\Launcher.obj Error 4 error LNK1120: 2 unresolved externals C:\Users\Jeremy\Documents\Visual Studio 2010\Projects\Launcher\Release\Launcher.exe </code></pre> <p>Any help would be greatly appreciated guys. :) I have been working very hard on just creating a secure login script for the past few days. I keep running into LNK errors everywhere i go. :\</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload