What does this kind of archive file for which has plain text content and a function named INPUT? - compilation

I was compiling my rust code with llvm/clang, and some extern libraries were used, so the compiler tried to link them.
But the linker throwed an error: ld.lld: error: /path/to/libwinapi_shcore.a: unknown file type
Then I checked this file and found that it's not like common .a file:
INPUT(
libwinapi_shcore-api-ms-win-shcore-stream-winrt-l1-1-0.a
libwinapi_shcore-api-ms-win-shcore-scaling-l1-1-2.a
libwinapi_shcore-api-ms-win-core-featurestaging-l1-1-0.a
libwinapi_shcore-api-ms-win-shcore-scaling-l1-1-1.a
libwinapi_shcore-api-ms-win-shcore-scaling-l1-1-0.a
libwinapi_shcore-api-ms-win-core-featurestaging-l1-1-1.a
)
What does these mean? Shouldn't .a file be a binary file?

Related

How do I include mkl_vsl modules for random number generators e.g. 'vsrnggaussian'? (Fortran)

I'm new to Fortran (gfortran on windows) and want to use the random number generator vsrnggaussian.
vsrnggaussian needs the Intel MKL VSL modules 'mkl_vsl_type' and 'mkl_vsl' which are provided in the mkl_vsl.f90 file. This file needs to be included to generate the module files 'mkl_vsl_type.mod' and 'mkl_vsl.mod' which are used to process the Fortran use clauses referencing to the VSL interface:
use mkl_vsl_type
use mkl_vsl
I tried multiple things to include the mkl_vsl.f90 file but none of them work:
I inserted the file into the project directory --> 793 errors occured (can't list all of them here in detail) such as:
Unexpected data declaration statement at (1)
[...] at (1) has no implicit type
expecting [...] statement at (1)
unexpected [...] statement at (1)
and finally Fatal Error: Cannot open module file 'mkl_vsl_type.mod' for reading at (1): No such file or directory. compilation terminated. "gfortran -g -o incl_mkl.exe ../incl_mkl.f90" terminated with exit code 1. Build might be incomplete.
I used the full path in the include statement: INCLUDE 'C:/Program Files (x86)/IntelSWTools/compilers_and_libraries_2016.1.146/windows/mkl/include/mkl_vsl.f90' --> Error: Can't open included file
I tried the -Idir compiler command: gfortran -I/Program Files (x86)/IntelSWTools/compilers_and_libraries_2016.1.146/windows/mkl/include/ -g -o incl_mkl.exe --> gfortran: error: Files: no such file or directory
I put this into the makefile: INCLUDES=-I. -I/Program Files (x86)/IntelSWTools/compilers_and_libraries_2016.1.146/windows/mkl/include/ --> Error: Can't open included file
How do I include the mkl_vsl.f90 file??
edit: my simple code to include the mkl_vsl.f90 file
(this code will be compiled first before i compile my main code with vsrnggaussian):
Program INCL
IMPLICIT NONE
INCLUDE 'mkl_vsl.f90'
!INCLUDE 'C:/Program Files (x86)/IntelSWTools/compilers_and_libraries_2016.1.146/windows/mkl/include/mkl_vsl.f90'
END Program
You'd need to USE both vsl_type and vsl modules. The reason is that the derived types in vsl are defined in vsl_type. MWE
Program INCL
use mkl_vsl_type
use mkl
IMPLICIT NONE
write(6, *) 'hello world'
END Program
You would need to pass the address to file mkl_vsl.f90 to ifort and the mkl flag.
ifort -mkl foo.f90 <address>/mkl_vsl.f90
For using any specific subroutine of MKL consult their website. There is also extensive examples that come with MKL. You may find it in C:/Program Files (x86)/IntelSWTools/compilers_and_libraries_2016.1.146/windows/mkl/examples or something like that.

`Can't open module file, No such file or directory` when compiling Fortran with an external library

I am currently trying to compile a Fortran 90 code using a module that is supposed to be in a dynamic library libfckit.so. So far my code is:
program debug
use fckit_mpi_module
end program debug
And for the compilation step I use the following command:
mpifc -I/path/to/the/lib debug_fckit.f90 -o debug_fckit.exe
I get the following error:
use fckit_mpi_module
1
Fatal Error: Can't open module file ‘fckit_mpi_module.mod’ for reading at (1): No such file or directory
I know that this is a common error in Fortran, I searched google but I did not find any satisfying solution for my case.
Thank you Vladimir and Evets for your comments that helped me to fix the issue. I just added the paths to the directories where the module fckit_mpi_module.mod and the library libfckit.so are. So now my command for compiling the code reads:
mpifc -I/path/to/the/directory/where/the/module/fckit_mpi_module.mod/is -l/path/to/the/directory/where/the/library/lifckit.so/is debug.fckit.f90 -o debug_fckit
Hope this helps some other noobie like me.

Can't use wxWidgets: wxmsw31ud_core.pdb(0,0): Error LNK1136 fatal: invalid or corrupt file

I followed the Creating a new project by hand after building the wx_vc15.sln solution in the ...\wxWidgets\build\msw dir.
I get this error:
...\wxWidgets\lib\vc_x64_lib\wxmsw31ud_core.pdb(0,0): Error LNK1136 fatal: invalid or corrupt file
After rechecking everything (unicode, static linking, Multi-threaded Debug DLL (/MDd), ...), I couldn't find the reason for the error.
These are the preprocessor's definitions I added to the wxWidgets solution, as explained in the Creating a new project by hand page:
WIN32
_LIB
_DEBUG
_CRT_SECURE_NO_DEPRECATE=1
_CRT_NON_CONFORMING_SWPRINTFS=1
_SCL_SECURE_NO_WARNINGS=1
__WXMSW__
WXBUILDING
wxUSE_BASE=0
(The _UNICODE is inherited, no need to add it I presume).

Generate Type Library (TLB) from a Header File

Is it possible to generate type library (.tlb) by using either a header file (.h) or lib (.lib) file?
H file: http://codepad.org/XzBgp9In
IDL generated from H file: http://codepad.org/6IWmuWmx
Error while compiling IDL to TLB:
out\DbgEng.idl(202) : error MIDL2025 : syntax error : expecting a type specification near "_Out_writes_bytes_"
out\DbgEng.idl(202) : error MIDL2026 : cannot recover from earlier syntax errors; aborting compilation

int8 header file not found during compilation

Trying to compile a simple c program and get error.
In file included from /opt/local/lib/gcc47/gcc/x86_64-apple- darwin13/4.7.3/include/stdint.h:3:0,
from ecl/config.h:134,
from ecl/ecl.h:35,
from main.c:2:
/opt/local/lib/gcc47/gcc/x86_64-apple-darwin13/4.7.3/include-fixed/stdint.h:27:32: fatal error: sys/_types/_int8_t.h: No such file or directory
compilation terminated.
What is this error and how can I fix it? From what I gather int8 etc. is typedefined in stdint.h but there's no mention of it in types.h or _types.h. Do I just add these definitions in there or... really lost here.
You have to install IBM® Informix® ESQL/C.
The following BIGINT functionality is available only to users of IBM® Informix® ESQL/C. To use these functions, ESQL/C users will need to manually link their C code to the ESQL/C libraries.
Ref - https://www.ibm.com/docs/en/rbd/9.5.1?topic=libraries-bigint-functions-c
and https://www.ibm.com/docs/en/informix-servers/14.10?topic=programming-esqlc-header-files

Resources