Vensim DSS compilation error
-
- Junior Member
- Posts: 5
- Joined: Mon Feb 25, 2013 1:19 pm
- Vensim version: PLE
Vensim DSS compilation error
Hello Friends,
I am using vensim DSS 5.7a for simulation. when i try to compile the model file i find the following error- LINK:fatal error LNK1104: file 'kerne132.lib' can not be opened.
Error while linking sim.dll -make sure compiled simulations were properly installed.'
If any one has similar experience and have found solution please help me in finding the solution.
Thanks in advance for your help.
Best Regards
Subhash Mallah
I am using vensim DSS 5.7a for simulation. when i try to compile the model file i find the following error- LINK:fatal error LNK1104: file 'kerne132.lib' can not be opened.
Error while linking sim.dll -make sure compiled simulations were properly installed.'
If any one has similar experience and have found solution please help me in finding the solution.
Thanks in advance for your help.
Best Regards
Subhash Mallah
Re: Vensim DSS compilation error
This may be a matter of 32 vs 64 bit system file locations. You probably need to check the paths for the calls to the compiler & includes in your mdl.bat.
An upgrade to the current version of Vensim would almost surely solve your problem. 5.7 is six years old and predates Win7.
An upgrade to the current version of Vensim would almost surely solve your problem. 5.7 is six years old and predates Win7.
/*
Advice to posters (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Blog: http://blog.metasd.com
Model library: http://models.metasd.com
Bookmarks: http://delicious.com/tomfid/SystemDynamics
*/
Advice to posters (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Blog: http://blog.metasd.com
Model library: http://models.metasd.com
Bookmarks: http://delicious.com/tomfid/SystemDynamics
*/
-
- Junior Member
- Posts: 5
- Joined: Mon Feb 25, 2013 1:19 pm
- Vensim version: PLE
Re: Vensim DSS compilation error
i installed the latest version vensim 6.0a but it was not able to even open the file. one of the colleague work before with 5.7a and he suggested me to use this version. can you please give details how can i check the path for the calls to the compiler. i am using the 32bit system.i have the following mdl.bat file:
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
REM Fast compiling, slow execution (compilation is instant)
rem CL /c /Ot /I "%2" /DWIN32 mdl.c
REM Slow compiling, fast execution (compiling takes > 15 minutes)
CL /c /O2 /G7 /Ot /I "%2" /DWIN32 mdl.c
REM ------------------------------------------------------------------------
Rem Compile Vensim Simulation Control Extensions
CL /c /O2 /Fo%1simext.obj %1simext.c
goto aftercomp
:noinclude
CL /O2 /c /DWIN32 mdl.c
:aftercomp
if errorlevel 1 goto :error1
if not exist mdl.obj goto :error2
LINK /DLL /OUT:sim.dll/NODEFAULTLIB:kernel32.lib/def:%1sim.def mdl.obj %1simext.obj %1vensim.lib
if errorlevel 1 goto :error3
if not exist sim.dll goto :error3
REM
REM The following line will create a simdll32.dll file for use with
REM the full Vensim DLL
REM LINK /DLL /OUT:simdll32.dll /def:%1sim.def mdl.obj %1simext.obj %1..\dll\vendll32.lib
REM if errorlevel 1 goto :error4
REM if not exist simdll32.dll goto :error4
REM
REM The following line will create a simdlx32.dll file for use with
REM the redistributable Vensim DLL
REM LINK /DLL /OUT:simdlx32.dll /def:%1sim.def mdl.obj %1simext.obj %1..\dll\vendlx32.lib
REM if errorlevel 1 goto :error5
REM if not exist simdlx32.dll goto :error4
REM
del sim.lib
del sim.exp
goto :exit
:error1
echo There were errors while compiling - check the paths in mdl.bat in vensim\comp
goto exit2
:error2
echo Unable to compile. You probably need to set paths in mdl.bat in vensim\comp
goto exit2
:error3
echo Errors while linking sim.dll - make sure compiled simulations were properly installed
goto :exit2
:error4
echo Errors linking for use with the full dll - check that ..\dll is the right directory
goto :exit2
:error5
echo Errors linkinf for use with the redistribution DLL - check that ..\dll is the right directory
goto :exit2
:exit2
pause
goto :exit3
:exit
echo ----------
echo Compilation of sim.dll seems to have been successful.
echo Close this window and continue.
:exit3
rem del sim.dll
rem pause
-----------------------------------------------------------------------------------------------------------------------------------------------------------------
please help me to find the solution.
Thanks
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
REM Fast compiling, slow execution (compilation is instant)
rem CL /c /Ot /I "%2" /DWIN32 mdl.c
REM Slow compiling, fast execution (compiling takes > 15 minutes)
CL /c /O2 /G7 /Ot /I "%2" /DWIN32 mdl.c
REM ------------------------------------------------------------------------
Rem Compile Vensim Simulation Control Extensions
CL /c /O2 /Fo%1simext.obj %1simext.c
goto aftercomp
:noinclude
CL /O2 /c /DWIN32 mdl.c
:aftercomp
if errorlevel 1 goto :error1
if not exist mdl.obj goto :error2
LINK /DLL /OUT:sim.dll/NODEFAULTLIB:kernel32.lib/def:%1sim.def mdl.obj %1simext.obj %1vensim.lib
if errorlevel 1 goto :error3
if not exist sim.dll goto :error3
REM
REM The following line will create a simdll32.dll file for use with
REM the full Vensim DLL
REM LINK /DLL /OUT:simdll32.dll /def:%1sim.def mdl.obj %1simext.obj %1..\dll\vendll32.lib
REM if errorlevel 1 goto :error4
REM if not exist simdll32.dll goto :error4
REM
REM The following line will create a simdlx32.dll file for use with
REM the redistributable Vensim DLL
REM LINK /DLL /OUT:simdlx32.dll /def:%1sim.def mdl.obj %1simext.obj %1..\dll\vendlx32.lib
REM if errorlevel 1 goto :error5
REM if not exist simdlx32.dll goto :error4
REM
del sim.lib
del sim.exp
goto :exit
:error1
echo There were errors while compiling - check the paths in mdl.bat in vensim\comp
goto exit2
:error2
echo Unable to compile. You probably need to set paths in mdl.bat in vensim\comp
goto exit2
:error3
echo Errors while linking sim.dll - make sure compiled simulations were properly installed
goto :exit2
:error4
echo Errors linking for use with the full dll - check that ..\dll is the right directory
goto :exit2
:error5
echo Errors linkinf for use with the redistribution DLL - check that ..\dll is the right directory
goto :exit2
:exit2
pause
goto :exit3
:exit
echo ----------
echo Compilation of sim.dll seems to have been successful.
echo Close this window and continue.
:exit3
rem del sim.dll
rem pause
-----------------------------------------------------------------------------------------------------------------------------------------------------------------
please help me to find the solution.
Thanks
Re: Vensim DSS compilation error
What file could not be opened? The Vensim file format has not changed, and version 6 is fully backward compatible with 5.x. If the model is the issue, you could try using .mdl format, though there shouldn't be any problem with .vmf.
The problem with the 5.7 mdl.bat is likely from the link step,
Windows paths have changed, so you need to figure out where kernel32.lib actually is and either add it to your system path, set paths in mdl.bat, or use an absolute path in the LINK statement. One way to set paths is to call the MS script vcvars.bat - for MSVC2010 in Vensim 6, that's done with
Even then, you may have other issues, particularly if you're using a compiler newer than MSVC6. Therefore getting this working in Vensim 6 seems like a better option.
The problem with the 5.7 mdl.bat is likely from the link step,
Code: Select all
LINK /DLL /OUT:sim.dll/NODEFAULTLIB:kernel32.lib/def:%1sim.def mdl.obj %1simext.obj %1vensim.lib
Code: Select all
REM The following should work for VS 2010 and 32 bit Windows
REM call "C:\Program Files\Microsoft Visual Studio 10.0\VC\bin\vcvars32.bat"
REM
REM The following should work for VS 2010 and 64 bit Windows
call "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\vcvars32.bat"
/*
Advice to posters (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Blog: http://blog.metasd.com
Model library: http://models.metasd.com
Bookmarks: http://delicious.com/tomfid/SystemDynamics
*/
Advice to posters (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Blog: http://blog.metasd.com
Model library: http://models.metasd.com
Bookmarks: http://delicious.com/tomfid/SystemDynamics
*/
-
- Super Administrator
- Posts: 4590
- Joined: Wed Mar 05, 2003 3:10 am
Re: Vensim DSS compilation error
Try following the instructions in the attached document. They've worked for quite a few people so hopefully will get things working for you.
- Attachments
-
- To compile models.doc
- (63.5 KiB) Downloaded 269 times
Advice to posters seeking help (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Units are important!
http://www.bbc.co.uk/news/magazine-27509559
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Units are important!
http://www.bbc.co.uk/news/magazine-27509559
-
- Junior Member
- Posts: 5
- Joined: Mon Feb 25, 2013 1:19 pm
- Vensim version: PLE
Vensim DSS error
Dear Friends,
I am using Vensim DSS 6.1c on 64 bit computer and find the errors even start the Vensim "External Function version mismatch need version 51050(got 400)". when i click OK then vensim screen appear. But when i try to compile the program it gives error. Before, i was working with Vensim DSS 5.7a on 32 bit computer and the same program compiled and working good. Please help me to locate the problem and resolve the error issue.
Thanks in advance for your prompt reply.
I am using Vensim DSS 6.1c on 64 bit computer and find the errors even start the Vensim "External Function version mismatch need version 51050(got 400)". when i click OK then vensim screen appear. But when i try to compile the program it gives error. Before, i was working with Vensim DSS 5.7a on 32 bit computer and the same program compiled and working good. Please help me to locate the problem and resolve the error issue.
Thanks in advance for your prompt reply.
-
- Super Administrator
- Posts: 4590
- Joined: Wed Mar 05, 2003 3:10 am
Re: Vensim DSS compilation error
You will need to recompile the external function library so it is compatible with Vensim 6. Do you have the source code and the means to rebuild it?
Advice to posters seeking help (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Units are important!
http://www.bbc.co.uk/news/magazine-27509559
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Units are important!
http://www.bbc.co.uk/news/magazine-27509559
-
- Junior Member
- Posts: 5
- Joined: Mon Feb 25, 2013 1:19 pm
- Vensim version: PLE
Re: Vensim DSS compilation error
Hello Admin,
I have the source code but i don't know how can i rebuilt to compile it. what do you mean by recompile? how can i proceed ? please help me step wise procedure.
Thanks
I have the source code but i don't know how can i rebuilt to compile it. what do you mean by recompile? how can i proceed ? please help me step wise procedure.
Thanks
-
- Super Administrator
- Posts: 4590
- Joined: Wed Mar 05, 2003 3:10 am
Re: Vensim DSS compilation error
I cannot really give you a step by step procedure. Building DLLs is not simple. If you have no experience of this, you will need to get help from someone.
What does the external function library do, and where did you get it?
What does the external function library do, and where did you get it?
Advice to posters seeking help (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Units are important!
http://www.bbc.co.uk/news/magazine-27509559
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Units are important!
http://www.bbc.co.uk/news/magazine-27509559
Re: Vensim DSS compilation error
A humble suggestion: 5.7 is very old. There have been three operating system versions, six major Vensim versions, and several Visual Studio versions since then. If you need speed, and you're going to invest the effort to update the external functions, a maintenance update might be a good idea first.
/*
Advice to posters (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Blog: http://blog.metasd.com
Model library: http://models.metasd.com
Bookmarks: http://delicious.com/tomfid/SystemDynamics
*/
Advice to posters (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Blog: http://blog.metasd.com
Model library: http://models.metasd.com
Bookmarks: http://delicious.com/tomfid/SystemDynamics
*/