Purpose of stdafx.h [duplicate]

stdafx.h is a file, generated by Microsoft Visual Studio IDE wizards, that describes both standard system and project specific include files that are used frequently but hardly ever change. Compatible compilers (for example, Visual C++ 6.0 and newer) will pre-compile this file to reduce overall compile times. Visual C++ will not compile anything before the … Read more

Is it OK to remove Prefix.pch file from the Xcode project?

In Xcode, go to your target’s build settings (Command-Option-E, build tab) and uncheck Precompile Prefix Header (GCC_PRECOMPILE_PREFIX_HEADER). You can also remove the value of the Prefix Header setting if you wish. Prefix headers are compiled and stored in a cache, and then automatically included in every file during compilation. This can speed up compilation, and … Read more

Compile C files in C++ project which do not use precompiled header?

In the Solution Explorer window right click on the *.c file(s) and select Properties. Go to C / C++ -> Precompiled Headers and set the Precompiled Header option to Not Using Precompiled Headers. Also, unless you actually need precompiled headers, I’d say turn it off project-wide. Another option would be to compile your C files … Read more

Unexpected end of file error

Goto SolutionExplorer (should be already visible, if not use menu: View->SolutionExplorer). Find your .cxx file in the solution tree, right click on it and choose “Properties” from the popup menu. You will get window with your file’s properties. Using tree on the left side go to the “C++/Precompiled Headers” section. On the right side of … Read more

Precompiled headers with GCC

I have definitely had success. First, I used the following code: #include <boost/xpressive/xpressive.hpp> #include <iostream> using namespace std; using namespace boost::xpressive; // A simple regular expression test int main() { std::string hello(“Hello, World!”); sregex rex = sregex::compile( “(\\w+) (\\w+)!” ); smatch what; if( regex_match( hello, what, rex ) ) { std::cout << what[0] << ‘\n’; … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)