Yes I run executables correctly, linking is correct for object files, but for ".a" and "dll" files it fails (I tried both only a static library and only a dynamic library)
C:/Mingw
not
C:/Mingw/bin (i wrote it instead of copy pastin like for the others)
here's the build log:
Build started on: 24-04-2013 at 18:37.41
Build ended on: 24-04-2013 at 18:37.49
-------------- Build: static_lib in snippet (compiler: GNU GCC Compiler)---------------
i686-w64-mingw32-g++.exe -std=c++11 -Wextra -Wall -c "D:\snippets\StaticLibrary.cpp" -o .\StaticLibrary.cpp.o
ar.exe -r -s libtest_static.a .\StaticLibrary.cpp.o
ar.exe: creating libtest_static.a
Output size is 1.67 KB
-------------- Build: dyn_lib in snippet (compiler: GNU GCC Compiler)---------------
i686-w64-mingw32-g++.exe -std=c++11 -Wextra -Wall -DDLL_EXPORT -c "D:\snippets\DynamicLibrary.cpp" -o .\DynamicLibrary.cpp.o
i686-w64-mingw32-g++.exe -shared -Wl,--output-def=libtest_dyn.def -Wl,--out-implib=libtest_dyn.a -Wl,--dll .\DynamicLibrary.cpp.o -o test_dyn.dll
Output size is 63.82 KB
-------------- Build: main in snippet (compiler: GNU GCC Compiler)---------------
i686-w64-mingw32-g++.exe -std=c++11 -Wextra -Wall -c "D:\snippets\main.cpp" -o .\main.cpp.o
i686-w64-mingw32-g++.exe -L"D:\snippets\" -o c++11test.exe .\main.cpp.o -ltest_dyn -ltest_static
i686-w64-mingw32-g++.exe: fatal error: no input files
compilation terminated.
Process terminated with status 1 (0 minutes, 8 seconds)
0 errors, 0 warnings (0 minutes, 8 seconds)รน
(and yes I have __declspec(dllexport) for the dynamic library)