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

vsxmake unknown target #1288

Closed
wujilingfeng opened this issue Mar 17, 2021 · 8 comments
Closed

vsxmake unknown target #1288

wujilingfeng opened this issue Mar 17, 2021 · 8 comments

Comments

@wujilingfeng
Copy link

wujilingfeng commented Mar 17, 2021

Describe the bug

I use the xmake to generate vsxmake,but the project throws "unknown target main".
My project' url is https://github.com/wujilingfeng/cstructures.git. It's a simple library about structures written by c.

I run commands like 'xmake f --demo=y --demo_path="Demo"&&xmake project -k vsxmake'.
When I use vs to run the main program It goes wrong.

Error Output

unknown target:main

Expected behavior

I just want to run this program.It works well when target is library.

Related Environment

  • xmake version:2.5.2
  • os: windows
  • target platform: vs2019

others

我想捐赠一些钱,最好贴出支付宝或微信二维码,其他的我不太会用。这样也方便中国用户捐赠。

@waruqi
Copy link
Member

waruqi commented Mar 17, 2021

请贴下完整错误输出,以及执行的命令。。

我想捐赠一些钱,最好贴出支付宝或微信二维码,其他的我不太会用。这样也方便中国用户捐赠。

官网有捐助入口:
https://xmake.io/#/zh-cn/about/sponsor

@wujilingfeng
Copy link
Author

wujilingfeng commented Mar 17, 2021

对不起,我已经修改了问题。它主要出现我的项目(一个目录结构体简单的c语言项目)。

@wujilingfeng
Copy link
Author

image

@waruqi
Copy link
Member

waruqi commented Mar 17, 2021

我这可以的么,没啥问题,仅仅只是一些你工程代码的编译问题

Snip20210317_6

I run commands like 'xmake f --demo=y --demo_path="Demo"&&xmake project -k vsmake'.

vsmake? vsxmake?

@wujilingfeng
Copy link
Author

wujilingfeng commented Mar 17, 2021

那个分号我已经添加了,对不起,忘了提交这个修改了。加了分号,你再试试?试试那个主程序。

@waruqi
Copy link
Member

waruqi commented Mar 17, 2021

if has_config("demo") and has_config("demo_path") then
target("main")

看了下,目前 vsxmake 还不能很好的处理 option 去控制 target。。因为执行完 vsxmake 生成,config 缓存会被清掉,导致内部执行时候,demo 等 option 状态失效。。

这块我回头会改进修复下

@waruqi waruqi added this to the v2.5.3 milestone Mar 17, 2021
@waruqi
Copy link
Member

waruqi commented Mar 17, 2021

我修复了,更新到 dev 分支版本后再试试。可以从 ci 或者 releases 上下载 xmake-dev.exe 安装。也可以执行 xmake update -s dev 直接更新 lua 脚本。。

@wujilingfeng
Copy link
Author

强!

@waruqi waruqi closed this as completed Mar 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants