Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

C++: Getting the c3859 error code while compiling in a mix of C++/CLI and C++

After I have done as suggested by Hans Passant in C++: Getting the "error C2065: 'pst' : undeclared identifier" while using pstsdk? (which works), my code now looks like this:

private:
    System::Void readPstFileButton_Click(System::Object^  sender, System::EventArgs^  e) {
         pstsdk::pst myfile(marshal_as<std::wstring>(fileNameTextBox->Text));
    }

And I now get the following errors:

error C3859: virtual memory range for PCH exceeded; please recompile with a command line option of '-Zm111' or greater

error C1076: compiler limit : internal heap limit reached; use /Zm to specify a higher limit

I definitely didn't expect these to occur, and neither do I know how to solve them.

like image 334
Will Marcouiller Avatar asked Jan 04 '11 15:01

Will Marcouiller


1 Answers

  1. Right-click your C++ project in Solution Explorer; choose Properties.
  2. In the Properties dialog, expand Configuration Properties > C/C++ > Command Line
  3. In Additional Options, add /Zm120

Repeat this for Debug and Release and any other configurations you have.

For more information on what this command-line option does (and what changing it means), see the /Zm documentation.

like image 155
Bradley Grainger Avatar answered Oct 05 '22 04:10

Bradley Grainger