Reputation: 715
I was following the installation step on this post: http://binglongx.wordpress.com/2010/08/30/stlsoft-installation/
I set it up as follows (because I don't have a D-drive):
PATH=%PATH%;C:\stlsoft-1.9.117;
C:\stlsoft-1.9.117\include
However, when I run the sample code in the post, it outputs:
error LNK1561: entry point must be defined
Might anyone know where I went wrong?
Upvotes: 0
Views: 415
Reputation: 44891
The application needs a main
function as its entry point and the sample in the blog post is incomplete. Try this:
#include <stlsoft/conversion/integer_to_string.hpp>
#include <string>
#include <iostream>
std::string int2string(int i)
{
char buf[30]; // 29 digits, enough for longest integer, even 64-bit
const char* s = stlsoft::integer_to_string(buf, i);
return std::string(s);
}
int main (int argc, char* argv[]{
std::cout << int2string(5) << std::endl;
return 0;
}
Upvotes: 1