c++ - error LNK2019: unresolved external symbol -


OK, so I'm having trouble understanding the problem in my code. I have a lot of code, I am going to post relevant parts which I am messing up while compiling. I have the following function inside a class and it will compile and, as long as I do not call the function "CalculateProbabilityResults", it will run fine and runs the 7th line of code inside it. I have "de-commented" this line of code in my program so that you can find it easier, I am pretty sure that I need the right instructions, because the function is compiled properly without being called, So that the problem can not be? I know that some naming notation needs some help, so please stand by me. Thanks in advance for the help guys.

  int SQLServer :: CalculabilityProbabilityResults (int profile, int frame, int time-period, int-time window shape) {ofstream ResultFile; StringStream SearchFilename; Stringstream outputName; Of vector & lt; Vector & lt; Integer & gt; & Gt; TimeFrameItemsets; Int num = getTimeFrameFile (frame * time-window size, time-window size); Cout & lt; & Lt; Number & lt; & Lt; Endl; // output name & lt; & Lt; "Results" & lt; & Lt; GetTimeFrameFile ((frame * time window size), time window size) & lt; & Lt; ".csv"; Cout & lt; & Lt; OutputName.str () & lt; & Lt; Endl; OutputName.clear (); . //ResultFile.open(outputName.str () c_str ()); ResultFile.close (); Result.resize (0); Return 0; } Int getTimeFrameFile (Int Time Inhour, Int Timeframe Sees) {int filename = 0; Int testWin; If (time ishaurus & gt; 24) {while (time inhaurus> 24) time inhour - = 24; } For (testWin = 0; testWin of & lt; 24 / timeFrameSize; testWin ++) {if (timeInHours & gt; = testWin * timeFrameSize & amp; & amp; timeInHours & LT; (testWin +1) * timeFrameSize) FileNum = testWin + 1; } If (fileNum == 0) fileNum = testWin + 1; File number back; }  

call log

  1> ------ Reconstruction All Start: Project: MobileSPADE_1.3, Configuration: Debug Win32 ---- - 1 & gt; Project 'MobileSPADE_1.3', removing intermediate and output files for 'debug | Win32 '1 & gt; Compilation ... 1 & gt; Main.cpp 1> MobileSPADE.cpp 1 & gt; SQLServer.cpp 1 & gt; Generated Code. 1 & gt; Revealed for resources ... 1 & gt; Microsoft (R) Windows (R) Resource Compiler Version 6.0.5724.0 1 & gt; Copyright (c) Microsoft Corporation. All rights reserved. 1 & gt; Linking ... 1 & gt; LINK: C: \ Users \ Josh Bradley \ Desktop \ MobileSpad_1.3 \ MobilePaid_1.3 \ debug \ MobilePaid_1.3.xa not found or not created by previous incremental links; Full link 1 & gt; SQLServer.obj: error LNK2019: unresolved by external symbol "public: Int __thiscall SQLServer :: getTimeFrameFile (int, int)" (? GetTimeFrameFile @ SQLServer @@ QAHHH @ Z) referenced in function "public: int __thiscall SQLServer :: CalculateProbabilityResults ( Int, int, int, int) "(CalculateProbabilityResults @SQLServer @@QAHHHHH @Z?) 1 & gt; C: \ Users \ JoshBradley \ Desktop \ MobileSPADE_1.3 \ MobileSPADE_1.3 \ Debug \ MobileSPADE_1.3.exe: Serious Error LNK1120: 1 Unsolved External 1 & gt; Log was saved in the old "file: // C: \ Users \ JoshBradley \ Desktop MobileSPADE_1.3 \ MobileSPADE_1.3 \ MobileSPADE_1.3 \ \ Debug \ BuildLog.htm" 1 & gt; MobileSPADE_1.3-3 error, 0 warnings (=) ======================================= Successful, 1 failed, 0 left ========== >  

unresolved external symbol "public: int __thiscall SQLServer :: getTimeFrameFile (int, int)"

but it has been defined as a free function:

  int getTimeFrameFile (integer timeInHours, integer timeFrameSize) { 

Replace with a free function for a class method that the problem is Education will solve:

  int SQLServer :: getTimeFrameFile (integer timeInHours, integer timeFrameSize)  

Comments

Popular posts from this blog

oracle - The fastest way to check if some records in a database table? -

php - multilevel menu with multilevel array -

jQuery UI: Datepicker month format -