Archived OpenModelica forums. Posting is disabled.

Alternative forums include GitHub discussions or StackOverflow (make sure to read the Stack Overflow rules; you need to have well-formed questions)


Forgot password? | Forgot username? | Register

modelicaADS

modelicaADS

Hello everyone,
I want to model a robotic arm and use modelicaADS objet to interface with a beckhoff security module.
I am very now to OpenModelica and just installed it and run two models.
How do I use modelicaADS?
Any information is very welcome.

https://build.openmodelica.org/Document … mples.html
https://build.openmodelica.org/Document … nents.html

Best regards,

JM

PS: is there a search tool for the forum? can't find any.

Re: modelicaADS

I think I could work out something with these files :
https://github.com/TechnicalBuildingSystems/ModelicaADS
Unfortunately, when opening the getting started files, i get this error message:

"[3] 18:32:16 Ecriture Erreur
Failed to insert class GettingStarted within ModelicaADS.UsersGuide.Documentation;  the available classes were:
  Modelica.SIunits.ComplexPerUnit
  Modelica.SIunits.ComplexPower
  Modelica.SIunits.ComplexAdmittance
  Modelica.SIunits.ComplexImpedance
....."

Any idea about how to insert these classes?

Thank you,

JM

Re: modelicaADS

I've moved on a bit but I can't compile the example.
I have the following error message:

In file included from ModelicaADS.Components.AdsCommunicatorExample_functions.c:7:
./ModelicaADS.Components.AdsCommunicatorExample_includes.h:4:10: fatal error: 'AdsHeaderFile.h' file not found


I know the path to the missing file, but I don't know how to tell the path to modelica.

Re: modelicaADS

The library should have an IncludeDirectory annotation for the external function which points inside the Modelica library, something like:
annotation(IncludeDirectory="modelica://ModelicaADS/Resources/Include")
See: https://specification.modelica.org/main … lude-files
which tells the tool what includes to give to the C compiler. I guess the library is missing this.

Re: modelicaADS

I have looked in the library and it does contain the correct IncludeDirectory annotations.
Can you post the entire compilation log here?

Re: modelicaADS

I tried the example myself and I get:

Code:


C:/home/adrpo33/dev/OpenModelica/build/share/omc/scripts/Compile.bat ExampleAdsLoop gcc mingw64 parallel 8 0
PATH = "C:\OMDev\tools\msys\mingw64\bin;C:\OMDev\tools\msys\mingw64\bin\..\..\usr\bin;"
mingw32-make: Entering directory 'C:/temp/MODELI~1.EXA'
clang  -Os -Wno-parentheses-equality -falign-functions -mstackrealign -msse2 -mfpmath=sse     "-IC:/home/adrpo33/dev/modelica/ModelicaADS/ModelicaADS/Resources/Include" -I"C:/home/adrpo33/dev/OpenModelica/build/include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=ExampleAdsLoop -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0  -c -o ExampleAdsLoop.o ExampleAdsLoop.c
clang  -Os -Wno-parentheses-equality -falign-functions -mstackrealign -msse2 -mfpmath=sse     "-IC:/home/adrpo33/dev/modelica/ModelicaADS/ModelicaADS/Resources/Include" -I"C:/home/adrpo33/dev/OpenModelica/build/include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=ExampleAdsLoop -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0  -c -o ExampleAdsLoop_functions.o ExampleAdsLoop_functions.c
clang  -Os -Wno-parentheses-equality -falign-functions -mstackrealign -msse2 -mfpmath=sse     "-IC:/home/adrpo33/dev/modelica/ModelicaADS/ModelicaADS/Resources/Include" -I"C:/home/adrpo33/dev/OpenModelica/build/include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=ExampleAdsLoop -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0  -c -o ExampleAdsLoop_records.o ExampleAdsLoop_records.c
clang  -Os -Wno-parentheses-equality -falign-functions -mstackrealign -msse2 -mfpmath=sse     "-IC:/home/adrpo33/dev/modelica/ModelicaADS/ModelicaADS/Resources/Include" -I"C:/home/adrpo33/dev/OpenModelica/build/include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=ExampleAdsLoop -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0  -c -o ExampleAdsLoop_01exo.o ExampleAdsLoop_01exo.c
clang  -Os -Wno-parentheses-equality -falign-functions -mstackrealign -msse2 -mfpmath=sse     "-IC:/home/adrpo33/dev/modelica/ModelicaADS/ModelicaADS/Resources/Include" -I"C:/home/adrpo33/dev/OpenModelica/build/include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=ExampleAdsLoop -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0  -c -o ExampleAdsLoop_02nls.o ExampleAdsLoop_02nls.c
clang  -Os -Wno-parentheses-equality -falign-functions -mstackrealign -msse2 -mfpmath=sse     "-IC:/home/adrpo33/dev/modelica/ModelicaADS/ModelicaADS/Resources/Include" -I"C:/home/adrpo33/dev/OpenModelica/build/include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=ExampleAdsLoop -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0  -c -o ExampleAdsLoop_03lsy.o ExampleAdsLoop_03lsy.c
clang  -Os -Wno-parentheses-equality -falign-functions -mstackrealign -msse2 -mfpmath=sse     "-IC:/home/adrpo33/dev/modelica/ModelicaADS/ModelicaADS/Resources/Include" -I"C:/home/adrpo33/dev/OpenModelica/build/include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=ExampleAdsLoop -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0  -c -o ExampleAdsLoop_04set.o ExampleAdsLoop_04set.c
clang  -Os -Wno-parentheses-equality -falign-functions -mstackrealign -msse2 -mfpmath=sse     "-IC:/home/adrpo33/dev/modelica/ModelicaADS/ModelicaADS/Resources/Include" -I"C:/home/adrpo33/dev/OpenModelica/build/include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=ExampleAdsLoop -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0  -c -o ExampleAdsLoop_05evt.o ExampleAdsLoop_05evt.c
ExampleAdsLoop_functions.c:41:14: warning: implicit declaration of function 'funAdsConstructor' is invalid in C99 [-Wimplicit-function-declaration]
  _ans_ext = funAdsConstructor(_port_ext, _AmsNetID1_ext, _AmsNetID2_ext, _AmsNetID3_ext, _AmsNetID4_ext, _AmsNetID5_ext, _AmsNetID6_ext);
             ^
ExampleAdsLoop_functions.c:73:14: warning: implicit declaration of function 'funAdsDestructor' is invalid in C99 [-Wimplicit-function-declaration]
  _ans_ext = funAdsDestructor();
             ^
ExampleAdsLoop_functions.c:94:16: warning: implicit declaration of function 'funAdsReceiveReal' is invalid in C99 [-Wimplicit-function-declaration]
  _state_ext = funAdsReceiveReal(&_recvData_ext, MMC_STRINGDATA(_varName));
               ^
ExampleAdsLoop_functions.c:118:14: warning: implicit declaration of function 'funAdsSendReal' is invalid in C99 [-Wimplicit-function-declaration]
  _ans_ext = funAdsSendReal(_sendData_ext, MMC_STRINGDATA(_varName));
             ^
clang  -Os -Wno-parentheses-equality -falign-functions -mstackrealign -msse2 -mfpmath=sse     "-IC:/home/adrpo33/dev/modelica/ModelicaADS/ModelicaADS/Resources/Include" -I"C:/home/adrpo33/dev/OpenModelica/build/include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=ExampleAdsLoop -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0  -c -o ExampleAdsLoop_06inz.o ExampleAdsLoop_06inz.c
4 warnings generated.
clang  -Os -Wno-parentheses-equality -falign-functions -mstackrealign -msse2 -mfpmath=sse     "-IC:/home/adrpo33/dev/modelica/ModelicaADS/ModelicaADS/Resources/Include" -I"C:/home/adrpo33/dev/OpenModelica/build/include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=ExampleAdsLoop -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0  -c -o ExampleAdsLoop_07dly.o ExampleAdsLoop_07dly.c
clang  -Os -Wno-parentheses-equality -falign-functions -mstackrealign -msse2 -mfpmath=sse     "-IC:/home/adrpo33/dev/modelica/ModelicaADS/ModelicaADS/Resources/Include" -I"C:/home/adrpo33/dev/OpenModelica/build/include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=ExampleAdsLoop -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0  -c -o ExampleAdsLoop_08bnd.o ExampleAdsLoop_08bnd.c
clang  -Os -Wno-parentheses-equality -falign-functions -mstackrealign -msse2 -mfpmath=sse     "-IC:/home/adrpo33/dev/modelica/ModelicaADS/ModelicaADS/Resources/Include" -I"C:/home/adrpo33/dev/OpenModelica/build/include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=ExampleAdsLoop -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0  -c -o ExampleAdsLoop_09alg.o ExampleAdsLoop_09alg.c
clang  -Os -Wno-parentheses-equality -falign-functions -mstackrealign -msse2 -mfpmath=sse     "-IC:/home/adrpo33/dev/modelica/ModelicaADS/ModelicaADS/Resources/Include" -I"C:/home/adrpo33/dev/OpenModelica/build/include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=ExampleAdsLoop -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0  -c -o ExampleAdsLoop_10asr.o ExampleAdsLoop_10asr.c
clang  -Os -Wno-parentheses-equality -falign-functions -mstackrealign -msse2 -mfpmath=sse     "-IC:/home/adrpo33/dev/modelica/ModelicaADS/ModelicaADS/Resources/Include" -I"C:/home/adrpo33/dev/OpenModelica/build/include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=ExampleAdsLoop -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0  -c -o ExampleAdsLoop_11mix.o ExampleAdsLoop_11mix.c
clang  -Os -Wno-parentheses-equality -falign-functions -mstackrealign -msse2 -mfpmath=sse     "-IC:/home/adrpo33/dev/modelica/ModelicaADS/ModelicaADS/Resources/Include" -I"C:/home/adrpo33/dev/OpenModelica/build/include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=ExampleAdsLoop -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0  -c -o ExampleAdsLoop_12jac.o ExampleAdsLoop_12jac.c
clang  -Os -Wno-parentheses-equality -falign-functions -mstackrealign -msse2 -mfpmath=sse     "-IC:/home/adrpo33/dev/modelica/ModelicaADS/ModelicaADS/Resources/Include" -I"C:/home/adrpo33/dev/OpenModelica/build/include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=ExampleAdsLoop -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0  -c -o ExampleAdsLoop_13opt.o ExampleAdsLoop_13opt.c
clang  -Os -Wno-parentheses-equality -falign-functions -mstackrealign -msse2 -mfpmath=sse     "-IC:/home/adrpo33/dev/modelica/ModelicaADS/ModelicaADS/Resources/Include" -I"C:/home/adrpo33/dev/OpenModelica/build/include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=ExampleAdsLoop -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0  -c -o ExampleAdsLoop_14lnz.o ExampleAdsLoop_14lnz.c
clang  -Os -Wno-parentheses-equality -falign-functions -mstackrealign -msse2 -mfpmath=sse     "-IC:/home/adrpo33/dev/modelica/ModelicaADS/ModelicaADS/Resources/Include" -I"C:/home/adrpo33/dev/OpenModelica/build/include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=ExampleAdsLoop -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0  -c -o ExampleAdsLoop_15syn.o ExampleAdsLoop_15syn.c
clang  -Os -Wno-parentheses-equality -falign-functions -mstackrealign -msse2 -mfpmath=sse     "-IC:/home/adrpo33/dev/modelica/ModelicaADS/ModelicaADS/Resources/Include" -I"C:/home/adrpo33/dev/OpenModelica/build/include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=ExampleAdsLoop -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0  -c -o ExampleAdsLoop_16dae.o ExampleAdsLoop_16dae.c
clang  -Os -Wno-parentheses-equality -falign-functions -mstackrealign -msse2 -mfpmath=sse     "-IC:/home/adrpo33/dev/modelica/ModelicaADS/ModelicaADS/Resources/Include" -I"C:/home/adrpo33/dev/OpenModelica/build/include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=ExampleAdsLoop -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0  -c -o ExampleAdsLoop_17inl.o ExampleAdsLoop_17inl.c
clang  -Os -Wno-parentheses-equality -falign-functions -mstackrealign -msse2 -mfpmath=sse     "-IC:/home/adrpo33/dev/modelica/ModelicaADS/ModelicaADS/Resources/Include" -I"C:/home/adrpo33/dev/OpenModelica/build/include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=ExampleAdsLoop -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0  -c -o ExampleAdsLoop_18spd.o ExampleAdsLoop_18spd.c
clang -I. -o ExampleAdsLoop.exe ExampleAdsLoop.o ExampleAdsLoop_functions.o ExampleAdsLoop_records.o ExampleAdsLoop_01exo.o ExampleAdsLoop_02nls.o ExampleAdsLoop_03lsy.o ExampleAdsLoop_04set.o ExampleAdsLoop_05evt.o ExampleAdsLoop_06inz.o ExampleAdsLoop_07dly.o ExampleAdsLoop_08bnd.o ExampleAdsLoop_09alg.o ExampleAdsLoop_10asr.o ExampleAdsLoop_11mix.o ExampleAdsLoop_12jac.o ExampleAdsLoop_13opt.o ExampleAdsLoop_14lnz.o ExampleAdsLoop_15syn.o ExampleAdsLoop_16dae.o ExampleAdsLoop_17inl.o ExampleAdsLoop_18spd.o "-IC:/home/adrpo33/dev/modelica/ModelicaADS/ModelicaADS/Resources/Include" -I"C:/home/adrpo33/dev/OpenModelica/build/include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=ExampleAdsLoop -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0 -L"C:/home/adrpo33/dev/modelica/ModelicaADS/ModelicaADS/Examples"  "-LC:/home/adrpo33/dev/OpenModelica/build/lib//omc" "-LC:/home/adrpo33/dev/OpenModelica/build/lib/" "-LC:/Users/adrpo33/AppData/Roaming/.openmodelica/binaries/ModelicaADS" "-LC:/home/adrpo33/dev/modelica/ModelicaADS/ModelicaADS/Resources/Library/mingw64" "-LC:/home/adrpo33/dev/modelica/ModelicaADS/ModelicaADS/Resources/Library/win64" "-LC:/home/adrpo33/dev/modelica/ModelicaADS/ModelicaADS/Resources/Library" -lTcAdsDll "-LC:/Users/adrpo33/AppData/Roaming/.openmodelica/binaries/Modelica" "-Lc:/home/adrpo33/dev/OpenModelica/build/lib/omlibrary/Modelica 3.2.3/Resources/Library/mingw64" "-Lc:/home/adrpo33/dev/OpenModelica/build/lib/omlibrary/Modelica 3.2.3/Resources/Library/win64" "-Lc:/home/adrpo33/dev/OpenModelica/build/lib/omlibrary/Modelica 3.2.3/Resources/Library" -lModelicaExternalC  -Os -Wno-parentheses-equality -falign-functions -mstackrealign -msse2 -mfpmath=sse     "-IC:/home/adrpo33/dev/modelica/ModelicaADS/ModelicaADS/Resources/Include" -I"C:/home/adrpo33/dev/OpenModelica/build/include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=ExampleAdsLoop -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0 -L"C:/home/adrpo33/dev/OpenModelica/build/lib//omc" -L"C:/home/adrpo33/dev/OpenModelica/build/lib" -Wl,--stack,16777216,-rpath,"C:/home/adrpo33/dev/OpenModelica/build/lib//omc" -Wl,-rpath,"C:/home/adrpo33/dev/OpenModelica/build/lib"  -fopenmp -Wl,-Bstatic -lregex -ltre -lintl -liconv -lexpat -lomcgc -lpthread -loleaut32 -limagehlp -lhdf5 -lz -lszip -Wl,-Bdynamic -Wl,-Bdynamic -lSimulationRuntimeC -Wl,-Bdynamic -Wl,-Bdynamic -lomcgc -lregex -ltre -lintl -liconv -lexpat -static-libgcc -luuid -loleaut32 -lole32 -limagehlp -lws2_32 -llis -lsundials_nvecserial -lsundials_sunmatrixdense -lsundials_sunmatrixsparse -lsundials_sunlinsoldense -lsundials_sunlinsolklu -lsundials_sunlinsollapackdense -lsundials_sunlinsolspbcgs -lsundials_sunlinsolspfgmr -lsundials_sunlinsolspgmr -lsundials_sunlinsolsptfqmr -lsundials_sunnonlinsolnewton -lsundials_cvode -lsundials_cvodes -lsundials_idas -lsundials_kinsol -lumfpack -lklu -lcolamd -lbtf -lamd -lsuitesparseconfig -lipopt -lcoinmumps -lpthread -lm  -lgfortran -lquadmath -lmingw32 -lgcc_eh -lmoldname -lmingwex  -luser32 -lkernel32 -ladvapi32 -lshell32 -lopenblas -lcminpack -Wl,-Bdynamic -lwsock32 -lstdc++
C:\OMDev\tools\msys\mingw64\bin\ld: cannot find -lTcAdsDll
clang: error: linker command failed with exit code 1 (use -v to see invocation)
mingw32-make: *** [ExampleAdsLoop.makefile:37: omc_main_target] Error 1
mingw32-make: Leaving directory 'C:/temp/MODELI~1.EXA'
Compilation process failed. Exited with code 0x00000002.

So the compilation works fine but I'm missing the TcAdsDLL.dll, I guess that comes from some other source.

Re: modelicaADS

C:/Program Files/OpenModelica1.17.0-64bit/share/omc/scripts/Compile.bat ModelicaADS.Examples.ExampleAdsLoop gcc mingw64 parallel 4 0

PATH = "C:\PROGRA~1\OPENMO~1.0-6\tools\msys\mingw64\bin;C:\PROGRA~1\OPENMO~1.0-6\tools\msys\mingw64\bin\..\..\usr\bin;"

mingw32-make: Entering directory 'C:/Users/jj241397/AppData/Local/Temp/OPENMO~1/OMEdit/MODELI~1.EXA'

clang -Os -falign-functions -mstackrealign -msse2 -mfpmath=sse -I"C:/Program Files/OpenModelica1.17.0-64bit/include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=ModelicaADS_Examples_ExampleAdsLoop -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0 -c -o ModelicaADS.Examples.ExampleAdsLoop.o ModelicaADS.Examples.ExampleAdsLoop.c

clang -Os -falign-functions -mstackrealign -msse2 -mfpmath=sse -I"C:/Program Files/OpenModelica1.17.0-64bit/include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=ModelicaADS_Examples_ExampleAdsLoop -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0 -c -o ModelicaADS.Examples.ExampleAdsLoop_functions.o ModelicaADS.Examples.ExampleAdsLoop_functions.c

clang -Os -falign-functions -mstackrealign -msse2 -mfpmath=sse -I"C:/Program Files/OpenModelica1.17.0-64bit/include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=ModelicaADS_Examples_ExampleAdsLoop -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0 -c -o ModelicaADS.Examples.ExampleAdsLoop_records.o ModelicaADS.Examples.ExampleAdsLoop_records.c

clang -Os -falign-functions -mstackrealign -msse2 -mfpmath=sse -I"C:/Program Files/OpenModelica1.17.0-64bit/include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=ModelicaADS_Examples_ExampleAdsLoop -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0 -c -o ModelicaADS.Examples.ExampleAdsLoop_01exo.o ModelicaADS.Examples.ExampleAdsLoop_01exo.c

In file included from ModelicaADS.Examples.ExampleAdsLoop_functions.c:7:

./ModelicaADS.Examples.ExampleAdsLoop_includes.h:4:10: fatal error: 'AdsHeaderFile.h' file not found

#include "AdsHeaderFile.h"

^~~~~~~~~~~~~~~~~

1 error generated.

mingw32-make: *** [<builtin>: ModelicaADS.Examples.ExampleAdsLoop_functions.o] Error 1

mingw32-make: *** Waiting for unfinished jobs....

mingw32-make: Leaving directory 'C:/Users/jj241397/AppData/Local/Temp/OPENMO~1/OMEdit/MODELI~1.EXA'

Compilation process failed. Exited with code 2.

Re: modelicaADS

What ModelicaADS library version are you using?
Myself I got the latest master from here: https://github.com/TechnicalBuildingSystems/ModelicaADS

Re: modelicaADS

I download the library very recently so I guess it's the same as yours.
Do you see any reason for mine missing the path of this .h file?

Re: modelicaADS

Where did you put the library and how do you load it in OMEdit?

Re: modelicaADS

The ModelicaADS repertory is in C:\Users\jmjehanno\....\OpenModelica\ModelicaADS-master

In OMEdit, I've opened ModelicaADS/package.mo then ModelicaADS/Examples/package.mo
Finally ExampleAdsLoop.mo

Re: modelicaADS

Wait, you only need to open ModelicaADS/package.mo, then in the left hand side tree navigate to ModelicaADS/Examples/ExampleAdsLoop then double click on ExampleAdsLoop.

https://pasteboard.co/K5VTXSa.png

Re: modelicaADS

In OMEdit if you load the root package, ModelicaADS/pacakge.mo it loads the entire library, you don't need to load any subdirectories.

Re: modelicaADS

Thank you, it solved the error.
Till the next error which same as yours.

C:/Program Files/OpenModelica1.17.0-64bit/share/omc/scripts/Compile.bat ModelicaADS.Examples.ExampleAdsLoop gcc mingw64 parallel 4 0

PATH = "C:\PROGRA~1\OPENMO~1.0-6\tools\msys\mingw64\bin;C:\PROGRA~1\OPENMO~1.0-6\tools\msys\mingw64\bin\..\..\usr\bin;"

mingw32-make: Entering directory 'C:/Users/jj241397/AppData/Local/Temp/OPENMO~1/OMEdit/MODELI~1.EXA'

clang  -Os -falign-functions -mstackrealign -msse2 -mfpmath=sse     "-IC:/Users/jj241397/Documents/Cobomanip_2021/OpenModelica/ModelicaADS-master/ModelicaADS/Resources/Include" -I"C:/Program Files/OpenModelica1.17.0-64bit/include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=ModelicaADS_Examples_ExampleAdsLoop -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0  -c -o ModelicaADS.Examples.ExampleAdsLoop.o ModelicaADS.Examples.ExampleAdsLoop.c

clang  -Os -falign-functions -mstackrealign -msse2 -mfpmath=sse     "-IC:/Users/jj241397/Documents/Cobomanip_2021/OpenModelica/ModelicaADS-master/ModelicaADS/Resources/Include" -I"C:/Program Files/OpenModelica1.17.0-64bit/include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=ModelicaADS_Examples_ExampleAdsLoop -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0  -c -o ModelicaADS.Examples.ExampleAdsLoop_functions.o ModelicaADS.Examples.ExampleAdsLoop_functions.c

clang  -Os -falign-functions -mstackrealign -msse2 -mfpmath=sse     "-IC:/Users/jj241397/Documents/Cobomanip_2021/OpenModelica/ModelicaADS-master/ModelicaADS/Resources/Include" -I"C:/Program Files/OpenModelica1.17.0-64bit/include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=ModelicaADS_Examples_ExampleAdsLoop -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0  -c -o ModelicaADS.Examples.ExampleAdsLoop_records.o ModelicaADS.Examples.ExampleAdsLoop_records.c

clang  -Os -falign-functions -mstackrealign -msse2 -mfpmath=sse     "-IC:/Users/jj241397/Documents/Cobomanip_2021/OpenModelica/ModelicaADS-master/ModelicaADS/Resources/Include" -I"C:/Program Files/OpenModelica1.17.0-64bit/include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=ModelicaADS_Examples_ExampleAdsLoop -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0  -c -o ModelicaADS.Examples.ExampleAdsLoop_01exo.o ModelicaADS.Examples.ExampleAdsLoop_01exo.c

ModelicaADS.Examples.ExampleAdsLoop_functions.c:41:14: warning: implicit declaration of function 'funAdsConstructor' is invalid in C99 [-Wimplicit-function-declaration]

  _ans_ext = funAdsConstructor(_port_ext, _AmsNetID1_ext, _AmsNetID2_ext, _AmsNetID3_ext, _AmsNetID4_ext, _AmsNetID5_ext, _AmsNetID6_ext);

             ^

ModelicaADS.Examples.ExampleAdsLoop_functions.c:73:14: warning: implicit declaration of function 'funAdsDestructor' is invalid in C99 [-Wimplicit-function-declaration]

  _ans_ext = funAdsDestructor();

             ^

ModelicaADS.Examples.ExampleAdsLoop_functions.c:94:16: warning: implicit declaration of function 'funAdsReceiveReal' is invalid in C99 [-Wimplicit-function-declaration]

  _state_ext = funAdsReceiveReal(&_recvData_ext, MMC_STRINGDATA(_varName));

               ^

ModelicaADS.Examples.ExampleAdsLoop_functions.c:118:14: warning: implicit declaration of function 'funAdsSendReal' is invalid in C99 [-Wimplicit-function-declaration]

  _ans_ext = funAdsSendReal(_sendData_ext, MMC_STRINGDATA(_varName));

             ^

4 warnings generated.

clang  -Os -falign-functions -mstackrealign -msse2 -mfpmath=sse     "-IC:/Users/jj241397/Documents/Cobomanip_2021/OpenModelica/ModelicaADS-master/ModelicaADS/Resources/Include" -I"C:/Program Files/OpenModelica1.17.0-64bit/include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=ModelicaADS_Examples_ExampleAdsLoop -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0  -c -o ModelicaADS.Examples.ExampleAdsLoop_02nls.o ModelicaADS.Examples.ExampleAdsLoop_02nls.c

clang  -Os -falign-functions -mstackrealign -msse2 -mfpmath=sse     "-IC:/Users/jj241397/Documents/Cobomanip_2021/OpenModelica/ModelicaADS-master/ModelicaADS/Resources/Include" -I"C:/Program Files/OpenModelica1.17.0-64bit/include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=ModelicaADS_Examples_ExampleAdsLoop -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0  -c -o ModelicaADS.Examples.ExampleAdsLoop_03lsy.o ModelicaADS.Examples.ExampleAdsLoop_03lsy.c

clang  -Os -falign-functions -mstackrealign -msse2 -mfpmath=sse     "-IC:/Users/jj241397/Documents/Cobomanip_2021/OpenModelica/ModelicaADS-master/ModelicaADS/Resources/Include" -I"C:/Program Files/OpenModelica1.17.0-64bit/include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=ModelicaADS_Examples_ExampleAdsLoop -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0  -c -o ModelicaADS.Examples.ExampleAdsLoop_04set.o ModelicaADS.Examples.ExampleAdsLoop_04set.c

clang  -Os -falign-functions -mstackrealign -msse2 -mfpmath=sse     "-IC:/Users/jj241397/Documents/Cobomanip_2021/OpenModelica/ModelicaADS-master/ModelicaADS/Resources/Include" -I"C:/Program Files/OpenModelica1.17.0-64bit/include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=ModelicaADS_Examples_ExampleAdsLoop -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0  -c -o ModelicaADS.Examples.ExampleAdsLoop_05evt.o ModelicaADS.Examples.ExampleAdsLoop_05evt.c

clang  -Os -falign-functions -mstackrealign -msse2 -mfpmath=sse     "-IC:/Users/jj241397/Documents/Cobomanip_2021/OpenModelica/ModelicaADS-master/ModelicaADS/Resources/Include" -I"C:/Program Files/OpenModelica1.17.0-64bit/include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=ModelicaADS_Examples_ExampleAdsLoop -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0  -c -o ModelicaADS.Examples.ExampleAdsLoop_06inz.o ModelicaADS.Examples.ExampleAdsLoop_06inz.c

clang  -Os -falign-functions -mstackrealign -msse2 -mfpmath=sse     "-IC:/Users/jj241397/Documents/Cobomanip_2021/OpenModelica/ModelicaADS-master/ModelicaADS/Resources/Include" -I"C:/Program Files/OpenModelica1.17.0-64bit/include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=ModelicaADS_Examples_ExampleAdsLoop -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0  -c -o ModelicaADS.Examples.ExampleAdsLoop_07dly.o ModelicaADS.Examples.ExampleAdsLoop_07dly.c

clang  -Os -falign-functions -mstackrealign -msse2 -mfpmath=sse     "-IC:/Users/jj241397/Documents/Cobomanip_2021/OpenModelica/ModelicaADS-master/ModelicaADS/Resources/Include" -I"C:/Program Files/OpenModelica1.17.0-64bit/include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=ModelicaADS_Examples_ExampleAdsLoop -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0  -c -o ModelicaADS.Examples.ExampleAdsLoop_08bnd.o ModelicaADS.Examples.ExampleAdsLoop_08bnd.c

clang  -Os -falign-functions -mstackrealign -msse2 -mfpmath=sse     "-IC:/Users/jj241397/Documents/Cobomanip_2021/OpenModelica/ModelicaADS-master/ModelicaADS/Resources/Include" -I"C:/Program Files/OpenModelica1.17.0-64bit/include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=ModelicaADS_Examples_ExampleAdsLoop -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0  -c -o ModelicaADS.Examples.ExampleAdsLoop_09alg.o ModelicaADS.Examples.ExampleAdsLoop_09alg.c

clang  -Os -falign-functions -mstackrealign -msse2 -mfpmath=sse     "-IC:/Users/jj241397/Documents/Cobomanip_2021/OpenModelica/ModelicaADS-master/ModelicaADS/Resources/Include" -I"C:/Program Files/OpenModelica1.17.0-64bit/include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=ModelicaADS_Examples_ExampleAdsLoop -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0  -c -o ModelicaADS.Examples.ExampleAdsLoop_10asr.o ModelicaADS.Examples.ExampleAdsLoop_10asr.c

clang  -Os -falign-functions -mstackrealign -msse2 -mfpmath=sse     "-IC:/Users/jj241397/Documents/Cobomanip_2021/OpenModelica/ModelicaADS-master/ModelicaADS/Resources/Include" -I"C:/Program Files/OpenModelica1.17.0-64bit/include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=ModelicaADS_Examples_ExampleAdsLoop -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0  -c -o ModelicaADS.Examples.ExampleAdsLoop_11mix.o ModelicaADS.Examples.ExampleAdsLoop_11mix.c

clang  -Os -falign-functions -mstackrealign -msse2 -mfpmath=sse     "-IC:/Users/jj241397/Documents/Cobomanip_2021/OpenModelica/ModelicaADS-master/ModelicaADS/Resources/Include" -I"C:/Program Files/OpenModelica1.17.0-64bit/include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=ModelicaADS_Examples_ExampleAdsLoop -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0  -c -o ModelicaADS.Examples.ExampleAdsLoop_12jac.o ModelicaADS.Examples.ExampleAdsLoop_12jac.c

clang  -Os -falign-functions -mstackrealign -msse2 -mfpmath=sse     "-IC:/Users/jj241397/Documents/Cobomanip_2021/OpenModelica/ModelicaADS-master/ModelicaADS/Resources/Include" -I"C:/Program Files/OpenModelica1.17.0-64bit/include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=ModelicaADS_Examples_ExampleAdsLoop -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0  -c -o ModelicaADS.Examples.ExampleAdsLoop_13opt.o ModelicaADS.Examples.ExampleAdsLoop_13opt.c

clang  -Os -falign-functions -mstackrealign -msse2 -mfpmath=sse     "-IC:/Users/jj241397/Documents/Cobomanip_2021/OpenModelica/ModelicaADS-master/ModelicaADS/Resources/Include" -I"C:/Program Files/OpenModelica1.17.0-64bit/include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=ModelicaADS_Examples_ExampleAdsLoop -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0  -c -o ModelicaADS.Examples.ExampleAdsLoop_14lnz.o ModelicaADS.Examples.ExampleAdsLoop_14lnz.c

clang  -Os -falign-functions -mstackrealign -msse2 -mfpmath=sse     "-IC:/Users/jj241397/Documents/Cobomanip_2021/OpenModelica/ModelicaADS-master/ModelicaADS/Resources/Include" -I"C:/Program Files/OpenModelica1.17.0-64bit/include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=ModelicaADS_Examples_ExampleAdsLoop -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0  -c -o ModelicaADS.Examples.ExampleAdsLoop_15syn.o ModelicaADS.Examples.ExampleAdsLoop_15syn.c

clang  -Os -falign-functions -mstackrealign -msse2 -mfpmath=sse     "-IC:/Users/jj241397/Documents/Cobomanip_2021/OpenModelica/ModelicaADS-master/ModelicaADS/Resources/Include" -I"C:/Program Files/OpenModelica1.17.0-64bit/include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=ModelicaADS_Examples_ExampleAdsLoop -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0  -c -o ModelicaADS.Examples.ExampleAdsLoop_16dae.o ModelicaADS.Examples.ExampleAdsLoop_16dae.c

clang  -Os -falign-functions -mstackrealign -msse2 -mfpmath=sse     "-IC:/Users/jj241397/Documents/Cobomanip_2021/OpenModelica/ModelicaADS-master/ModelicaADS/Resources/Include" -I"C:/Program Files/OpenModelica1.17.0-64bit/include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=ModelicaADS_Examples_ExampleAdsLoop -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0  -c -o ModelicaADS.Examples.ExampleAdsLoop_17inl.o ModelicaADS.Examples.ExampleAdsLoop_17inl.c

clang -I. -o ModelicaADS.Examples.ExampleAdsLoop.exe ModelicaADS.Examples.ExampleAdsLoop.o ModelicaADS.Examples.ExampleAdsLoop_functions.o ModelicaADS.Examples.ExampleAdsLoop_records.o ModelicaADS.Examples.ExampleAdsLoop_01exo.o ModelicaADS.Examples.ExampleAdsLoop_02nls.o ModelicaADS.Examples.ExampleAdsLoop_03lsy.o ModelicaADS.Examples.ExampleAdsLoop_04set.o ModelicaADS.Examples.ExampleAdsLoop_05evt.o ModelicaADS.Examples.ExampleAdsLoop_06inz.o ModelicaADS.Examples.ExampleAdsLoop_07dly.o ModelicaADS.Examples.ExampleAdsLoop_08bnd.o ModelicaADS.Examples.ExampleAdsLoop_09alg.o ModelicaADS.Examples.ExampleAdsLoop_10asr.o ModelicaADS.Examples.ExampleAdsLoop_11mix.o ModelicaADS.Examples.ExampleAdsLoop_12jac.o ModelicaADS.Examples.ExampleAdsLoop_13opt.o ModelicaADS.Examples.ExampleAdsLoop_14lnz.o ModelicaADS.Examples.ExampleAdsLoop_15syn.o ModelicaADS.Examples.ExampleAdsLoop_16dae.o ModelicaADS.Examples.ExampleAdsLoop_17inl.o "-IC:/Users/jj241397/Documents/Cobomanip_2021/OpenModelica/ModelicaADS-master/ModelicaADS/Resources/Include" -I"C:/Program Files/OpenModelica1.17.0-64bit/include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=ModelicaADS_Examples_ExampleAdsLoop -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0 -L"C:/Users/jj241397/Documents/Cobomanip_2021/OpenModelica/ModelicaADS-master/ModelicaADS/Examples"  "-LC:/Program Files/OpenModelica1.17.0-64bit/lib//omc" "-LC:/Program Files/OpenModelica1.17.0-64bit/lib/" "-LC:/Users/jj241397/AppData/Roaming/.openmodelica/binaries/ModelicaADS" "-LC:/Users/jj241397/Documents/Cobomanip_2021/OpenModelica/ModelicaADS-master/ModelicaADS/Resources/Library/mingw64" "-LC:/Users/jj241397/Documents/Cobomanip_2021/OpenModelica/ModelicaADS-master/ModelicaADS/Resources/Library/win64" "-LC:/Users/jj241397/Documents/Cobomanip_2021/OpenModelica/ModelicaADS-master/ModelicaADS/Resources/Library" -lTcAdsDll "-LC:/Users/jj241397/AppData/Roaming/.openmodelica/binaries/Modelica" "-LC:/Program Files/OpenModelica1.17.0-64bit/lib/omlibrary/Modelica 3.2.3/Resources/Library/mingw64" "-LC:/Program Files/OpenModelica1.17.0-64bit/lib/omlibrary/Modelica 3.2.3/Resources/Library/win64" "-LC:/Program Files/OpenModelica1.17.0-64bit/lib/omlibrary/Modelica 3.2.3/Resources/Library" -lModelicaExternalC  -Os -falign-functions -mstackrealign -msse2 -mfpmath=sse     "-IC:/Users/jj241397/Documents/Cobomanip_2021/OpenModelica/ModelicaADS-master/ModelicaADS/Resources/Include" -I"C:/Program Files/OpenModelica1.17.0-64bit/include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=ModelicaADS_Examples_ExampleAdsLoop -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0 -L"C:/Program Files/OpenModelica1.17.0-64bit/lib//omc" -L"C:/Program Files/OpenModelica1.17.0-64bit/lib" -Wl,--stack,16777216,-rpath,"C:/Program Files/OpenModelica1.17.0-64bit/lib//omc" -Wl,-rpath,"C:/Program Files/OpenModelica1.17.0-64bit/lib"  -fopenmp -Wl,-Bstatic -lregex -ltre -lintl -liconv -lexpat -lomcgc -lpthread -loleaut32 -limagehlp -lhdf5 -lz -lszip -Wl,-Bdynamic -Wl,-Bdynamic -lSimulationRuntimeC -Wl,-Bdynamic -Wl,-Bdynamic -lomcgc -lregex -ltre -lintl -liconv -lexpat -static-libgcc -luuid -loleaut32 -lole32 -limagehlp -lws2_32 -llis -lsundials_nvecserial -lsundials_sunmatrixdense -lsundials_sunmatrixsparse -lsundials_sunlinsoldense -lsundials_sunlinsolklu -lsundials_sunlinsollapackdense -lsundials_sunlinsolspbcgs -lsundials_sunlinsolspfgmr -lsundials_sunlinsolspgmr -lsundials_sunlinsolsptfqmr -lsundials_sunnonlinsolnewton -lsundials_cvode -lsundials_cvodes -lsundials_idas -lsundials_kinsol -lumfpack -lklu -lcolamd -lbtf -lamd -lsuitesparseconfig -lipopt -lcoinmumps -lpthread -lm  -lgfortran -lquadmath -lmingw32 -lgcc_eh -lmoldname -lmingwex  -luser32 -lkernel32 -ladvapi32 -lshell32 -lopenblas -lcminpack -Wl,-Bdynamic -lwsock32 -lstdc++

C:\PROGRA~1\OPENMO~1.0-6\tools\msys\mingw64\bin\ld: cannot find -lTcAdsDll

clang: error: linker command failed with exit code 1 (use -v to see invocation)

mingw32-make: *** [ModelicaADS.Examples.ExampleAdsLoop.makefile:37: omc_main_target] Error 1

mingw32-make: Leaving directory 'C:/Users/jj241397/AppData/Local/Temp/OPENMO~1/OMEdit/MODELI~1.EXA'

Compilation process failed. Exited with code 2.

Re: modelicaADS

Hopefully you know how to install the software that has TcAdsDll.dll because I don't.
Seems to be part of some commercial software:
https://infosys.beckhoff.com/english.ph … tm&id=

Re: modelicaADS

That error is because ModelicaADS only comes with that library for 32-bit Windows: https://github.com/TechnicalBuildingSys … rary/win32

Re: modelicaADS

@sjoelund yes and no, that .lib file only list the functions in the dll, is not a static library. If you have the DLL you should be able to compile the code.

Re: modelicaADS

You'd still need to find a 64-bit DLL, right?

Re: modelicaADS

I guess so too. The Beckhoff software is already installed on my PC.
I guess I need to modify the code to adress the right lib.

Re: modelicaADS

You just need to put the 64bit TcAdsDll.dll in ModelicaADS\Resources\Library\win64
and OpenModelica will find it. If you have only the 32bit dll, you will need to install the
32bit OpenModelica and put the 32bit TcAdsDll.dll in ModelicaADS\Resources\Library\win32.

Note that you will need to add it to the PATH too as the generated
executable will need to find it. (This is a bug in OpenModelica, the
tool should automatically add it to the PATH).

Re: modelicaADS

Thank you.
Can you elaborate on adding this PATH to the code?

Re: modelicaADS

No to the code, to your user environment PATH variable. Say the directory of the DLL is:
C:\path\to\dll, edit your PATH variable and add this at the end: WhatWasThereAlready;C:\path\to\dll;

Windows 10
- In Search, search for and then select: System (Control Panel)
- Click the Advanced system settings link.
- Click Environment Variables. In the section System Variables find the PATH environment variable and select it. Click Edit.
- In the Edit System Variable window, specify the value of the PATH environment variable. Click OK. Close all remaining windows by clicking OK.

Re: modelicaADS

Ok thank you a lot.

We're getting closer.

I've edited the Path variable with the path of the ...\ModelicaADS-master\ModelicaADS\Resources\Library\win64

This is the error message now:

C:/Program Files/OpenModelica1.17.0-64bit/share/omc/scripts/Compile.bat ModelicaADS.Examples.ExampleAdsLoop gcc mingw64 parallel 4 0
PATH = "C:\PROGRA~1\OPENMO~1.0-6\tools\msys\mingw64\bin;C:\PROGRA~1\OPENMO~1.0-6\tools\msys\mingw64\bin\..\..\usr\bin;"
mingw32-make: Entering directory 'C:/Users/jj241397/AppData/Local/Temp/OPENMO~1/OMEdit/MODELI~1.EXA'
clang  -Os -falign-functions -mstackrealign -msse2 -mfpmath=sse     "-IC:/Users/jj241397/Documents/Cobomanip_2021/OpenModelica/ModelicaADS-master/ModelicaADS/Resources/Include" -I"C:/Program Files/OpenModelica1.17.0-64bit/include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=ModelicaADS_Examples_ExampleAdsLoop -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0  -c -o ModelicaADS.Examples.ExampleAdsLoop.o ModelicaADS.Examples.ExampleAdsLoop.c
clang  -Os -falign-functions -mstackrealign -msse2 -mfpmath=sse     "-IC:/Users/jj241397/Documents/Cobomanip_2021/OpenModelica/ModelicaADS-master/ModelicaADS/Resources/Include" -I"C:/Program Files/OpenModelica1.17.0-64bit/include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=ModelicaADS_Examples_ExampleAdsLoop -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0  -c -o ModelicaADS.Examples.ExampleAdsLoop_functions.o ModelicaADS.Examples.ExampleAdsLoop_functions.c
clang  -Os -falign-functions -mstackrealign -msse2 -mfpmath=sse     "-IC:/Users/jj241397/Documents/Cobomanip_2021/OpenModelica/ModelicaADS-master/ModelicaADS/Resources/Include" -I"C:/Program Files/OpenModelica1.17.0-64bit/include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=ModelicaADS_Examples_ExampleAdsLoop -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0  -c -o ModelicaADS.Examples.ExampleAdsLoop_records.o ModelicaADS.Examples.ExampleAdsLoop_records.c
clang  -Os -falign-functions -mstackrealign -msse2 -mfpmath=sse     "-IC:/Users/jj241397/Documents/Cobomanip_2021/OpenModelica/ModelicaADS-master/ModelicaADS/Resources/Include" -I"C:/Program Files/OpenModelica1.17.0-64bit/include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=ModelicaADS_Examples_ExampleAdsLoop -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0  -c -o ModelicaADS.Examples.ExampleAdsLoop_01exo.o ModelicaADS.Examples.ExampleAdsLoop_01exo.c
ModelicaADS.Examples.ExampleAdsLoop_functions.c:41:14: warning: implicit declaration of function 'funAdsConstructor' is invalid in C99 [-Wimplicit-function-declaration]
  _ans_ext = funAdsConstructor(_port_ext, _AmsNetID1_ext, _AmsNetID2_ext, _AmsNetID3_ext, _AmsNetID4_ext, _AmsNetID5_ext, _AmsNetID6_ext);
             ^
ModelicaADS.Examples.ExampleAdsLoop_functions.c:73:14: warning: implicit declaration of function 'funAdsDestructor' is invalid in C99 [-Wimplicit-function-declaration]
  _ans_ext = funAdsDestructor();
             ^
ModelicaADS.Examples.ExampleAdsLoop_functions.c:94:16: warning: implicit declaration of function 'funAdsReceiveReal' is invalid in C99 [-Wimplicit-function-declaration]
  _state_ext = funAdsReceiveReal(&_recvData_ext, MMC_STRINGDATA(_varName));
               ^
ModelicaADS.Examples.ExampleAdsLoop_functions.c:118:14: warning: implicit declaration of function 'funAdsSendReal' is invalid in C99 [-Wimplicit-function-declaration]
  _ans_ext = funAdsSendReal(_sendData_ext, MMC_STRINGDATA(_varName));
             ^
4 warnings generated.
clang  -Os -falign-functions -mstackrealign -msse2 -mfpmath=sse     "-IC:/Users/jj241397/Documents/Cobomanip_2021/OpenModelica/ModelicaADS-master/ModelicaADS/Resources/Include" -I"C:/Program Files/OpenModelica1.17.0-64bit/include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=ModelicaADS_Examples_ExampleAdsLoop -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0  -c -o ModelicaADS.Examples.ExampleAdsLoop_02nls.o ModelicaADS.Examples.ExampleAdsLoop_02nls.c
clang  -Os -falign-functions -mstackrealign -msse2 -mfpmath=sse     "-IC:/Users/jj241397/Documents/Cobomanip_2021/OpenModelica/ModelicaADS-master/ModelicaADS/Resources/Include" -I"C:/Program Files/OpenModelica1.17.0-64bit/include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=ModelicaADS_Examples_ExampleAdsLoop -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0  -c -o ModelicaADS.Examples.ExampleAdsLoop_03lsy.o ModelicaADS.Examples.ExampleAdsLoop_03lsy.c
clang  -Os -falign-functions -mstackrealign -msse2 -mfpmath=sse     "-IC:/Users/jj241397/Documents/Cobomanip_2021/OpenModelica/ModelicaADS-master/ModelicaADS/Resources/Include" -I"C:/Program Files/OpenModelica1.17.0-64bit/include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=ModelicaADS_Examples_ExampleAdsLoop -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0  -c -o ModelicaADS.Examples.ExampleAdsLoop_04set.o ModelicaADS.Examples.ExampleAdsLoop_04set.c
clang  -Os -falign-functions -mstackrealign -msse2 -mfpmath=sse     "-IC:/Users/jj241397/Documents/Cobomanip_2021/OpenModelica/ModelicaADS-master/ModelicaADS/Resources/Include" -I"C:/Program Files/OpenModelica1.17.0-64bit/include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=ModelicaADS_Examples_ExampleAdsLoop -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0  -c -o ModelicaADS.Examples.ExampleAdsLoop_05evt.o ModelicaADS.Examples.ExampleAdsLoop_05evt.c
clang  -Os -falign-functions -mstackrealign -msse2 -mfpmath=sse     "-IC:/Users/jj241397/Documents/Cobomanip_2021/OpenModelica/ModelicaADS-master/ModelicaADS/Resources/Include" -I"C:/Program Files/OpenModelica1.17.0-64bit/include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=ModelicaADS_Examples_ExampleAdsLoop -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0  -c -o ModelicaADS.Examples.ExampleAdsLoop_06inz.o ModelicaADS.Examples.ExampleAdsLoop_06inz.c
clang  -Os -falign-functions -mstackrealign -msse2 -mfpmath=sse     "-IC:/Users/jj241397/Documents/Cobomanip_2021/OpenModelica/ModelicaADS-master/ModelicaADS/Resources/Include" -I"C:/Program Files/OpenModelica1.17.0-64bit/include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=ModelicaADS_Examples_ExampleAdsLoop -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0  -c -o ModelicaADS.Examples.ExampleAdsLoop_07dly.o ModelicaADS.Examples.ExampleAdsLoop_07dly.c
clang  -Os -falign-functions -mstackrealign -msse2 -mfpmath=sse     "-IC:/Users/jj241397/Documents/Cobomanip_2021/OpenModelica/ModelicaADS-master/ModelicaADS/Resources/Include" -I"C:/Program Files/OpenModelica1.17.0-64bit/include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=ModelicaADS_Examples_ExampleAdsLoop -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0  -c -o ModelicaADS.Examples.ExampleAdsLoop_08bnd.o ModelicaADS.Examples.ExampleAdsLoop_08bnd.c
clang  -Os -falign-functions -mstackrealign -msse2 -mfpmath=sse     "-IC:/Users/jj241397/Documents/Cobomanip_2021/OpenModelica/ModelicaADS-master/ModelicaADS/Resources/Include" -I"C:/Program Files/OpenModelica1.17.0-64bit/include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=ModelicaADS_Examples_ExampleAdsLoop -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0  -c -o ModelicaADS.Examples.ExampleAdsLoop_09alg.o ModelicaADS.Examples.ExampleAdsLoop_09alg.c
clang  -Os -falign-functions -mstackrealign -msse2 -mfpmath=sse     "-IC:/Users/jj241397/Documents/Cobomanip_2021/OpenModelica/ModelicaADS-master/ModelicaADS/Resources/Include" -I"C:/Program Files/OpenModelica1.17.0-64bit/include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=ModelicaADS_Examples_ExampleAdsLoop -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0  -c -o ModelicaADS.Examples.ExampleAdsLoop_10asr.o ModelicaADS.Examples.ExampleAdsLoop_10asr.c
clang  -Os -falign-functions -mstackrealign -msse2 -mfpmath=sse     "-IC:/Users/jj241397/Documents/Cobomanip_2021/OpenModelica/ModelicaADS-master/ModelicaADS/Resources/Include" -I"C:/Program Files/OpenModelica1.17.0-64bit/include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=ModelicaADS_Examples_ExampleAdsLoop -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0  -c -o ModelicaADS.Examples.ExampleAdsLoop_11mix.o ModelicaADS.Examples.ExampleAdsLoop_11mix.c
clang  -Os -falign-functions -mstackrealign -msse2 -mfpmath=sse     "-IC:/Users/jj241397/Documents/Cobomanip_2021/OpenModelica/ModelicaADS-master/ModelicaADS/Resources/Include" -I"C:/Program Files/OpenModelica1.17.0-64bit/include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=ModelicaADS_Examples_ExampleAdsLoop -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0  -c -o ModelicaADS.Examples.ExampleAdsLoop_12jac.o ModelicaADS.Examples.ExampleAdsLoop_12jac.c
clang  -Os -falign-functions -mstackrealign -msse2 -mfpmath=sse     "-IC:/Users/jj241397/Documents/Cobomanip_2021/OpenModelica/ModelicaADS-master/ModelicaADS/Resources/Include" -I"C:/Program Files/OpenModelica1.17.0-64bit/include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=ModelicaADS_Examples_ExampleAdsLoop -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0  -c -o ModelicaADS.Examples.ExampleAdsLoop_13opt.o ModelicaADS.Examples.ExampleAdsLoop_13opt.c
clang  -Os -falign-functions -mstackrealign -msse2 -mfpmath=sse     "-IC:/Users/jj241397/Documents/Cobomanip_2021/OpenModelica/ModelicaADS-master/ModelicaADS/Resources/Include" -I"C:/Program Files/OpenModelica1.17.0-64bit/include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=ModelicaADS_Examples_ExampleAdsLoop -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0  -c -o ModelicaADS.Examples.ExampleAdsLoop_14lnz.o ModelicaADS.Examples.ExampleAdsLoop_14lnz.c
clang  -Os -falign-functions -mstackrealign -msse2 -mfpmath=sse     "-IC:/Users/jj241397/Documents/Cobomanip_2021/OpenModelica/ModelicaADS-master/ModelicaADS/Resources/Include" -I"C:/Program Files/OpenModelica1.17.0-64bit/include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=ModelicaADS_Examples_ExampleAdsLoop -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0  -c -o ModelicaADS.Examples.ExampleAdsLoop_15syn.o ModelicaADS.Examples.ExampleAdsLoop_15syn.c
clang  -Os -falign-functions -mstackrealign -msse2 -mfpmath=sse     "-IC:/Users/jj241397/Documents/Cobomanip_2021/OpenModelica/ModelicaADS-master/ModelicaADS/Resources/Include" -I"C:/Program Files/OpenModelica1.17.0-64bit/include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=ModelicaADS_Examples_ExampleAdsLoop -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0  -c -o ModelicaADS.Examples.ExampleAdsLoop_16dae.o ModelicaADS.Examples.ExampleAdsLoop_16dae.c
clang  -Os -falign-functions -mstackrealign -msse2 -mfpmath=sse     "-IC:/Users/jj241397/Documents/Cobomanip_2021/OpenModelica/ModelicaADS-master/ModelicaADS/Resources/Include" -I"C:/Program Files/OpenModelica1.17.0-64bit/include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=ModelicaADS_Examples_ExampleAdsLoop -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0  -c -o ModelicaADS.Examples.ExampleAdsLoop_17inl.o ModelicaADS.Examples.ExampleAdsLoop_17inl.c
clang -I. -o ModelicaADS.Examples.ExampleAdsLoop.exe ModelicaADS.Examples.ExampleAdsLoop.o ModelicaADS.Examples.ExampleAdsLoop_functions.o ModelicaADS.Examples.ExampleAdsLoop_records.o ModelicaADS.Examples.ExampleAdsLoop_01exo.o ModelicaADS.Examples.ExampleAdsLoop_02nls.o ModelicaADS.Examples.ExampleAdsLoop_03lsy.o ModelicaADS.Examples.ExampleAdsLoop_04set.o ModelicaADS.Examples.ExampleAdsLoop_05evt.o ModelicaADS.Examples.ExampleAdsLoop_06inz.o ModelicaADS.Examples.ExampleAdsLoop_07dly.o ModelicaADS.Examples.ExampleAdsLoop_08bnd.o ModelicaADS.Examples.ExampleAdsLoop_09alg.o ModelicaADS.Examples.ExampleAdsLoop_10asr.o ModelicaADS.Examples.ExampleAdsLoop_11mix.o ModelicaADS.Examples.ExampleAdsLoop_12jac.o ModelicaADS.Examples.ExampleAdsLoop_13opt.o ModelicaADS.Examples.ExampleAdsLoop_14lnz.o ModelicaADS.Examples.ExampleAdsLoop_15syn.o ModelicaADS.Examples.ExampleAdsLoop_16dae.o ModelicaADS.Examples.ExampleAdsLoop_17inl.o "-IC:/Users/jj241397/Documents/Cobomanip_2021/OpenModelica/ModelicaADS-master/ModelicaADS/Resources/Include" -I"C:/Program Files/OpenModelica1.17.0-64bit/include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=ModelicaADS_Examples_ExampleAdsLoop -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0 -L"C:/Users/jj241397/Documents/Cobomanip_2021/OpenModelica/ModelicaADS-master/ModelicaADS/Examples"  "-LC:/Program Files/OpenModelica1.17.0-64bit/lib//omc" "-LC:/Program Files/OpenModelica1.17.0-64bit/lib/" "-LC:/Users/jj241397/AppData/Roaming/.openmodelica/binaries/ModelicaADS" "-LC:/Users/jj241397/Documents/Cobomanip_2021/OpenModelica/ModelicaADS-master/ModelicaADS/Resources/Library/mingw64" "-LC:/Users/jj241397/Documents/Cobomanip_2021/OpenModelica/ModelicaADS-master/ModelicaADS/Resources/Library/win64" "-LC:/Users/jj241397/Documents/Cobomanip_2021/OpenModelica/ModelicaADS-master/ModelicaADS/Resources/Library" -lTcAdsDll "-LC:/Users/jj241397/AppData/Roaming/.openmodelica/binaries/Modelica" "-LC:/Program Files/OpenModelica1.17.0-64bit/lib/omlibrary/Modelica 3.2.3/Resources/Library/mingw64" "-LC:/Program Files/OpenModelica1.17.0-64bit/lib/omlibrary/Modelica 3.2.3/Resources/Library/win64" "-LC:/Program Files/OpenModelica1.17.0-64bit/lib/omlibrary/Modelica 3.2.3/Resources/Library" -lModelicaExternalC  -Os -falign-functions -mstackrealign -msse2 -mfpmath=sse     "-IC:/Users/jj241397/Documents/Cobomanip_2021/OpenModelica/ModelicaADS-master/ModelicaADS/Resources/Include" -I"C:/Program Files/OpenModelica1.17.0-64bit/include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=ModelicaADS_Examples_ExampleAdsLoop -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0 -L"C:/Program Files/OpenModelica1.17.0-64bit/lib//omc" -L"C:/Program Files/OpenModelica1.17.0-64bit/lib" -Wl,--stack,16777216,-rpath,"C:/Program Files/OpenModelica1.17.0-64bit/lib//omc" -Wl,-rpath,"C:/Program Files/OpenModelica1.17.0-64bit/lib"  -fopenmp -Wl,-Bstatic -lregex -ltre -lintl -liconv -lexpat -lomcgc -lpthread -loleaut32 -limagehlp -lhdf5 -lz -lszip -Wl,-Bdynamic -Wl,-Bdynamic -lSimulationRuntimeC -Wl,-Bdynamic -Wl,-Bdynamic -lomcgc -lregex -ltre -lintl -liconv -lexpat -static-libgcc -luuid -loleaut32 -lole32 -limagehlp -lws2_32 -llis -lsundials_nvecserial -lsundials_sunmatrixdense -lsundials_sunmatrixsparse -lsundials_sunlinsoldense -lsundials_sunlinsolklu -lsundials_sunlinsollapackdense -lsundials_sunlinsolspbcgs -lsundials_sunlinsolspfgmr -lsundials_sunlinsolspgmr -lsundials_sunlinsolsptfqmr -lsundials_sunnonlinsolnewton -lsundials_cvode -lsundials_cvodes -lsundials_idas -lsundials_kinsol -lumfpack -lklu -lcolamd -lbtf -lamd -lsuitesparseconfig -lipopt -lcoinmumps -lpthread -lm  -lgfortran -lquadmath -lmingw32 -lgcc_eh -lmoldname -lmingwex  -luser32 -lkernel32 -ladvapi32 -lshell32 -lopenblas -lcminpack -Wl,-Bdynamic -lwsock32 -lstdc++
C:\PROGRA~1\OPENMO~1.0-6\tools\msys\mingw64\bin\ld: skipping incompatible C:/Users/jj241397/Documents/Cobomanip_2021/OpenModelica/ModelicaADS-master/ModelicaADS/Resources/Library/win64/TcAdsDll.dll when searching for -lTcAdsDll
C:\PROGRA~1\OPENMO~1.0-6\tools\msys\mingw64\bin\ld: skipping incompatible C:/Users/jj241397/Documents/Cobomanip_2021/OpenModelica/ModelicaADS-master/ModelicaADS/Resources/Library/win64/TcAdsDll.dll when searching for -lTcAdsDll
C:\PROGRA~1\OPENMO~1.0-6\tools\msys\mingw64\bin\ld: cannot find -lTcAdsDll
C:\PROGRA~1\OPENMO~1.0-6\tools\msys\mingw64\bin\ld: skipping incompatible C:/Users/jj241397/Documents/Cobomanip_2021/OpenModelica/ModelicaADS-master/ModelicaADS/Resources/Library/win64/TcAdsDll.dll when searching for -lTcAdsDll
clang: error: linker command failed with exit code 1 (use -v to see invocation)
mingw32-make: *** [ModelicaADS.Examples.ExampleAdsLoop.makefile:37: omc_main_target] Error 1
mingw32-make: Leaving directory 'C:/Users/jj241397/AppData/Local/Temp/OPENMO~1/OMEdit/MODELI~1.EXA'
Compilation process failed. Exited with code 2.

Re: modelicaADS

If it says skipping incompatible it probably means the dll is a 32-bit dll and you need a 64-bit version (or installing 32-bit OpenModelica instead).

Edited by: sjoelund.se - Jun-11-21 10:12:31

Re: modelicaADS

Concerning the environment variable PATH, this is what I get with the echo command:

Z:\>echo %PATH%
C:\TwinCAT\Common64;C:\TwinCAT\Common32;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\SafeNet\Authentication\SAC\x64;C:\Program Files\SafeNet\Authentication\SAC\x32;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit\;C:\Program Files\PuTTY\;C:\Program Files\dotnet\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn\;C:\Program Files (x86)\dotnet\;C:\Users\jj241397\AppData\Local\Microsoft\WindowsApps;

Seems like there's nothing OpenModelica here.

This is how I set  for the PATH varibale in  advanced system parameters:

%USERPROFILE%\Documents\Cobomanip_2021\OpenModelica\ModelicaADS-master\ModelicaADS\Resources\Library\win64;

Is it correct?
Why does nothing appear with the echo commande?

Re: modelicaADS

I also tried with OpenModelica 32bits.

This is the error message I get :
C:/Program Files (x86)/OpenModelica1.17.0-32bit/share/omc/scripts/Compile.bat ModelicaADS.Examples.ExampleAdsLoop gcc mingw32 parallel 4 0
PATH = "C:\PROGRA~2\OPENMO~1.0-3\tools\msys\mingw32\bin;C:\PROGRA~2\OPENMO~1.0-3\tools\msys\mingw32\bin\..\..\usr\bin;"
mingw32-make: Entering directory 'C:/Users/jj241397/AppData/Local/Temp/OPENMO~1/OMEdit/MODELI~1.EXA'
clang  -Os -falign-functions -mstackrealign -msse2 -mfpmath=sse     "-IC:/Users/jj241397/Documents/Cobomanip_2021/OpenModelica/ModelicaADS-master/ModelicaADS/Resources/Include" -I"C:/Program Files (x86)/OpenModelica1.17.0-32bit/include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=ModelicaADS_Examples_ExampleAdsLoop -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0  -c -o ModelicaADS.Examples.ExampleAdsLoop.o ModelicaADS.Examples.ExampleAdsLoop.c
clang  -Os -falign-functions -mstackrealign -msse2 -mfpmath=sse     "-IC:/Users/jj241397/Documents/Cobomanip_2021/OpenModelica/ModelicaADS-master/ModelicaADS/Resources/Include" -I"C:/Program Files (x86)/OpenModelica1.17.0-32bit/include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=ModelicaADS_Examples_ExampleAdsLoop -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0  -c -o ModelicaADS.Examples.ExampleAdsLoop_functions.o ModelicaADS.Examples.ExampleAdsLoop_functions.c
clang  -Os -falign-functions -mstackrealign -msse2 -mfpmath=sse     "-IC:/Users/jj241397/Documents/Cobomanip_2021/OpenModelica/ModelicaADS-master/ModelicaADS/Resources/Include" -I"C:/Program Files (x86)/OpenModelica1.17.0-32bit/include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=ModelicaADS_Examples_ExampleAdsLoop -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0  -c -o ModelicaADS.Examples.ExampleAdsLoop_records.o ModelicaADS.Examples.ExampleAdsLoop_records.c
clang  -Os -falign-functions -mstackrealign -msse2 -mfpmath=sse     "-IC:/Users/jj241397/Documents/Cobomanip_2021/OpenModelica/ModelicaADS-master/ModelicaADS/Resources/Include" -I"C:/Program Files (x86)/OpenModelica1.17.0-32bit/include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=ModelicaADS_Examples_ExampleAdsLoop -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0  -c -o ModelicaADS.Examples.ExampleAdsLoop_01exo.o ModelicaADS.Examples.ExampleAdsLoop_01exo.c
ModelicaADS.Examples.ExampleAdsLoop_functions.c:41:14: warning: implicit declaration of function 'funAdsConstructor' is invalid in C99 [-Wimplicit-function-declaration]
  _ans_ext = funAdsConstructor(_port_ext, _AmsNetID1_ext, _AmsNetID2_ext, _AmsNetID3_ext, _AmsNetID4_ext, _AmsNetID5_ext, _AmsNetID6_ext);
             ^
ModelicaADS.Examples.ExampleAdsLoop_functions.c:73:14: warning: implicit declaration of function 'funAdsDestructor' is invalid in C99 [-Wimplicit-function-declaration]
  _ans_ext = funAdsDestructor();
             ^
ModelicaADS.Examples.ExampleAdsLoop_functions.c:94:16: warning: implicit declaration of function 'funAdsReceiveReal' is invalid in C99 [-Wimplicit-function-declaration]
  _state_ext = funAdsReceiveReal(&_recvData_ext, MMC_STRINGDATA(_varName));
               ^
ModelicaADS.Examples.ExampleAdsLoop_functions.c:118:14: warning: implicit declaration of function 'funAdsSendReal' is invalid in C99 [-Wimplicit-function-declaration]
  _ans_ext = funAdsSendReal(_sendData_ext, MMC_STRINGDATA(_varName));
             ^
clang  -Os -falign-functions -mstackrealign -msse2 -mfpmath=sse     "-IC:/Users/jj241397/Documents/Cobomanip_2021/OpenModelica/ModelicaADS-master/ModelicaADS/Resources/Include" -I"C:/Program Files (x86)/OpenModelica1.17.0-32bit/include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=ModelicaADS_Examples_ExampleAdsLoop -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0  -c -o ModelicaADS.Examples.ExampleAdsLoop_02nls.o ModelicaADS.Examples.ExampleAdsLoop_02nls.c
4 warnings generated.
clang  -Os -falign-functions -mstackrealign -msse2 -mfpmath=sse     "-IC:/Users/jj241397/Documents/Cobomanip_2021/OpenModelica/ModelicaADS-master/ModelicaADS/Resources/Include" -I"C:/Program Files (x86)/OpenModelica1.17.0-32bit/include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=ModelicaADS_Examples_ExampleAdsLoop -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0  -c -o ModelicaADS.Examples.ExampleAdsLoop_03lsy.o ModelicaADS.Examples.ExampleAdsLoop_03lsy.c
clang  -Os -falign-functions -mstackrealign -msse2 -mfpmath=sse     "-IC:/Users/jj241397/Documents/Cobomanip_2021/OpenModelica/ModelicaADS-master/ModelicaADS/Resources/Include" -I"C:/Program Files (x86)/OpenModelica1.17.0-32bit/include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=ModelicaADS_Examples_ExampleAdsLoop -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0  -c -o ModelicaADS.Examples.ExampleAdsLoop_04set.o ModelicaADS.Examples.ExampleAdsLoop_04set.c
clang  -Os -falign-functions -mstackrealign -msse2 -mfpmath=sse     "-IC:/Users/jj241397/Documents/Cobomanip_2021/OpenModelica/ModelicaADS-master/ModelicaADS/Resources/Include" -I"C:/Program Files (x86)/OpenModelica1.17.0-32bit/include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=ModelicaADS_Examples_ExampleAdsLoop -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0  -c -o ModelicaADS.Examples.ExampleAdsLoop_05evt.o ModelicaADS.Examples.ExampleAdsLoop_05evt.c
clang  -Os -falign-functions -mstackrealign -msse2 -mfpmath=sse     "-IC:/Users/jj241397/Documents/Cobomanip_2021/OpenModelica/ModelicaADS-master/ModelicaADS/Resources/Include" -I"C:/Program Files (x86)/OpenModelica1.17.0-32bit/include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=ModelicaADS_Examples_ExampleAdsLoop -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0  -c -o ModelicaADS.Examples.ExampleAdsLoop_06inz.o ModelicaADS.Examples.ExampleAdsLoop_06inz.c
clang  -Os -falign-functions -mstackrealign -msse2 -mfpmath=sse     "-IC:/Users/jj241397/Documents/Cobomanip_2021/OpenModelica/ModelicaADS-master/ModelicaADS/Resources/Include" -I"C:/Program Files (x86)/OpenModelica1.17.0-32bit/include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=ModelicaADS_Examples_ExampleAdsLoop -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0  -c -o ModelicaADS.Examples.ExampleAdsLoop_07dly.o ModelicaADS.Examples.ExampleAdsLoop_07dly.c
clang  -Os -falign-functions -mstackrealign -msse2 -mfpmath=sse     "-IC:/Users/jj241397/Documents/Cobomanip_2021/OpenModelica/ModelicaADS-master/ModelicaADS/Resources/Include" -I"C:/Program Files (x86)/OpenModelica1.17.0-32bit/include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=ModelicaADS_Examples_ExampleAdsLoop -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0  -c -o ModelicaADS.Examples.ExampleAdsLoop_08bnd.o ModelicaADS.Examples.ExampleAdsLoop_08bnd.c
clang  -Os -falign-functions -mstackrealign -msse2 -mfpmath=sse     "-IC:/Users/jj241397/Documents/Cobomanip_2021/OpenModelica/ModelicaADS-master/ModelicaADS/Resources/Include" -I"C:/Program Files (x86)/OpenModelica1.17.0-32bit/include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=ModelicaADS_Examples_ExampleAdsLoop -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0  -c -o ModelicaADS.Examples.ExampleAdsLoop_09alg.o ModelicaADS.Examples.ExampleAdsLoop_09alg.c
clang  -Os -falign-functions -mstackrealign -msse2 -mfpmath=sse     "-IC:/Users/jj241397/Documents/Cobomanip_2021/OpenModelica/ModelicaADS-master/ModelicaADS/Resources/Include" -I"C:/Program Files (x86)/OpenModelica1.17.0-32bit/include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=ModelicaADS_Examples_ExampleAdsLoop -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0  -c -o ModelicaADS.Examples.ExampleAdsLoop_10asr.o ModelicaADS.Examples.ExampleAdsLoop_10asr.c
clang  -Os -falign-functions -mstackrealign -msse2 -mfpmath=sse     "-IC:/Users/jj241397/Documents/Cobomanip_2021/OpenModelica/ModelicaADS-master/ModelicaADS/Resources/Include" -I"C:/Program Files (x86)/OpenModelica1.17.0-32bit/include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=ModelicaADS_Examples_ExampleAdsLoop -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0  -c -o ModelicaADS.Examples.ExampleAdsLoop_11mix.o ModelicaADS.Examples.ExampleAdsLoop_11mix.c
clang  -Os -falign-functions -mstackrealign -msse2 -mfpmath=sse     "-IC:/Users/jj241397/Documents/Cobomanip_2021/OpenModelica/ModelicaADS-master/ModelicaADS/Resources/Include" -I"C:/Program Files (x86)/OpenModelica1.17.0-32bit/include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=ModelicaADS_Examples_ExampleAdsLoop -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0  -c -o ModelicaADS.Examples.ExampleAdsLoop_12jac.o ModelicaADS.Examples.ExampleAdsLoop_12jac.c
clang  -Os -falign-functions -mstackrealign -msse2 -mfpmath=sse     "-IC:/Users/jj241397/Documents/Cobomanip_2021/OpenModelica/ModelicaADS-master/ModelicaADS/Resources/Include" -I"C:/Program Files (x86)/OpenModelica1.17.0-32bit/include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=ModelicaADS_Examples_ExampleAdsLoop -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0  -c -o ModelicaADS.Examples.ExampleAdsLoop_13opt.o ModelicaADS.Examples.ExampleAdsLoop_13opt.c
clang  -Os -falign-functions -mstackrealign -msse2 -mfpmath=sse     "-IC:/Users/jj241397/Documents/Cobomanip_2021/OpenModelica/ModelicaADS-master/ModelicaADS/Resources/Include" -I"C:/Program Files (x86)/OpenModelica1.17.0-32bit/include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=ModelicaADS_Examples_ExampleAdsLoop -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0  -c -o ModelicaADS.Examples.ExampleAdsLoop_14lnz.o ModelicaADS.Examples.ExampleAdsLoop_14lnz.c
clang  -Os -falign-functions -mstackrealign -msse2 -mfpmath=sse     "-IC:/Users/jj241397/Documents/Cobomanip_2021/OpenModelica/ModelicaADS-master/ModelicaADS/Resources/Include" -I"C:/Program Files (x86)/OpenModelica1.17.0-32bit/include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=ModelicaADS_Examples_ExampleAdsLoop -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0  -c -o ModelicaADS.Examples.ExampleAdsLoop_15syn.o ModelicaADS.Examples.ExampleAdsLoop_15syn.c
clang  -Os -falign-functions -mstackrealign -msse2 -mfpmath=sse     "-IC:/Users/jj241397/Documents/Cobomanip_2021/OpenModelica/ModelicaADS-master/ModelicaADS/Resources/Include" -I"C:/Program Files (x86)/OpenModelica1.17.0-32bit/include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=ModelicaADS_Examples_ExampleAdsLoop -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0  -c -o ModelicaADS.Examples.ExampleAdsLoop_16dae.o ModelicaADS.Examples.ExampleAdsLoop_16dae.c
clang  -Os -falign-functions -mstackrealign -msse2 -mfpmath=sse     "-IC:/Users/jj241397/Documents/Cobomanip_2021/OpenModelica/ModelicaADS-master/ModelicaADS/Resources/Include" -I"C:/Program Files (x86)/OpenModelica1.17.0-32bit/include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=ModelicaADS_Examples_ExampleAdsLoop -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0  -c -o ModelicaADS.Examples.ExampleAdsLoop_17inl.o ModelicaADS.Examples.ExampleAdsLoop_17inl.c
clang -I. -o ModelicaADS.Examples.ExampleAdsLoop.exe ModelicaADS.Examples.ExampleAdsLoop.o ModelicaADS.Examples.ExampleAdsLoop_functions.o ModelicaADS.Examples.ExampleAdsLoop_records.o ModelicaADS.Examples.ExampleAdsLoop_01exo.o ModelicaADS.Examples.ExampleAdsLoop_02nls.o ModelicaADS.Examples.ExampleAdsLoop_03lsy.o ModelicaADS.Examples.ExampleAdsLoop_04set.o ModelicaADS.Examples.ExampleAdsLoop_05evt.o ModelicaADS.Examples.ExampleAdsLoop_06inz.o ModelicaADS.Examples.ExampleAdsLoop_07dly.o ModelicaADS.Examples.ExampleAdsLoop_08bnd.o ModelicaADS.Examples.ExampleAdsLoop_09alg.o ModelicaADS.Examples.ExampleAdsLoop_10asr.o ModelicaADS.Examples.ExampleAdsLoop_11mix.o ModelicaADS.Examples.ExampleAdsLoop_12jac.o ModelicaADS.Examples.ExampleAdsLoop_13opt.o ModelicaADS.Examples.ExampleAdsLoop_14lnz.o ModelicaADS.Examples.ExampleAdsLoop_15syn.o ModelicaADS.Examples.ExampleAdsLoop_16dae.o ModelicaADS.Examples.ExampleAdsLoop_17inl.o "-IC:/Users/jj241397/Documents/Cobomanip_2021/OpenModelica/ModelicaADS-master/ModelicaADS/Resources/Include" -I"C:/Program Files (x86)/OpenModelica1.17.0-32bit/include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=ModelicaADS_Examples_ExampleAdsLoop -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0 -L"C:/Users/jj241397/Documents/Cobomanip_2021/OpenModelica/ModelicaADS-master/ModelicaADS/Examples"  "-LC:/Program Files (x86)/OpenModelica1.17.0-32bit/lib//omc" "-LC:/Program Files (x86)/OpenModelica1.17.0-32bit/lib/" "-LC:/Users/jj241397/AppData/Roaming/.openmodelica/binaries/ModelicaADS" "-LC:/Users/jj241397/Documents/Cobomanip_2021/OpenModelica/ModelicaADS-master/ModelicaADS/Resources/Library/mingw32" "-LC:/Users/jj241397/Documents/Cobomanip_2021/OpenModelica/ModelicaADS-master/ModelicaADS/Resources/Library/win32" "-LC:/Users/jj241397/Documents/Cobomanip_2021/OpenModelica/ModelicaADS-master/ModelicaADS/Resources/Library" -lTcAdsDll "-LC:/Users/jj241397/AppData/Roaming/.openmodelica/binaries/Modelica" "-LC:/Program Files (x86)/OpenModelica1.17.0-32bit/lib/omlibrary/Modelica 3.2.3/Resources/Library/mingw32" "-LC:/Program Files (x86)/OpenModelica1.17.0-32bit/lib/omlibrary/Modelica 3.2.3/Resources/Library/win32" "-LC:/Program Files (x86)/OpenModelica1.17.0-32bit/lib/omlibrary/Modelica 3.2.3/Resources/Library" -lModelicaExternalC  -Os -falign-functions -mstackrealign -msse2 -mfpmath=sse     "-IC:/Users/jj241397/Documents/Cobomanip_2021/OpenModelica/ModelicaADS-master/ModelicaADS/Resources/Include" -I"C:/Program Files (x86)/OpenModelica1.17.0-32bit/include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=ModelicaADS_Examples_ExampleAdsLoop -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0 -L"C:/Program Files (x86)/OpenModelica1.17.0-32bit/lib//omc" -L"C:/Program Files (x86)/OpenModelica1.17.0-32bit/lib" -Wl,--stack,16777216,-rpath,"C:/Program Files (x86)/OpenModelica1.17.0-32bit/lib//omc" -Wl,-rpath,"C:/Program Files (x86)/OpenModelica1.17.0-32bit/lib"  -fopenmp -Wl,-Bstatic -lregex -ltre -lintl -liconv -lexpat -lomcgc -lpthread -loleaut32 -limagehlp -lhdf5 -lz -lszip -Wl,-Bdynamic -Wl,-Bdynamic -lSimulationRuntimeC -Wl,-Bdynamic -Wl,-Bdynamic -lomcgc -lregex -ltre -lintl -liconv -lexpat -static-libgcc -luuid -loleaut32 -lole32 -limagehlp -lws2_32 -llis -lsundials_nvecserial -lsundials_sunmatrixdense -lsundials_sunmatrixsparse -lsundials_sunlinsoldense -lsundials_sunlinsolklu -lsundials_sunlinsollapackdense -lsundials_sunlinsolspbcgs -lsundials_sunlinsolspfgmr -lsundials_sunlinsolspgmr -lsundials_sunlinsolsptfqmr -lsundials_sunnonlinsolnewton -lsundials_cvode -lsundials_cvodes -lsundials_idas -lsundials_kinsol -lumfpack -lklu -lcolamd -lbtf -lamd -lsuitesparseconfig -lipopt -lcoinmumps -lpthread -lm  -lgfortran -lquadmath -lmingw32 -lgcc_eh -lmoldname -lmingwex  -luser32 -lkernel32 -ladvapi32 -lshell32 -lopenblas -lcminpack -Wl,-Bdynamic -lwsock32 -lstdc++
C:\PROGRA~2\OPENMO~1.0-3\tools\msys\mingw32\bin\ld: ModelicaADS.Examples.ExampleAdsLoop_functions.o:ModelicaADS.Exampl:(.text+0x38): undefined reference to `funAdsConstructor'
C:\PROGRA~2\OPENMO~1.0-3\tools\msys\mingw32\bin\ld: ModelicaADS.Examples.ExampleAdsLoop_functions.o:ModelicaADS.Exampl:(.text+0x7e): undefined reference to `funAdsConstructor'
C:\PROGRA~2\OPENMO~1.0-3\tools\msys\mingw32\bin\ld: ModelicaADS.Examples.ExampleAdsLoop_functions.o:ModelicaADS.Exampl:(.text+0x96): undefined reference to `funAdsDestructor'
C:\PROGRA~2\OPENMO~1.0-3\tools\msys\mingw32\bin\ld: ModelicaADS.Examples.ExampleAdsLoop_functions.o:ModelicaADS.Exampl:(.text+0xa5): undefined reference to `funAdsDestructor'
C:\PROGRA~2\OPENMO~1.0-3\tools\msys\mingw32\bin\ld: ModelicaADS.Examples.ExampleAdsLoop_functions.o:ModelicaADS.Exampl:(.text+0xc8): undefined reference to `funAdsReceiveReal'
C:\PROGRA~2\OPENMO~1.0-3\tools\msys\mingw32\bin\ld: ModelicaADS.Examples.ExampleAdsLoop_functions.o:ModelicaADS.Exampl:(.text+0x107): undefined reference to `funAdsReceiveReal'
C:\PROGRA~2\OPENMO~1.0-3\tools\msys\mingw32\bin\ld: ModelicaADS.Examples.ExampleAdsLoop_functions.o:ModelicaADS.Exampl:(.text+0x147): undefined reference to `funAdsSendReal'
C:\PROGRA~2\OPENMO~1.0-3\tools\msys\mingw32\bin\ld: ModelicaADS.Examples.ExampleAdsLoop_functions.o:ModelicaADS.Exampl:(.text+0x164): undefined reference to `funAdsSendReal'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
mingw32-make: *** [ModelicaADS.Examples.ExampleAdsLoop.makefile:37: omc_main_target] Error 1
mingw32-make: Leaving directory 'C:/Users/jj241397/AppData/Local/Temp/OPENMO~1/OMEdit/MODELI~1.EXA'
Compilation process failed. Exited with code 2.

Re: modelicaADS

In the AdsHeaderFile.h you have an ifdef

Code:


#if defined(_MSC_VER)

you need to change that to:

Code:


#if defined(_MSC_VER) || defined(__MINGW32__)

because we compile with GCC (__MINGW32__) and not with Visual Studio (_MSC_VER).


There are 0 guests and 0 other users also viewing this topic