Using LLVM Libraries in C++ Project - clang

I'm currently having problem with simple project(or llvm-example for that matter). My assignment requires me to use llvm libraries, however this isn't as easy as I had hoped.
I've build LLVM using MinGW GCC and CMake. After build I can compile with clang fine. However if I create simple hello world type of program
#include "llvm-c/Core.h"
int main(int argc, char**argv)
{
return 0;
}
and try to compile it with
clang++ main.cpp
I get
In file included from main.cpp:1:
./llvm-c/Core.h:18:10: fatal error: 'llvm-c/ErrorHandling.h' file not found
#include "llvm-c/ErrorHandling.h"
For this example I have copied contents of include directory into directory with main.cpp. After getting this issue I tried to inspect those headers and all of them have position llvm/ or llvm-c/, instead of pure relative address. I figured these libs were used to build/make llvm and libs for me to use are actually in build directory, which is where I have built llvm, but include directory in build has only about 1/2 *.h files.
I can't seem to find anything in documentation related to this and even basic llvm examples are expecting to include libs in format like llvm/Core.h
EDIT
After solving inclusion problem, now I get several other problems which seems to be linked to mingw.
This is how new program looks.
#define __STDC_LIMIT_MACROS
#define __STDC_CONSTANT_MACROS
#include <llvm-c/Core.h>
using namespace std;
int main()
{
LLVMModuleRef rff = LLVMModuleCreateWithName("testname");
return 0;
}
this generates
d:\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.9.3\..\..\..\libLLVMSupport.a(CommandLine.cpp.obj):CommandLine.cpp|| undefined reference to `__mingw_strtod'|
d:\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.9.3\..\..\..\libLLVMSupport.a(regerror.c.obj):regerror.c|| undefined reference to `__ms_vsnprintf'|
d:\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.9.3\..\..\..\libLLVMSupport.a(Path.cpp.obj):Path.cpp|| undefined reference to `SHGetKnownFolderPath#16'|
d:\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.9.3\..\..\..\libLLVMSupport.a(Path.cpp.obj):Path.cpp|| undefined reference to `_imp__CoTaskMemFree#4'|
d:\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.9.3\..\..\..\libLLVMSupport.a(Path.cpp.obj):Path.cpp|| undefined reference to `_imp___chsize_s'|
d:\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.9.3\..\..\..\libLLVMSupport.a(Path.cpp.obj):Path.cpp|| undefined reference to `FOLDERID_LocalAppData'|
d:\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.9.3\..\..\..\libLLVMSupport.a(Path.cpp.obj):Path.cpp|| undefined reference to `FOLDERID_LocalAppData'|
d:\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.9.3\..\..\..\libLLVMSupport.a(Path.cpp.obj):Path.cpp|| undefined reference to `FOLDERID_LocalAppData'|
d:\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.9.3\..\..\..\libLLVMSupport.a(Path.cpp.obj):Path.cpp|| undefined reference to `FOLDERID_LocalAppData'|
d:\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.9.3\..\..\..\libLLVMSupport.a(Path.cpp.obj):Path.cpp|| undefined reference to `FOLDERID_Profile'|
d:\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.9.3\..\..\..\libLLVMSupport.a(Path.cpp.obj):Path.cpp|| undefined reference to `FOLDERID_Profile'|
d:\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.9.3\..\..\..\libLLVMSupport.a(Path.cpp.obj):Path.cpp|| undefined reference to `FOLDERID_Profile'|
d:\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.9.3\..\..\..\libLLVMSupport.a(Path.cpp.obj):Path.cpp|| undefined reference to `FOLDERID_Profile'|
d:\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.9.3\..\..\..\libLLVMSupport.a(Path.cpp.obj):Path.cpp|| undefined reference to `FOLDERID_LocalAppData'|
d:\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.9.3\..\..\..\libLLVMSupport.a(Path.cpp.obj):Path.cpp|| undefined reference to `FOLDERID_LocalAppData'|
d:\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.9.3\..\..\..\libLLVMSupport.a(Path.cpp.obj):Path.cpp|| undefined reference to `FOLDERID_LocalAppData'|
d:\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.9.3\..\..\..\libLLVMSupport.a(Path.cpp.obj):Path.cpp|| undefined reference to `FOLDERID_LocalAppData'|
d:\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.9.3\..\..\..\libLLVMSupport.a(TimeValue.cpp.obj):TimeValue.cpp|| undefined reference to `_localtime32'|
I used llvm-config --libs core for linker additions.
Tried commands:
g++ main.cpp -lLLVMCore -lLLVMSupport
clang++ main.cpp -lLLVMCore -lLLVMSupport

Those are WinAPI references. The easiest way is to find those are google for documentation for it or go to the mingw library directory ( ..\mingw530_32\i686-w64-mingw32\lib\ ) and find in files.
So
FOLDERID_LocalAppData is defined in libuuid.a so use the -luuid compile parameter
_imp__CoTaskMemFree#4 is defined in libole32.a so use the -lole32 compile parameter
For me g++ -std=c++11 -ID:\Devel\install\include main.cc -LD:\Devel\install\lib -lLLVMCore -lLLVMSupport -luuid -lole32
is working as I installed the llvm to D:\Devel\install

If you need the headers from your-llvm/include directory instead of copying the contents of the include directory you should just specify the include path to your-llvm/include with -I option or whatever the build system requires.

Related

OpenCV build undefined reference to protobuf built from source

I'm trying to build OpenCV from source. I have protobuf installed to my home directory; it was built with --enable-shared. LD_LIBRARY_PATH has $HOME/lib at the head; LIBRARY_PATH and LD_RUN_PATH are set to $LD_LIBRARY_PATH, and CPATH is set to $HOME/include. PKG_CONFIG_PATH is to $HOME/lib/pkgconfig.
Here are some relevant versions:
opencv==3.1.0
gcc==4.8.5
g++==4.8.5
python==3.5.2
protobuf==2.6.1
My CMake command is
cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=$HOME -D OPENCV_EXTRA_MODULES_PATH=$HOME/opencv_contrib-3.1.0/modules -D PYTHON_DEFAULT_EXECUTABLE=$HOME/bin/python -D CMAKE_PREFIX_PATH=$HOME ..
cmake succeeds and even says that it found PROTOBUF at <~>/lib/libprotobuf.so. But make fails to find it.
../../lib/libopencv_dnn.so.3.1.0: undefined reference to `google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(int, std::string const&, google::protobuf::io::CodedOutputStream*)'
../../lib/libopencv_dnn.so.3.1.0: undefined reference to `google::protobuf::io::CodedOutputStream::WriteStringWithSizeToArray(std::string const&, unsigned char*)'
../../lib/libopencv_dnn.so.3.1.0: undefined reference to `google::protobuf::internal::InitEmptyString()'
../../lib/libopencv_dnn.so.3.1.0: undefined reference to `google::protobuf::internal::empty_string_once_init_'
../../lib/libopencv_dnn.so.3.1.0: undefined reference to `google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased(int, std::string const&, google::protobuf::io::CodedOutputStream*)'
../../lib/libopencv_dnn.so.3.1.0: undefined reference to `google::protobuf::internal::empty_string_'
../../lib/libopencv_dnn.so.3.1.0: undefined reference to `google::protobuf::io::CodedInputStream::BytesUntilTotalBytesLimit() const'
collect2: error: ld returned 1 exit status
make[2]: *** [bin/opencv_test_dnn] Error 1
make[1]: *** [modules/dnn/CMakeFiles/opencv_test_dnn.dir/all] Error 2
A couple of other places mention that multiple versions of protobuf can cause problems. There is another protobuf in /lib64, but I can't remove it since I don't have root access. So I'm not sure what the workaround is.
I met the same issue recently because I installed the latest protobuf (3.1.0) and built my opencv with GCC 4.9. When I switched back to GCC 5, OpenCV 3.1 can be built successfully.
If you want to use Matlab together with OpenCV 3.1 I think you may need to downgrade your protobuf version, like protobuf-2.5.0, then you can use GCC 4.9 to rebuilt the OpenCV.

ffmpeg link error: undefined reference in library sources

I downloaded the ffmpeg from git, and make the libs by sources. Created main.c as below and put the ffmpeg libs in the same folder as main.c, (my system is ubuntu 15.10, gcc version 5.2.1)
#include <stdio.h>
void av_register_all(void);
int main() {
printf("abc\n");
av_register_all();
return 0;
}
After I issued gcc main.c -L. -lavformat -lswscale -lavcodec -lswscale -lavutil -lavdevice -lavfilter, I got a lot of (nearly 1000) undefined reference errors:
...
/home/arton/sources/ffmpeg/libavcodec/vorbisdec.c:868: undefined reference to `atan'
/home/arton/sources/ffmpeg/libavcodec/vorbisdec.c:868: undefined reference to `atan'
/home/arton/sources/ffmpeg/libavcodec/vorbisdec.c:869: undefined reference to `atan'
/home/arton/sources/ffmpeg/libavcodec/vorbisdec.c:869: undefined reference to `atan'
/home/arton/sources/ffmpeg/libavcodec/vorbisdec.c:869: undefined reference to `floor'
...
/home/arton/sources is where the ffmpeg sources at, I have no idea why it report the sources path of ffmpeg and why the link fails. Any hint is appreciated. Thanks!
atan and floor are included in lm.
Do you link with lm?
You might want to read this.

mips-openwrt-linux-gcc: link the lua lib error

Sorry for my poor english.
I want to call lua functions in c app on the openwrt 14.07.
When cross compile the project, i can not find the header and .so files for lua in the toolchain. So i copy the lua51 folder from ubuntu 14.04 and liblua.so from target os to the toolchain.Then try to compile the project, i get the undefined reference errors.
mips-openwrt-linux-gcc airkiss.c luaconf.c -lpthread -llua libairkiss_log.a
-L. -o airkiss -Wl,-rpath-link=/opt/OpenWrt-Toolchain-ar71xx-for-mips_34kc-gcc-4.8-linaro_uClibc-0.9.33.2/toolchain-mips_34kc_gcc-4.8-linaro_uClibc-0.9.33.2/lib
I got the error:
luaconf.c:(.text+0x18): undefined reference to `luaL_newstate'
luaconf.c:(.text+0x28): undefined reference to `luaL_openlibs'
luaconf.c:(.text+0x3c): undefined reference to `luaL_loadfile'
luaconf.c:(.text+0x54): undefined reference to `lua_getfield'
luaconf.c:(.text+0x64): undefined reference to `lua_pushstring'
luaconf.c:(.text+0x74): undefined reference to `lua_pushstring'
luaconf.c:(.text+0x8c): undefined reference to `lua_pcall'
luaconf.c:(.text+0xa0): undefined reference to `lua_tolstring'
luaconf.c:(.text+0xc0): undefined reference to `lua_close'
Anyone knows how to fix it? Thanks!
The best way would be to have OpenWrt-style Makefile project to compile your code.
For reference, look at feeds/packages/multimedia/xupnpd/Makefile - it also uses liblua.
This manual will help you: https://wiki.openwrt.org/doc/devel/packages
It seems lua is enable by default config. Could you check if CONFIG_PACKAGE_liblua and CONFIG_PACKAGE_lua is 'y' in your .config file?
By default the header file locate at staging_dir/target-mips_r2_uClibc-0.9.33.2/usr/include and lib file at staging_dir/target-mips_r2_uClibc-0.9.33.2/usr/lib.
Also check if you do full build before.

statically linking libmysqlclient ubuntu 12.04 32bits

I am using XAMPP and tried with a clean install of Ubuntu 12.04 in a VM, the results are the same.
The program bellow compile and link easily with:
gcc c_mysql.c -l mysqlclient -o c_mysql
That is, produces the default dynamically liked program.
But getting a statically linked program is not so easy:
I tried successively the following ways after extensive googling. Any help will be
really appreciated:
1) gcc c_mysql1.c libmysqlclient.a -o c_mysql
[Library libmysqlclient.a not found]
2) gcc c_mysql1.c /usr/lib/i386-linux-gnu/libmysqlclient.a -o c_mysql
[Many undefined references]
3) gcc c_mysql1.c /usr/lib/i386-linux-gnu/libmysqlclient.a /usr/lib/i386-linux-gnu/libdl.a
[Many but less undefined references]
4) gcc c_mysql1.c /usr/lib/i386-linux-gnu/libmysqlclient.a /usr/lib/i386-linux-gnu/libdl.a -lpthread -lz -o c_mysql
[The minimum undefined references I could get]
/usr/lib/i386-linux-gnu/libmysqlclient.a(client_plugin.c.o): In function `mysql_load_plugin_v':
(.text+0x524): warning: Using 'dlopen' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/lib/i386-linux-gnu/libmysqlclient.a(dh.cpp.o): In function `TaoCrypt::DH::GeneratePrivate(TaoCrypt::RandomNumberGenerator&, unsigned char*)':
(.text+0x42): undefined reference to `pow'
/usr/lib/i386-linux-gnu/libmysqlclient.a(dh.cpp.o): In function `TaoCrypt::DH::GeneratePrivate(TaoCrypt::RandomNumberGenerator&, unsigned char*)':
(.text+0x50): undefined reference to `log'
/usr/lib/i386-linux-gnu/libmysqlclient.a(dh.cpp.o): In function `TaoCrypt::DH::GeneratePrivate(TaoCrypt::RandomNumberGenerator&, unsigned char*)':
(.text+0x62): undefined reference to `pow'
/usr/lib/i386-linux-gnu/libdl.a(dlopen.o): In function `dlopen':
(.text+0x1b): undefined reference to `__dlopen'
/usr/lib/i386-linux-gnu/libdl.a(dlclose.o): In function `dlclose':
(.text+0x1): undefined reference to `__dlclose'
/usr/lib/i386-linux-gnu/libdl.a(dlsym.o): In function `dlsym':
(.text+0x1b): undefined reference to `__dlsym'
/usr/lib/i386-linux-gnu/libdl.a(dlerror.o): In function `dlerror':
(.text+0x1): undefined reference to `__dlerror'
collect2: ld returned 1 exit status
-static makes many more undefined references (-static-libgcc is even worst).
/usr/lib/i386-linux-gnu/libmysqlclient.a(client_plugin.c.o): In function `mysql_load_plugin_v':
(.text+0x524): warning: Using 'dlopen' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/lib/i386-linux-gnu/libmysqlclient.a(mf_pack.c.o): In function `unpack_dirname':
(.text+0x653): warning: Using 'getpwnam' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/lib/i386-linux-gnu/libmysqlclient.a(libmysql.c.o): In function `read_user_name':
(.text+0x2a91): warning: Using 'getpwuid' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/lib/i386-linux-gnu/libmysqlclient.a(mf_pack.c.o): In function `unpack_dirname':
(.text+0x667): warning: Using 'endpwent' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/lib/i386-linux-gnu/libmysqlclient.a(client.c.o): In function `mysql_real_connect':
(.text+0x47b6): warning: Using 'getaddrinfo' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/lib/i386-linux-gnu/libmysqlclient.a(libmysql.c.o): In function `mysql_server_init':
(.text+0x27fa): warning: Using 'getservbyname' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/lib/i386-linux-gnu/libmysqlclient.a(dh.cpp.o): In function `TaoCrypt::DH::GeneratePrivate(TaoCrypt::RandomNumberGenerator&, unsigned char*)':
(.text+0x42): undefined reference to `pow'
/usr/lib/i386-linux-gnu/libmysqlclient.a(dh.cpp.o): In function `TaoCrypt::DH::GeneratePrivate(TaoCrypt::RandomNumberGenerator&, unsigned char*)':
(.text+0x50): undefined reference to `log'
/usr/lib/i386-linux-gnu/libmysqlclient.a(dh.cpp.o): In function `TaoCrypt::DH::GeneratePrivate(TaoCrypt::RandomNumberGenerator&, unsigned char*)':
(.text+0x62): undefined reference to `pow'
/usr/lib/i386-linux-gnu/libmysqlclient.a(my_compress.c.o): In function `my_compress_alloc':
(.text+0x68): undefined reference to `compress'
/usr/lib/i386-linux-gnu/libmysqlclient.a(my_compress.c.o): In function `my_uncompress':
(.text+0x1cf): undefined reference to `uncompress'
collect2: ld returned 1 exit status
#include <mysql/mysql.h>
#include <stdio.h>
#include <string.h>
#include <pthread.h>
int main()
{
MYSQL mysql;
MYSQL_RES *res;
MYSQL_ROW row;
char *query = "select * from dbtablename;";
int t,r;
mysql_init(&mysql);
//if(!mysql_real_connect(&mysql,"localhost", "dbusername", "dbpassword", "dbname", port, NULL, 0)) The connection data is fake. If you, for a big miracle make it compile statically, the program will not connect.
if(!mysql_real_connect(&mysql,"192.231.182.73","PinData","YULYU7M", "DB084", 0, NULL, 0)){
printf("Error connecting to database:%s\n",mysql_error(&mysql));
}
else{
printf("Connected to the remote database........");
}
t=mysql_query(&mysql,query);
if(t)
{
printf("Error making query:%s\n",mysql_error(&mysql));
}
else
{
printf("Query made ....\n");
res = mysql_use_result(&mysql);
if(res)
{
for(r=0;r<=mysql_field_count(&mysql);r++)
{
row = mysql_fetch_row(res);
if(row<0) break;
for(t=0;t<mysql_num_fields(res);t++)
printf("%s ",row[t]);
printf("\n");
}
}
mysql_free_result(res);
}
mysql_close(&mysql);
return 0;
}
After many trial and error and google search, the answer is: To statically link libmysqlclient you have to use the following options:
-lpthread -lm -lz -ldl
This makes the linker find on some libraries.
That is:
gcc -static-libgcc c_mysql1.c /usr/lib/i386-linux-gnu/libmysqlclient.a -lpthread -lm -lz -ldl -o c_mysql
However the general question is still open: Given a static library StaticLib, how to know in advance which options and libraries to use.
I can not believe the answer would be " trial and error and google search"

Linker errors in compiling a simple pthread code under MingW

I am trying to compile a single c++ source file test.cpp, which has a very simple code which demonstrates pthread_create(); pthread_cond_signal/pthread_cond_wait() functionality.
I have installed Mingw / Ansys on Windows XP where I am working. In the MingW prompt I do:
g++ -IC:/MinGW/include/ -lpthread test.cpp
//-IC:/MinGW/include to get pthread.h
//-LC:/MinGW/bin to get pthreadGC2.dll
The cpp includes pthread.h as:
#include <pthread.h>
But this gave me multiple linker undefined reference errors to all pthread library functions.
What am I doing wrong here. Is it possible to build a pthread code on MingW environment on windows or not?
How to resolve this errors?
C:\DOCUME~1\ADESHP~1\LOCALS~1\Temp\ccUQhu7D.o:pthread_cond.c:(.text+0x23): undefined reference to `_imp__pthread_mutex_lock'
C:\DOCUME~1\ADESHP~1\LOCALS~1\Temp\ccUQhu7D.o:pthread_cond.c:(.text+0x67): undefined reference to `_imp__pthread_cond_signal'
C:\DOCUME~1\ADESHP~1\LOCALS~1\Temp\ccUQhu7D.o:pthread_cond.c:(.text+0x75): undefined reference to `_imp__pthread_mutex_unlock'
C:\DOCUME~1\ADESHP~1\LOCALS~1\Temp\ccUQhu7D.o:pthread_cond.c:(.text+0x98): undefined reference to `_imp__pthread_exit'
C:\DOCUME~1\ADESHP~1\LOCALS~1\Temp\ccUQhu7D.o:pthread_cond.c:(.text+0xbc): undefined reference to `_imp__pthread_mutex_lock'
C:\DOCUME~1\ADESHP~1\LOCALS~1\Temp\ccUQhu7D.o:pthread_cond.c:(.text+0xe8): undefined reference to `_imp__pthread_cond_wait'
C:\DOCUME~1\ADESHP~1\LOCALS~1\Temp\ccUQhu7D.o:pthread_cond.c:(.text+0x10f): undefined reference to `_imp__pthread_mutex_unlock'
C:\DOCUME~1\ADESHP~1\LOCALS~1\Temp\ccUQhu7D.o:pthread_cond.c:(.text+0x135): undefined reference to `_imp__pthread_exit'
C:\DOCUME~1\ADESHP~1\LOCALS~1\Temp\ccUQhu7D.o:pthread_cond.c:(.text+0x153): undefined reference to `_imp__pthread_attr_init'
C:\DOCUME~1\ADESHP~1\LOCALS~1\Temp\ccUQhu7D.o:pthread_cond.c:(.text+0x169): undefined reference to `_imp__pthread_mutex_init'
C:\DOCUME~1\ADESHP~1\LOCALS~1\Temp\ccUQhu7D.o:pthread_cond.c:(.text+0x17f): undefined reference to `_imp__pthread_attr_setdetachstate'
C:\DOCUME~1\ADESHP~1\LOCALS~1\Temp\ccUQhu7D.o:pthread_cond.c:(.text+0x195): undefined reference to `_imp__pthread_cond_init'
C:\DOCUME~1\ADESHP~1\LOCALS~1\Temp\ccUQhu7D.o:pthread_cond.c:(.text+0x1bc): undefined reference to `_imp__pthread_create'
C:\DOCUME~1\ADESHP~1\LOCALS~1\Temp\ccUQhu7D.o:pthread_cond.c:(.text+0x1e3): undefined reference to `_imp__pthread_create'
C:\DOCUME~1\ADESHP~1\LOCALS~1\Temp\ccUQhu7D.o:pthread_cond.c:(.text+0x201): undefined reference to `_imp__pthread_join'
C:\DOCUME~1\ADESHP~1\LOCALS~1\Temp\ccUQhu7D.o:pthread_cond.c:(.text+0x21f): undefined reference to `_imp__pthread_join'
C:\DOCUME~1\ADESHP~1\LOCALS~1\Temp\ccUQhu7D.o:pthread_cond.c:(.text+0x239): undefined reference to `_imp__pthread_mutex_destroy'
C:\DOCUME~1\ADESHP~1\LOCALS~1\Temp\ccUQhu7D.o:pthread_cond.c:(.text+0x247): undefined reference to `_imp__pthread_cond_destroy'
C:\DOCUME~1\ADESHP~1\LOCALS~1\Temp\ccUQhu7D.o:pthread_cond.c:(.text+0x255): undefined reference to `_imp__pthread_attr_destroy'
C:\DOCUME~1\ADESHP~1\LOCALS~1\Temp\ccUQhu7D.o:pthread_cond.c:(.text+0x263): undefined reference to `_imp__pthread_exit'
collect2: ld returned 1 exit status
You need to specify the library on the gcc/g++ command line after the files that depend on the library. So try:
g++ -IC:/MinGW/include/ test.cpp -lpthread
I kicked myself when I stumbled on the answer (it's kind of a FAQ for libraries and gcc). For most gcc options order doesn't matter, but for libraries it's critical.
You should not have to specify the library path if the pthread library came with your MinGW distribution (as it seems is the case for you). Also, remember that the command line above will produce an a.exe executable; pass -o test.exe to avoid that.

Resources