controllab / fmi-export-20sim

FMI export code generation template for 20-sim
GNU General Public License v3.0
3 stars 4 forks source link

Problems accessing resources in Mac version of FMU #10

Closed richardpaynea55 closed 8 years ago

richardpaynea55 commented 8 years ago

20-sim FMUs which access external resources are not working when FMUs are built for Mac using the INTO FMU builder (App version 1.1.1, COE version 0.1.1). Speaking to Kenneth, he suspects the issue is here:

https://github.com/controllab/fmi-export-20sim/blob/master/StandaloneFMU/src/%25FMI_PREFIX%25Functions.c#L75

he says: "this will make the absolute path /Users/kel/some/thing become Users/kel/some/thing on *nix systems but it will work correctly on windows since it is /c:/Users/kel/some/thing which then becomes c:/Users/kel/some/thing which is valid in C on windows"

Examples are available in the INTO repositories: case-study_fcu, branch rjp/coe0.1.0 and case-study_line_follower_robot, branch kgp/0.1.1

richardpaynea55 commented 8 years ago

This issue is still present in both examples listed in the original message. I have compiled the FMU in 20-sim using the newest version of the FMI export and compiled for cross platform with the INTO-CPS FMU builder.

margro commented 8 years ago

I've pushed another change that should also fix the

file:/Users/username/some/path case.

I saw that several Java versions by default generate URIs with file:/ instead of file:///