CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > CONVERGE

how to compile a Linux.so library to a.dll library for Windows

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 21, 2024, 05:33
Default how to compile a Linux.so library to a.dll library for Windows
  #1
New Member
 
shen wu
Join Date: Jan 2024
Posts: 2
Rep Power: 0
Shen Wu is on a distinguished road
Hello, I am trying to use a UDF library created for Linux system, and I want to transfer it to Windows system.
I failed to compile it some time in VS2019 following the UDF manual 3.0 based on my src and include folders, so I wonder how to finish it, or is there anything new in the UDF manual 3.2 document?
Shen Wu is offline   Reply With Quote

Old   May 21, 2024, 15:38
Default
  #2
New Member
 
kwhyte's Avatar
 
Killian Whyte
Join Date: May 2024
Posts: 3
Rep Power: 2
kwhyte is on a distinguished road
Hi Shen,
I have a few questions for you to help clarify what the problem is.
What error messages are you getting when you are trying to compile your UDF?
Is the version of CONVERGE that you are using on Windows the same as the one you are using on Linux? Also, how are you transferring your UDF library directory over to Windows? Are you just copying over the folder without rerunning the cvg_udf_init command? This will not work because the paths in, e.g, the .make and .cmake files will be out of date.

Regards,
-Killian (Applications Engineer at Convergent Science)
kwhyte is offline   Reply With Quote

Old   June 2, 2024, 00:40
Default VS errors
  #3
New Member
 
shen wu
Join Date: Jan 2024
Posts: 2
Rep Power: 0
Shen Wu is on a distinguished road
Quote:
Originally Posted by kwhyte View Post
Hi Shen,
I have a few questions for you to help clarify what the problem is.
What error messages are you getting when you are trying to compile your UDF?
Is the version of CONVERGE that you are using on Windows the same as the one you are using on Linux? Also, how are you transferring your UDF library directory over to Windows? Are you just copying over the folder without rerunning the cvg_udf_init command? This will not work because the paths in, e.g, the .make and .cmake files will be out of date.

Regards,
-Killian (Applications Engineer at Convergent Science)
Dear Killian,
Sorry for the late reply.
The Converge versions in Windows and Linux are different (Linux: 3024 vs. windows 3.17). Following the steps in UDF Manual 3.0, I just copy the .src and .includes folders to Windows and run the converge_udf.dll so these paths are invalid. so I wonder how can I set new path. Can I find something new from the UDF Manual 3.2?
And if it is possible to convert this .so to .dll without original .mpp documents?
Thank you very much!

Regards,
Shen WU
Shen Wu is offline   Reply With Quote

Old   June 4, 2024, 11:39
Default
  #4
New Member
 
kwhyte's Avatar
 
Killian Whyte
Join Date: May 2024
Posts: 3
Rep Power: 2
kwhyte is on a distinguished road
Shen,

I have not compiled a UDF on Windows before, only Linux, so I am perhaps a bit out of my depth on this issue. But, could you try one thing for me? Instead of copying your files in src and include directly over to your Windows filesystem, could you try converting them to DOS format first using the unix2dos command?

I'm still not exactly sure what's going wrong, so if you could tell me the precise error messages you are getting when you try to compile on Windows, that would be helpful.
kwhyte is offline   Reply With Quote

Old   June 14, 2024, 16:28
Default
  #5
New Member
 
Join Date: Jun 2020
Posts: 21
Rep Power: 6
Pedram Tazraei is on a distinguished road
Quote:
Originally Posted by Shen Wu View Post
Dear Killian,
Sorry for the late reply.
The Converge versions in Windows and Linux are different (Linux: 3024 vs. windows 3.17). Following the steps in UDF Manual 3.0, I just copy the .src and .includes folders to Windows and run the converge_udf.dll so these paths are invalid. so I wonder how can I set new path. Can I find something new from the UDF Manual 3.2?
And if it is possible to convert this .so to .dll without original .mpp documents?
Thank you very much!

Regards,
Shen WU
Hi Shen,


Regarding compiling a UDF on windows, the process is totally different than the one for Linux.
You can always refer to the manual section called "Building and Executing CONVERGE UDFs on Windows". The process is the same for 3.0, 3.1, 3.2 versions on windows.
Please let us know if you have any questions.
Pedram Tazraei is offline   Reply With Quote

Reply

Tags
udf library


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Compile boundary condition as a new dynamic library mohanphy OpenFOAM Programming & Development 22 January 21, 2021 06:53
how to compile new thermodynamic library (basicPsiThermo) megacrout OpenFOAM 1 February 2, 2012 04:57
compile a library aqua OpenFOAM 2 November 3, 2011 21:03
OpenFOAM141dev linking error on IBM AIX 52 matthias OpenFOAM Installation 24 April 28, 2008 16:49
Compile of the library is so slow liu OpenFOAM Running, Solving & CFD 1 July 15, 2005 03:49


All times are GMT -4. The time now is 06:55.