I borrowed a C++ programming book from my local Library and decided to have a read. Turns out it uses SSDL to code. So i downloaded SSDL and decided to follow along the book. However, when i first compiled and ran my code, this error message popped up.
1>D:\C++ Coding proj\Coding by myself (own projects)\SSDLcode\SSDLcode\main.cpp(11,2): warning
C4551: function call missing argument list
1>main.obj : error LNK2001: unresolved external symbol "class std::basic_ostream<char,struct s
td::char_traits<char> > sout" (?sout@@3V?$basic_ostream@DU?$char_traits@D@std@@@std@@A)
1>D:\C++ Coding proj\Coding by myself (own projects)\SSDLcode\x64\Debug\SSDLcode.exe : fatal
error LNK1120: 1 unresolved externals
Entire error message here, if that helps. (from Build Output)
Build started...
1>------ Build started: Project: SSDLcode, Configuration: Debug x64 ------
1>main.cpp
1>D:\C++ Coding proj\Coding by myself (own projects)\SSDLcode\SSDLcode\main.cpp(11,2): warning
C4551: function call missing argument list
1>main.obj : error LNK2001: unresolved external symbol "class std::basic_ostream<char,struct
std::char_traits<char> > sout" (?sout@@3V?$basic_ostream@DU?$char_traits@D@std@@@std@@A)
1>D:\C++ Coding proj\Coding by myself (own projects)\SSDLcode\x64\Debug\SSDLcode.exe : fatal
error LNK1120: 1 unresolved externals
1>Done building project "SSDLcode.vcxproj" -- FAILED.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
since I am new to SSDL, i have no idea what these mean.
In the Additional Library Directories section, I put my Libraries as x64. But my Visual Studio compiler codes on x86(is 32-bit, i believe).
so i changed the x86 to x64 and ran the code again. Then the error message showed.
Here is my code.
#include "SDL.h"
#include "SSDL.h"
int main(int argc, char** argv)
{
sout << "Hello, world! (Press any key to quit)\n";
SSDL_WaitKey;
return 0;
}
would there be a solution to solve the LNK1120 error?