Crashes on a Mac
C++ library for creating XLSX files for MS Excel 2007 and above.
Brought to you by:
oxod,
programmeralex
Hello,
I have it up and running on Windows but when I send it to my mac, it compiles fine but crashes on SimpleXlsx::CWorkbook book;
Any ideas?
Thanks
Hello,
Unfortunately, I don't have permanent access to the Mac, so I need your help.
Can you run the program under debugger and show a screenshot with the crash point (inside the SimpleXlsx::CWorkbook constructor) and values of variables?
Thanks
I am a mac newb but as far as I can tell it is crashing in Workbook.cpp on line 108 m_UserName = getenv( "USERNAME" );
Seems like a permission issue or something of that nature.
I am running Mac on a virtual machine if that makes any difference?
Thanks,
--James
UPDATE:
I just commented out the line and it works. I do not know enough about a mac but it is suggested that it is because of an envirionment variable not being there issue
--James
UPDATE: may have found the issue:
SimpleXlsxDef line 87
UniString & operator=( const char * other )
{
m_string = other; //line 87
m_wstring = std::wstring( m_string.begin(), m_string.end() );
return * this;
}
Thank you for such complete information! You completely solved the problem :-)
In the attachment is an updated version of the library.
I also moved the request username from CWorkbook class constructor to function GetSystemUserName(long been a wish).
Thanks again for your help.