daily pastebin goal
31%
SHARE
TWEET

Untitled

a guest Jan 22nd, 2019 54 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include "mathlink.h"
  2. extern int addtwo( int i, int j);
  3.  
  4. int addtwo( int i, int j)
  5. {
  6.     return i+j;
  7. }
  8.  
  9. #if WINDOWS_MATHLINK
  10.  
  11. #if __BORLANDC__
  12. #pragma argsused
  13. #endif
  14.  
  15. int PASCAL WinMain( HINSTANCE hinstCurrent, HINSTANCE hinstPrevious, LPSTR lpszCmdLine, int nCmdShow)
  16. {
  17. char  buff[512];
  18. char FAR * buff_start = buff;
  19. char FAR * argv[32];
  20. char FAR * FAR * argv_end = argv + 32;
  21.  
  22. hinstPrevious = hinstPrevious; /* suppress warning */
  23.  
  24. if( !MLInitializeIcon( hinstCurrent, nCmdShow)) return 1;
  25. MLScanString( argv, &argv_end, &lpszCmdLine, &buff_start);
  26. return MLMain( (int)(argv_end - argv), argv);
  27. }
  28.  
  29. #else
  30.  
  31. int main(int argc, char* argv[])
  32. {
  33. return MLMain(argc, argv);
  34. }
  35.  
  36. #endif
  37.    
  38. 1>------ Build started: Project: addtwo, Configuration: Debug Win32 ------
  39. 1>  Performing Custom Build Tools
  40. 1>  on "C:Program Files (x86)Microsoft Visual Studio 10.0VCVCbinmprep.exe" "" -o "D:ApplicationsMathematicaSystemFilesLinksMathLinkDeveloperKitWindowsMathLinkExamplesaddtwoaddtwo..addtwotm.c"
  41. 1>addtwo.obj : error LNK2019: unresolved external symbol _MLMain referenced in function _WinMain@16
  42. 1>addtwo.obj : error LNK2019: unresolved external symbol _MLInitializeIcon referenced in function _WinMain@16
  43. 1>D:ApplicationsMathematicaSystemFilesLinksMathLinkDeveloperKitWindowsMathLinkExamplesaddtwoDebugaddtwo.exe : fatal error LNK1120: 2 unresolved externals
  44. ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top