Hi guys,
I have a VS 2010 project where I can use the UaString(const UaUShort*) constructor as follows:
TCHAR* s;
...
UaString str = UaString(s);
The code above compiles in that project. Now I created a new (Qt) project with the Qt VS 2010 plugin. All works perfectly, but the mentioned constructor calls. I get always a linker error LNK2019 for an unresolved external symbol. If I comment all the explicit (and implicit, for sure) UaString(const UaUShort*) constructor calls, it compiles perfectly. I compared the referenced libs for both projects, but canot find interesting difference. But I'm sure, there I've to search the reason for my issue. In both projects I referenced the same (IMHO) external UA related libs ...
uastackd.lib
uabased.lib
uapkid.lib
uamoduled.lib
coremoduled.lib
xmlparserd.lib
libeay32d.lib
libxml2d.lib
ws2_32.lib
rpcrt4.lib
crypt32.lib
Maybe you guys have an idea, what I missed.
Thanks in advance,
Falko.
[SOLVED] UaString Constructor with UaUShort* ... Linker Error
Moderator: uasdkcpp
-
- Hero Member
- Posts: 26
- Joined: 04 Oct 2012, 17:56
- Support Team
- Hero Member
- Posts: 3071
- Joined: 18 Mar 2011, 15:09
Re:UaString Constructor with UaUShort* ... Linker Error
The Ua Libraries are build with the default setting "Treat WChar_t As Built in Type" (the /Zc:wchar_t compiler switch).
When you create a VS Qt project that compiler switch is set off by default. So just turn on that switch in your Qt project and it will work.
Best Regards,
Unified Automation Support Team
When you create a VS Qt project that compiler switch is set off by default. So just turn on that switch in your Qt project and it will work.
Best Regards,
Unified Automation Support Team
Best regards
Unified Automation Support Team
Unified Automation Support Team
-
- Hero Member
- Posts: 26
- Joined: 04 Oct 2012, 17:56
Re:UaString Constructor with UaUShort* ... Linker Error
Thank you guys! (y)