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

How to Make My pythonFMU compatible with win32 or x86 #204

Open
Manish136 opened this issue Feb 5, 2024 · 11 comments
Open

How to Make My pythonFMU compatible with win32 or x86 #204

Manish136 opened this issue Feb 5, 2024 · 11 comments

Comments

@Manish136
Copy link

I have a built a PythonFMU, it is compatible with win64. I require the same FMU to be compatible with win32. Can explain the procedure.

@markaren
Copy link
Member

markaren commented Feb 5, 2024

Run build_xxx.sh (or otherwise invoke similar commands in a terminal) found in /pythonfmu/pythonfmu-export/ (requires a C++ build environment, compiler, CMake etc.).

Copy the 32 bit shared library folder from /resources/ that should appear in /pythonfmu/resources/binaries/ into the binaries folder inside your FMU.

@Manish136
Copy link
Author

Thank you for your quick response.
For 32 bit should i change the x64 to x86 ? in build_win.sh file.

@Manish136
Copy link
Author

It is not working

@markaren
Copy link
Member

markaren commented Feb 6, 2024

For 32 bit should i change the x64 to x86 ? in build_win.sh file.

Ah, yes remove -A x64 for a 32bit build (if this is still the default on MSVC compiler)

It is not working

What is not working?

@Manish136
Copy link
Author

After removing -A x64 still, I'm not getting the any win32 folder under /pythonfmu/resources/binaries/.
And also under the build folder(which is generated after running the build_win.sh file) , I'm able to see the x64 folder getting generated.

@Manish136
Copy link
Author

Should i download a CMAKE with 32bit ?

@markaren
Copy link
Member

markaren commented Feb 6, 2024

Should i download a CMAKE with 32bit ?

No. Microsoft Visual C++ (MSVC) can compile to both 64 and 32 bit. 32bit is the default, which is why x64 is specified.
Try deleting the /build folder before trying again and also observe the build output for clues.

@Manish136
Copy link
Author

I tried deleting the build folder, ran the -build_win.sh file, But still not getting the anything under /pythonfmu/resources/binaries/

@Manish136
Copy link
Author

when i see the build outputs in cmd line, I observed that after running the cmake .. -DCMAKE_BUILD_TYPE=Release. i'm able to see only the following
Building pythonfmu-export for platform x86_64-windows
There is no Win32 or x86 getting built

@markaren
Copy link
Member

markaren commented Feb 6, 2024

I'm not sure what the issue is. You will need to play around with the settings. You will also need 32-bit Python.

@Manish136
Copy link
Author

I'm able to build a x86 or Win32 using -DCMAKE_BUILD_TYPE=Release , getting the x86 folder with dll under /pythonfmu/resources/binaries/ . I copied it to the Binaries of the built FMU . Now when i try to Simulate , Simulation is not working .
Note i have both python-32bit and 64-bit in the ENV path

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

No branches or pull requests

2 participants