jirentabu / crashrpt

Automatically exported from code.google.com/p/crashrpt
0 stars 0 forks source link

Release LIB configuration is obsolete #28

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
***NOTE*** Please do create a NEW issue per each detected bug! Do not list
all detected problems in single issue record!

What steps will reproduce the problem?
1. Try to build crashrpt with the Release LIB configuration
2.
3.

What is the expected output? What do you see instead?
crashrpt.lib is generated, which can be linked into the target module.
Build fails with numerous errors and missing files.

What version of the product are you using? On what operating system?
1.2.2, Windows 7.

Please provide any additional information below.
Obviously the Release LIB configuration is quite obsolete, telling from the
include directory list. How about removing it? In the FAQ
(http://code.google.com/p/crashrpt/wiki/FAQ), it is clearly stated:

Can I compile crashrpt as a static library?
No, currently you can't do this. 

I think this configuration would mislead crashrpt users.

Original issue reported on code.google.com by crendk...@gmail.com on 7 Apr 2010 at 12:39

GoogleCodeExporter commented 9 years ago
I rebuild the library successfully with both VS2008SP1 and VS2010RC.

I've inserted on CrashRpt.h both #pragma to include CR lib and lib needed at 
link 
time

#define CRASHRPT_LIB 
#define _CRASHRPT_REMOVE_DEPRECATED
#include <CrashRpt.h>

and on CrashRpt.h

#ifndef CRASHRPT_LIB // If CrashRpt is used as DLL
    #define CRASHRPT_DECLSPEC_DLLEXPORT __declspec(dllexport) 
    #define CRASHRPT_DECLSPEC_DLLIMPORT __declspec(dllimport) 

    #ifdef _DEBUG
        #pragma comment( lib, "..\\lib\\CrashRptD.lib")
    #else
        #pragma comment( lib, "..\\lib\\CrashRpt.lib")
    #endif
#else // If CrashRpt is used as static library
    #define CRASHRPT_DECLSPEC_DLLEXPORT 
    #define CRASHRPT_DECLSPEC_DLLIMPORT

    // Librerie necessarie, escluse da linker della lib per evitare errori di 
vettori tra DEBUG e Release 
    #pragma comment( lib, "CrashRptLIB.lib")
    #pragma comment( lib, "dbghelp.lib")
    #pragma comment( lib, "Rpcrt4.lib")
    #pragma comment( lib, "version.lib")
    #pragma comment( lib, "psapi.lib")
#endif

Note that CrashRptLIB.lib is in VS path for lib

Original comment by zacca...@zaksoft.com on 8 Apr 2010 at 5:58

GoogleCodeExporter commented 9 years ago
Release LIB configuration was never officially supported and documented. It is
currently not recommended to use and will be removed in the next version.

Original comment by zexspect...@gmail.com on 8 Apr 2010 at 7:18

GoogleCodeExporter commented 9 years ago
Why ? It works perfectly, with only few lines of code..

I hope you can maintain static library.. or we (I suppose many others use 
static 
linking to avoid DLL version nightmare) have to merge all patches at every 
release.

In dialog mode is perfect, in MDI just few trick are needed..

Original comment by zacca...@zaksoft.com on 8 Apr 2010 at 4:08

GoogleCodeExporter commented 9 years ago
Ok, I can keep Release LIB if someone uses it.

What is the problem with MDI?

Original comment by zexspect...@gmail.com on 9 Apr 2010 at 5:44

GoogleCodeExporter commented 9 years ago
Release LIB is up-to-date in v1.2.3

Original comment by zexspect...@gmail.com on 12 Apr 2010 at 11:17