On 4/6/2017 1:29 PM, Óscar Fuentes wrote:
> Edward Diener <[email protected]>
> writes:
>
>> When trying to compile a project in MSYS2 using mingw-64/gcc I get this
>> error:
>>
>> "Building shared library...
>> x86_64-w64-mingw32-gcc -x c-header -DHAVE_CONFIG_H -Wall -Wextra
>> -pedantic -pedantic-errors -Werror -Wwrite-strings -Wconversion
>> -Wsign-conversion -Wsuggest-attribute=noreturn -Winvalid-pch -Wundef
>> -Wshadow -Wstrict-aliasing=2 -Wstrict-overflow=5 -pipe
>> -mno-stack-arg-probe -mno-accumulate-outgoing-args -mpush-args
>> -masm=intel -ffreestanding -DNDEBUG $(echo "" "-include __pch.h -std=c11
>> -Wstrict-prototypes" | sed "s/-include __pch\.h//") -O3
>> -ffunction-sections -fdata-sections -m64 __pch.h -o __pch.h.gch
>> __pch.h:1:70: fatal error:
>> /e/Programming/VersionControl/mcfgthread/src/env/_crtdef.h: No such file
>> or directory
>> #include "/e/Programming/VersionControl/mcfgthread/src/env/_crtdef.h"^
>>
>> compilation terminated.
>> make: *** [Makefile:1143: __pch.h.gch] Error 1"
>>
>> Yet when I do:
>>
>> ls -al /e/Programming/VersionControl/mcfgthread/src/env/_crtdef.h
>>
>> the output is:
>>
>> -rw-r--r-- 1 eldnew8 None 2107 Apr 5 20:24
>> /e/Programming/VersionControl/mcfgthread/src/env/_crtdef.h
>>
>> so clearly the file exists. Any ideas why gcc tells me that there is no
>> such file or directory when using MSYS2 ?
>
> The gcc executable is a "native" Windows application (it does not depend
> on the MSYS2 POSIX emulation layer) hence it does not know about the
>
> /e/...
>
> file path. You must ensure that __pch.h contains valid Windows file
> paths.

Unfortunately it is the "configure" in the project I am trying to 
compile that creates and inserts that absolute path in __pch.h. But 
thanks for the information.

This is my first time using MSYS2 and, as I understand it, I am running 
a Linux-like shell. Within MSYS2 I use a shell command file which 
invokes the traditional "configure/make/make install" sequence using the 
mingw-64/gcc implementation installed from within MSYS2. This sequence 
is the recommended build for the particular library I am building. But 
if the mingw-64/gcc implementation in MSYS2 does not understand the 
MSYS2 environment it seems that I am using the wrong compiler. Am I 
supposed to be installing a Linux gcc implementation instead in MSYS2 ? 
Or is my case just an anomaly of using mingw-64/gcc with MSYS2 ?



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Msys2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/msys2-users

Reply via email to