问题
I am designing an application that should work with any language. That is why am interested in ICU. I would like to statically compile ICU, because my application is relatively light weight ans I need mostly UnicodeStrings and IOstreams, the rest is garbage for my purposes. I also would like to distribute my application in single .exe I wrote the short program below to test different kind of strings.
#include <string>
#include <iostream>
#include "unicode\unistr.h"
#include "unicode\ustream.h"
using namespace std;
using namespace icu;
int main(void)
{
string normal_string="Андрей";
wstring wide_string=L"Андрей";
UnicodeString ustr="Андрей";
cout<<normal_string<<endl;
wcout<<wide_string<<endl;
cout<<ustr;
return 0;
}
I included the header files and allegedly static libraries (.lib files) in the solution of this project. It compiled, but still asked for .dll while attemting to run. ICU provides some instructions in that regard, but I don't understand a line there.
So I just would like to include a necessary header file and then the program compiles and links with my code and runs without any additional components I use MVS 2010 with the latest Intel compiler
来源:https://stackoverflow.com/questions/23429764/compile-icu-fully-statically