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

Linker Errors Using Coolprop Media #57

Closed
freundlicherDon opened this issue Mar 22, 2022 · 4 comments
Closed

Linker Errors Using Coolprop Media #57

freundlicherDon opened this issue Mar 22, 2022 · 4 comments
Milestone

Comments

@freundlicherDon
Copy link

I cloned this version:
git status
On branch v4-dev (18.02.2022 13:56)
Your branch is up to date with 'origin/v4-dev'.
Generated ExternalMedia.lib on Windows 10 with
cmake 2.23.0 and VS2019
in GitBash:

cmake -B build -S Projects -DCMAKE_BUILD_TYPE=Release -DFLUIDPROP:BOOL=ON -DCOOLPROP:BOOL=ON
cmake -B build -S Projects -DCMAKE_BUILD_TYPE=Release -DFLUIDPROP:BOOL=ON -DCOOLPROP:BOOL=ON
cmake --build build --config Release --target install

-> no errors.

Loading ExternalMedia in Dymola 2022:
Running "External.Media.Test.Coolprop.CO2.TestStatesSupercritical" out of the box:

Compiling and linking the model (Visual C++).
64-bit mode activated.
dsmodel.c
dsmodel.c(347): warning C4133: 'function': incompatible types - from 'DymStruc0 *' to 'ExternalThermodynamicState *'
dsmodel.c(391): warning C4133: 'function': incompatible types - from 'DymStruc0 *' to 'ExternalThermodynamicState *'
dsmodel.c(1005): warning C4267: 'function': conversion from 'size_t' to 'int', possible loss of data
Creating library dymosim.lib and object dymosim.exp
LINK : warning LNK4199: /DELAYLOAD:ExternalMediaLib.dll ignored; no imports found from ExternalMediaLib.dll
dsmodel.obj : error LNK2019: unresolved external symbol TwoPhaseMedium_getMolarMass_C_impl referenced in function ExternalMedia_Media_CoolPropMedium_getMolarMassx_0Unique14_M
dsmodel.obj : error LNK2019: unresolved external symbol TwoPhaseMedium_getCriticalTemperature_C_impl referenced in function ExternalMedia_Media_CoolPropMedium_getCriticalTemperaturex_0Unique15_M
dsmodel.obj : error LNK2019: unresolved external symbol TwoPhaseMedium_getCriticalPressure_C_impl referenced in function ExternalMedia_Media_CoolPropMedium_getCriticalPressurex_0Unique16_M
dsmodel.obj : error LNK2019: unresolved external symbol TwoPhaseMedium_getCriticalMolarVolume_C_impl referenced in function ExternalMedia_Media_CoolPropMedium_getCriticalMolarVolumex_0Unique17_M
dsmodel.obj : error LNK2019: unresolved external symbol TwoPhaseMedium_setState_ph_C_impl referenced in function ExternalMedia_Media_CoolPropMedium_setStatex_0phx_0Unique18_M
dsmodel.obj : error LNK2019: unresolved external symbol TwoPhaseMedium_setState_pT_C_impl referenced in function ExternalMedia_Media_CoolPropMedium_setStatex_0pTx_0Unique19_M
dymosim.ex_ : fatal error LNK1120: 6 unresolved externals

Error generating Dymosim.

Has anyone an idea, what I have done wrong?
Thank you in advance for any hints.

@freundlicherDon
Copy link
Author

Ok, it seems this problem is connected with the DLL option. When using a generated LIB instead it works fine with CoolProp.

@casella
Copy link
Collaborator

casella commented May 20, 2022

See #50

@casella
Copy link
Collaborator

casella commented Jun 4, 2022

See also #62, we're almost done 😃

@casella casella added this to the 3.3.2 milestone Apr 12, 2023
@casella
Copy link
Collaborator

casella commented Apr 12, 2023

All linker errors should be resolved in version 3.3.2.

@casella casella closed this as completed Apr 12, 2023
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

No branches or pull requests

2 participants