Having LLVM IR library how to crosscompile it to iOS, Android, Windows and Mac from Ubuntu?

Using the LLVM static compiler (llc), you can compile the LLVM IR into object files for a specific target triple. Though the target triples are not documented very well, the LLVM infrastructure is all open source, so a quick search through the source code will lead you here. Unfortunately, there is no documentation for a … Read more

Manual for cross-compiling a C++ application from Linux to Windows?

The basics are not too difficult: sudo apt-get install mingw32 cat > main.c <<EOF int main() { printf(“Hello, World!”); } EOF i586-mingw32msvc-cc main.c -o hello.exe Replace apt-get with yum, or whatever your Linux distro uses. That will generate a hello.exe for Windows. Once you get your head around that, you could use autotools, and set … Read more

Embed resources (eg, shader code; images) into executable/library with CMake

As an alternative to the answer of sfstewman, here’s a small cmake (2.8) function to convert all files in a specific folder to C data and write them in wished output file: # Creates C resources file from files in given directory function(create_resources dir output) # Create empty output file file(WRITE ${output} “”) # Collect … Read more

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