gcc (GCC) 4.7.2
Hello,
I am creating a shared library that will compile on linux and a dll that will compile on windows using the same sour
Instead of writing a header file yourself, you can also let CMake generate one for the building compiler using CMake's generate_export_header like this (examples taken from the linked page):
add_library(libfoo foo.cpp)
generate_export_header(libfoo)
#include "libfoo_export.h"
class LIBFOO_EXPORT FooClass {
int bar;
};