Fatal error: iostream: No such file or directory in compiling C program using GCC

Neither <iostream> nor <iostream.h> are standard C header files. Your code is meant to be C++, where <iostream> is a valid header. Use a C++ compiler such as clang++ or g++ (and a .cpp file extension) for C++ code. Alternatively, this program uses mostly constructs that are available in C anyway. It’s easy enough to convert the entire program to compile using a C compiler. Simply remove #include … Read more

fatal error: Python.h: No such file or directory

Looks like you haven’t properly installed the header files and static libraries for python dev. Use your package manager to install them system-wide. For apt (Ubuntu, Debian…): For yum (CentOS, RHEL…): For dnf (Fedora…): For zypper (openSUSE…): For apk (Alpine…): For apt-cyg (Cygwin…):

undefined reference to ‘std::cout’

Compile the program with: as cout is present in the C++ standard library, which would need explicit linking with -lstdc++ when using gcc; g++ links the standard library by default. With gcc, (g++ should be preferred over gcc)

gcc: error: unrecognized command line option

A more deterministic way of pointing to the exact toolchain you want to use is to provide its full prefix when setting CROSS_COMPILE. This will avoid possible path-related errors, and the information on which exact toolchain was used for building will be embedded in your build script. Full example – installing official Arm gcc toolchain and … Read more

Inheriting constructors

If your compiler supports C++11 standard, there is a constructor inheritance using using (pun intended). For more see Wikipedia C++11 article. You write: This is all or nothing – you cannot inherit only some constructors, if you write this, you inherit all of them. To inherit only selected ones you need to write the individual constructors manually and … Read more

C ++ error: a expected initializer before [function name]

The return type for stringThing must be either void or string, not both. You also must include <string>, if you want to use string. Since you want to output the return value of stringThing() in main, I guess it should be But then, you must also return a string from your function for example. Your parameter std::string &teststring won’t work with your const char* argument. So either declare … Read more

Undefined reference to vtable

The GCC FAQ has an entry on it: The solution is to ensure that all virtual methods that are not pure are defined. Note that a destructor must be defined even if it is declared pure-virtual [class.dtor]/7. Therefore, you need to provide a definition for the virtual destructor:

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