Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: '.c and .cpp Files treated differently by' topicStudent Support Forum > General > ".c and .cpp Files treated differently by"

Next Comment >Help | Reply To Topic
Author Comment/Response
Chris
09/26/07 08:28am

hey

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


URL: ,

Subject (listing for '.c and .cpp Files treated differently by')
Author Date Posted
.c and .cpp Files treated differently by Chris 09/26/07 08:28am
Re: .c and .cpp Files treated differently by Marcel 06/22/09 07:57am
Next Comment >Help | Reply To Topic