Page 1 of 1

Vensim DLL problem (unresolved external symbol __endthreadex

Posted: Thu Jun 23, 2005 10:39 pm
by ram
Hi Everybody,

I wrote a sample code in C++ to load a model and run it using vensim DLL. I am getting an error which is as follows.

c:\program files\vensim\dll\msvc60\test\tet.cpp(23) : warning C4700: local variable 'val' used without having been initialized
Linking...
nafxcwd.lib(thrdcore.obj) : error LNK2001: unresolved external symbol __endthreadex
nafxcwd.lib(thrdcore.obj) : error LNK2001: unresolved external symbol __beginthreadex
Debug/test.exe : fatal error LNK1120: 2 unresolved externals
Error executing link.exe.

Could anybody please help me figure out what is wrong and how I can fix it?

Thank you.
-Ram.

[Edited on 6-23-2005 by ram]

Posted: Fri Jun 24, 2005 1:22 am
by bob@vensim.com
Hi Ram,

This has nothing to do with Vensim. It sounds like the compiler settings are inconsistent. If you are not using Microsoft Foundation Class you should start a new project that is an Empty windows Application. If you are using Microsoft Foundation Class one of the settings is wrong. Try linking as a static library to see if it works.

Posted: Thu Jun 30, 2005 3:17 am
by ram
Mr. Bob,

Thank you very much for your feedback. I figured out what I was doing wrong.

Thanks once again.

With best regards,
-Ram.