i have visual studio c++ project and add opencv library to my project .
my project build successfully in debug mode but when i want to build in release mode ,
first this error occurred :
"Error C1010 unexpected end of file while looking for precompiled header"
then i change Precompiled Header to Not Using Precompiled Headers
but this error occurred :
"Error LNK2019 unresolved external symbol main referenced in function"
my main code:
int main(array<System::String ^> ^args) {
Application::EnableVisualStyles();
Application::SetCompatibleTextRenderingDefault(false);
Application::Run(gcnew MainForm());
return 0;
}
i change subsystem to console and windows but not differ.
change main to :
int __clrcall WinMain(array<System::String ^> ^args) {
Application::EnableVisualStyles();
Application::SetCompatibleTextRenderingDefault(false);
Application::Run(gcnew MainForm());
return 0;
}
not differ. change main to :
int WinMain(struct HINSTANCE__ *hInstance, struct HINSTANCE__ *hPrevInstance, char *lpszCmdLine, int nCmdShow) {
Application::EnableVisualStyles();
Application::SetCompatibleTextRenderingDefault(false);
Application::Run(gcnew MainForm());
return 0;
}
error not solved. please help me.