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

Incorrectly assumes proxyfmu.exe in working directory #40

Closed
ljamt opened this issue Sep 7, 2021 · 2 comments · Fixed by #41
Closed

Incorrectly assumes proxyfmu.exe in working directory #40

ljamt opened this issue Sep 7, 2021 · 2 comments · Fixed by #41

Comments

@ljamt
Copy link
Member

ljamt commented Sep 7, 2021

Currently the working directory must be equal to location of proxyfmu.exe. Running libcosim should know where to find proxyfmu.

Works:
C:\osp\cosim\bin> .\cosim.exe run C:\path\to\config\

Fails:
C:\osp\cosim> .\bin\cosim.exe run C:\path\to\config\

@ljamt ljamt transferred this issue from open-simulation-platform/libcosim Sep 7, 2021
@markaren
Copy link
Collaborator

markaren commented Sep 7, 2021

@markaren
Copy link
Collaborator

markaren commented Sep 8, 2021

 if (!proxyfmu::filesystem::exists(executable)) {
        boost::dll::fs::error_code ec;
        boost::dll::fs::path loc = boost::dll::program_location(ec);
        if (!ec.failed()) {
            executable = loc.parent_path().string() / executable;
        }
    }

Should work.

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

Successfully merging a pull request may close this issue.

2 participants