we're working on our term project and are using mathlink.
we've been wondering why there was always this annoying linker fatal error: "MLTemplate.obj : error LNK2019: unresolved external symbol _testfunc referenced in function __tr0
test.exe : fatal error LNK1120: 1 unresolved externals"
This is what we've entered in the command prompt from VS 5:
SET CL=/nologo /c /DWIN32 /D_WINDOWS /W3 /O2 /DNDEBUG
SET LINK=/NOLOGO /SUBSYSTEM:windows /INCREMENTAL:no /PDB:NONE kernel32.lib user32.lib gdi32.lib
mprep MLTemplate.tm -o MLTemplate.c
cl MathLink.cpp MLTemplate.c
link MathLink.obj MLTemplate.obj ml32i3m.lib /out:test.exe
although we've found the root of this problem (use .c and not .cpp) we like to know if there still is a way to use .cpp-Files? Do we have to include another .lib-File in the last command (link ...)?
thanks for you help in advance!
regards, chris & pat