Discussion Closed This discussion was created more than 6 months ago and has been closed. To start a new discussion with a link back to this one, click here.

How to compile external model coded by C language through Visual Studio 2017?

Please login with a confirmed email address before reporting spam

Dear all:

The User's Guide said "Start Visual Studio 2017>Visual Studio Tools>VC>x64 Native Tools Command Prompt for VS 2017 from the Windows Start menu. " However, I didn't find the corresponding buttons in Visual Studio 2017. Does anyone have experience to deal with the compilation issues?

Thank you for your help.

Yu

-------------------
Yu Zhang

2 Replies Last Post Jan 4, 2019, 9:26 a.m. EST
Gunnar Andersson COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 6 years ago Jan 4, 2019, 2:11 a.m. EST

It sounds as if you try to start the x64 Native Tools Command Prompt for VS 2017 from within Visual Studio 2017. You should instead start it from the start menu - see the attached image.

It sounds as if you try to start the x64 Native Tools Command Prompt for VS 2017 from within Visual Studio 2017. You should instead start it from the start menu - see the attached image.


Please login with a confirmed email address before reporting spam

Posted: 6 years ago Jan 4, 2019, 9:26 a.m. EST

Hi, Gunnar Andersson:

I found it! Thank you so much for your valuble reply.

However, I encountered a confusion when trying to compile a self-defined model which contains the utility functions. In the users' Guide, the third step is to input "link /OUT:ext.dll /DLL ext.obj
C:\Program Files\COMSOL\COMSOL54\Multiphysics\data\extmat\win64\csextutils.lib"

into the command line. I found the .dll file has already created after only inputing the first line in the quote above. So I am wondering what is functionality of the file path in the second line. Is it correct if we neglect it? And should I input contents in the quote in one line or two lines?

Thank you so much for your time and help.

Yu

-------------------
Yu Zhang
Hi, Gunnar Andersson: I found it! Thank you so much for your valuble reply. However, I encountered a confusion when trying to compile a self-defined model which contains the utility functions. In the users' Guide, the third step is to input "link /OUT:ext.dll /DLL ext.obj C:\Program Files\COMSOL\COMSOL54\Multiphysics\data\extmat\win64\csextutils.lib" into the command line. I found the .dll file has already created after only inputing the first line in the quote above. So I am wondering what is functionality of the file path in the second line. Is it correct if we neglect it? And should I input contents in the quote in one line or two lines? Thank you so much for your time and help. Yu

Note that while COMSOL employees may participate in the discussion forum, COMSOL® software users who are on-subscription should submit their questions via the Support Center for a more comprehensive response from the Technical Support team.