Errors with Visual Studio (LNK2001)

32 views
Skip to first unread message

Saana Hautala

unread,
Sep 8, 2021, 9:02:50 AM9/8/21
to Cantera Users' Group
Hello,

I have recently installed Cantera 2.5 and the aim is to use it with Visual Studio 2017.

I used the cmake-gui and I've checked that the paths to the source code and where to build the binaries should be ok.
I also checked the CMakeList, that include_directories and link_directories use the "/" is used (instead of "\" since that seemed to generate some problems).

However, I have came across some issues when building the .sln files in Visual Studio.
I tried to use this "demo.cpp" --> "demo.sln" to see if I would be able to run it.
However, it gave similar errors as the original code I tried to use (error: LNK2001).
I have checked the configuration setting with my colleague, who has been able build in Visual Studio wihtout errors, so those should be ok.
I have attached a snip of the error list in Visual Studio.

Any suggestions what I could try, are warmly welcomed.
Also if addiditonal information is needed, please let me know.


Best regards,
Saana Hautala
LNK2001.JPG

Ray Speth

unread,
Sep 8, 2021, 9:46:56 AM9/8/21
to Cantera Users' Group
Hi Saana,

Googling the error message "unresolved external symbol __CxxFrameHandler4" turns up some other cases that suggest this has something to do with getting multiple versions of Visual Studio mixed together. For example, https://stackoverflow.com/questions/65672356/what-is-cxxframehandler4-and-what-does-linker-error-unresolved-external-symbo and https://github.com/microsoft/vcpkg/issues/15999.

Perhaps some of the other information and proposed solutions in those threads will be of use to you.

Regards,
Ray

Saana Hautala

unread,
Sep 10, 2021, 9:01:23 AM9/10/21
to Cantera Users' Group
Hi Ray,

Thank you for the hint!
I think this can actually be the reason for my problems, that I want to use the VS2017  but I have also  VS2019 installed.

Unfortunately, since I'm really new with these software and how to work with these, I have not been able to locate, where I should insert the information suggested in these example cases (picture attached)?


Best regards,
Saana Hautala
example_solution.JPG
Reply all
Reply to author
Forward
0 new messages