Error UCSO - LNK2019 Error

Max-Q

99 40
Addon Developer
Joined
Jul 5, 2021
Messages
765
Reaction score
1,183
Points
108
Location
Cislunar Space
Website
www.orbiter-forum.com
So I am trying to add UCSO to a project, and no matter wat I do I can't make it compile. This is the error I get:
UCSO_API.lib(VesselAPI.obj) : error LNK2019: unresolved external symbol ___std_fs_convert_wide_to_narrow_replace_chars@20 referenced in function "class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl std::filesystem::_Convert_wide_to_narrow_replace_chars<struct std::char_traits<char>,class std::allocator<char> >(enum __std_code_page,class std::basic_string_view<wchar_t,struct std::char_traits<wchar_t> >,class std::allocator<char> const &)" (??[imath]_Convert_wide_to_narrow_replace_chars@U?[/imath]char_traits@D@std@@V?[imath]allocator@D@2@@filesystem@std@@YA?AV?[/imath]basic_string@DU?[imath]char_traits@D@std@@V?[/imath]allocator@D@2@@1@W4__std_code_page@@V?[imath]basic_string_view@_WU?[/imath]char_traits@_W@std@@@1@ABV?$allocator@D@1@@Z)

Google doesn't seem to be any help, so I am kind of stuck here.
After some testing, I narrowed it down to (I think) this piece of code; if I get rid of the line ucso = UCSO::Vessel::CreateInstance(this);, the project compiles, but obviously CTDs Orbiter.
C++:
Cargo::Cargo(OBJHANDLE hVessel, int flightmodel)
    : VESSEL4(hVessel, flightmodel)
{
    ucso = UCSO::Vessel::CreateInstance(this);
    sprintf(buffer, "UCSO version: %s", ucso->GetUCSOVersion());
    message = _strdup(buffer);
}

Any help would be appreciated.
 

GLS

Well-known member
Orbiter Contributor
Addon Developer
Joined
Mar 22, 2008
Messages
5,913
Reaction score
2,907
Points
188
Website
github.com
Try to compile you project as C++17 (Project Properties > C/C++ > Language > C++ Language Standard).
 

GLS

Well-known member
Orbiter Contributor
Addon Developer
Joined
Mar 22, 2008
Messages
5,913
Reaction score
2,907
Points
188
Website
github.com
Try playing with Project Properties > General > Character Set
 
Top