Ilia wrote:
> Hi,
> I've run into a problem passing a string ref to a dll:
> testdll.C: (I've tried adding __declspec(dllimport/export) too)
> void f(std::string& a) { a = "asdf"; }
> test.C:
> int main(void) { std::string a; f(a); std::cout << a << std::endl; }
> If I compile it with static
> Could someone either confirm that this is a problem, or, preferably,
> provide instructions for getting this to compile "correctly"? (And if
> this is a problem, are there known workarounds, is there a PR open
> somewhere, etc)
Follow this thread to learn more:
http://www.cygwin.com/ml/cygwin
Hi,
I've run into a problem passing a string ref to a dll:
testdll.C: (I've tried adding __declspec(dllimport/export) too)
void f(std::string& a) { a = "asdf"; }
test.C:
int main(void) { std::string a; f(a); std::cout << a << std::endl; }
If I compile it with static linking, the program works
3 matches
Mail list logo