I try to link static library compiled using Visual C++ to my program compiled with GCC, and call someFunction()
On github there is source code of both library and program
https://github.com/Kaspek2480/DoubleCompilersProblem
[1/2] Building CXX object CMakeFiles/myprogram.dir/main.cpp.obj
[2/2] Linking CXX executable myprogram.exe
FAILED: myprogram.exe
cmd.exe /C "cd . && C:\dev-tools\mingw64\bin\c++.exe -O3 -DNDEBUG CMakeFiles/myprogram.dir/main.cpp.obj -o myprogram.exe -Wl,--out-implib,libmyprogram.dll.a -Wl,--major-image-version,0,--minor-image-version,0 -LC:/Users/Kaspek/CLionProjects/LinkerTest/VisualCppStaticLibrary/cmake-build-release-visual-studio -lmylibrary -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32 && cd ."
c:/dev-tools/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: CMakeFiles/myprogram.dir/main.cpp.obj:main.cpp:(.text.startup+0xe): undefined reference to `someFunction()'```
dumpbin:
Dump of file C:\Users\Kaspek\CLionProjects\LinkerTest\VisualCppStaticLibrary\cmake-build-release-visual-studio\mylibrary.lib
File Type: LIBRARY
Linker Directives
-----------------
/DEFAULTLIB:MSVCRT
/DEFAULTLIB:OLDNAMES
/EXPORT:someFunction
Summary
60 .chks64
DC .debug$S
44 .drectve
18 .pdata
1C .rdata
BA .text$mn
20 .xdata
Library compiled using visual c++ is written in C so function name are not broken. Where is the problem with my code?