Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mingw64 can not compile on win7 #779

Closed
retsyo opened this issue Jun 29, 2019 · 7 comments
Closed

mingw64 can not compile on win7 #779

retsyo opened this issue Jun 29, 2019 · 7 comments
Labels
Bug This tag is applied to issues which reports bugs.

Comments

@retsyo
Copy link

retsyo commented Jun 29, 2019

I am following your instruction in README.md, and try to compile on windows 7

$ gcc -std=gnu11 -w -o v.exe v.c  # Build it with
v.c: In function 'os__getexepath':
v.c:3601:22: error: invalid type argument of unary '*' (have 'DWORD {aka long unsigned int}')
   return tos(result, *GetModuleFileName(0, result, os__MAX_PATH));
                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

and

$ gcc --version
gcc.exe (Rev1, Built by MSYS2 project) 7.3.0
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
@retsyo retsyo added the Bug This tag is applied to issues which reports bugs. label Jun 29, 2019
@retsyo
Copy link
Author

retsyo commented Jun 29, 2019

btw this is the only line which forbide v.c to be compiled on windows in mingw64. An improvement. thanks

@changrui
Copy link
Contributor

Windows 10 too, my gcc v8.1.0, error massage is the same.

@yar999
Copy link

yar999 commented Jun 29, 2019

Modify v.c as follows, and you can compile it manually gcc -std=gnu11 -w -o v.exe v.c

from

return tos(result, *GetModuleFileName(0, result, os__MAX_PATH));

to

return tos(result, GetModuleFileName(0, result, os__MAX_PATH));

@retsyo
Copy link
Author

retsyo commented Jun 29, 2019

if we use os.getexepath() in V code, the following

return  tos ( result ,* GetModuleFileName ( 0 ,  result ,  os__MAX_PATH ) ) ;

will be generated.

@joe-conigliaro
Copy link
Member

I made PR for this: #783

@aguspiza
Copy link
Contributor

aguspiza commented Jun 29, 2019

PR #776 fixes the same but v.c needs to be updated too

@medvednikov
Copy link
Member

Fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug This tag is applied to issues which reports bugs.
Projects
None yet
Development

No branches or pull requests

6 participants