Group Abstract Group Abstract

Message Boards Message Boards

1
|
9.7K Views
|
6 Replies
|
1 Total Like
View groups...
Share
Share this post:

Why can't I get the most basic WSTP demo (addtwo.c) to build and link?

Posted 11 years ago
POSTED BY: Michael Stern
6 Replies
Posted 9 years ago

Reporting back a year later -- Among the problems here, (1) the project should never have been build as a console app; WSTP programs should be built as Win32 apps, and (2) I was including all sorts of libraries that I didn't need. Only wstp32i4.lib was needed. I have created a number of useful WSTP since.

POSTED BY: Michael Stern

Interesting, I just followed the same procedure in VS 2013 and both the Win32 and x64 addtwo.exe ran fine. Maybe clicking on the 'Debug' button would yield some clue?

POSTED BY: Ilian Gachevski
Posted 11 years ago

I don't think that's it; I have copies of the DLLs in the binary directory. Without them, the binary won't run when double-clicked upon but with them, it runs then crashes. The behavior from within Mathematica seems to mirror the behavior with the DLL in place, so it looks like the system is seeing the DLL.

POSTED BY: Michael Stern
POSTED BY: Ilian Gachevski
Posted 11 years ago
POSTED BY: Michael Stern

Try changing line 25 of addtwo.c

 #if WINDOWS_MATHLINK

to

 #if 0
POSTED BY: Ilian Gachevski
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard