Using CMake to generate CrashRpt.sin to compile with VS 2015
238 views
Skip to first unread message
eha...@hardin-soft.com
unread,
Jun 24, 2016, 5:02:43 PM6/24/16
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Crashrpt
I used the CrashRpt1403 CMakeLists.txt generate a CrashRpt.sin which I then opened with Visual Studio 2015.
Project is set to x64 Release
In the Solution Explorer I right-clicked on ALL_BUILD and and clicked on Build. I get 12 succeeded, 5 failed
The problem is that no lib\x64\CrashRpt.lib is being built (CrashRptProbe1403.lib is, however)
That accounted for 4 of the errors. The final error and possibly the main culprit is
Error Element <Optimization> has an invalid value of "MinSize". CrashRpt C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets 253
Has anyone tried to recompile for VS 2015 as 64-bit?
Ed
eha...@hardin-soft.com
unread,
Jun 25, 2016, 10:53:37 AM6/25/16
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Crashrpt
Reply by original poster:
I found the problem. Selecting the CrashRpt project in the Solution Explorer and opening the Project Properties -> C/C++ section -> Optimization section I saw that Optimiation was set to MinSize. Dropping down the box of choices I saw that MinSize was not a valid choice but Minimize Size (/01) was so I set it to that and ran the Build again. This time I was successful.
Ed
eha...@hardin-soft.com
unread,
Jun 25, 2016, 2:41:03 PM6/25/16
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Crashrpt
Continued by original poster.
I've hit a brick wall. After compiling the CrashRpt.sin project successfully I now can't get my own project to build.
I had originally had all of this working with Visual Studio 2010. I'm now bringing by project over to VS 2015 and this is where I am having problems.
If I do everything as I did in VS 2010 (and according to the CrashRpt docs) I get 21 Errors starting with LNK2001 unresolved external symbol crAddFile2A...then crAddFile2W...and down the line
If I add the CrashRpt.cpp to my Source Files I get 72 Errors all the same but referring to different lines in Utilities.h, CrashHandler.h and others C2872 'CString': ambiguous symbol (apparently referring to each and every place CString is used in CrashRpt)
If I exclude the CrashRpt.cpp from the build I am back to the 21 LNK2001 errors.
Has anyone tried to use CrashRpt in Visual Studio 2015? Would anyone have any idea of how to eliminate the LNK2001 errors?
To produce a Win10 app I apparently need to compile in VS 2015 so that is what I am working on.
Ed
eha...@hardin-soft.com
unread,
Jun 26, 2016, 1:45:46 PM6/26/16
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Crashrpt
PPS to this post.
To the top of the CrashRpt.def file I added the line
LIBRARY CrashRpt
I then rebuilt the CrashRpt.sin and and then went back into my project and rebuilt and, voila, all of the LNK2001 unresolved external symbol crAddFile2A... errors relating to the CrashRpt.def file are gone.
I am now only left with a single LNK2001 unresolved external symbol HtmlHelpW error to solve which has to do with my projects HTML Help.
I hope all of this helps the next CrashRpt user who tries to port over to VS 2015