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

Linux & Windows Generation #141

Open
d11ahirst opened this issue Aug 24, 2021 · 12 comments
Open

Linux & Windows Generation #141

d11ahirst opened this issue Aug 24, 2021 · 12 comments
Labels

Comments

@d11ahirst
Copy link

d11ahirst commented Aug 24, 2021

Hi,

I am trying to generate both a windows and linux project using 0.16 however I am coming across this issue?

Contains distinct configurations with the same name, please add something to distinguish them:

- Debug|x64 => 'TestAppSolution:vs2017_Lib_linux_Debug'
- Debug|x64 => 'TestAppSolution:vs2017_Lib_win64_Debug'

Because they both share x64 as platform Its having a hard time generating.

Any ideas on how to fix this?

Thanks

@belkiss
Copy link
Contributor

belkiss commented Aug 24, 2021

Heya! Yes, you need to change the configuration name in your configure all and add something to distinguish them, as the message says :)

Something like:

[Configure]
public virtual void ConfigureAll(Configuration conf, Target target)
{
    // ...
    conf.Name = "[target.Optimization]_[target.Platform]";
}

@d11ahirst
Copy link
Author

Thanks for the quick response Works a treat.

@d11ahirst
Copy link
Author

Actually the problem is now it thinks the win64 build is a linux build so wants to use the connection manager.

@d11ahirst d11ahirst reopened this Aug 24, 2021
@belkiss
Copy link
Contributor

belkiss commented Aug 24, 2021

You mean when debugging? Could you post a screenshot of the property grid and the error you're getting?

@d11ahirst
Copy link
Author

image

When I have x64 windows selected it wants to use Linux connection Manager

cut

@belkiss
Copy link
Contributor

belkiss commented Aug 24, 2021

Hum be careful about the Platform dropdown, select the Active configuration instead of linux:
image

@belkiss
Copy link
Contributor

belkiss commented Aug 24, 2021

Also I meant to ask for a screenshot of the project property pane, not the solution configuration

@d11ahirst
Copy link
Author

d11ahirst commented Aug 24, 2021

Sorry about that

You can see I have active selected but its display the connection manager at the top

image

@belkiss
Copy link
Contributor

belkiss commented Aug 24, 2021

Interesting, looks like the application type is set to linux for the whole vcxproj and not only for the linux configuration.
Could you try separating the vcxproj to see if it works better?

conf.ProjectFileName = "[project.Name]_[target.Platform]";

@d11ahirst
Copy link
Author

It looks like it does work a little better, I end up with multiple projs and have to switch startup apps as well as platform

image

@d11ahirst
Copy link
Author

It does seem like there is a problem of linux and windows coexisting, perhaps its due to sharing x64?

@belkiss
Copy link
Contributor

belkiss commented Aug 25, 2021

Either that or sharpmake needs to protect some sections in the vcxproj with tests of the platform, like the application type.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants
@belkiss @d11ahirst and others