Ticket #152 (closed defect: fixed)

Opened 5 months ago

Last modified 5 months ago

PQXX_AUTOLINK also for libpq

Reported by: ondrasekxy@atlas.cz Assigned to: jtv
Priority: normal Milestone: 3.0
Component: portability Version:
Severity: trivial Keywords:
Cc:

Description

On Windows/MSVC platform the library automatically links with libpq. Please consider to make it optional (#if defined(PQXX_AUTOLINK) ...) The libpq files don't always have to be named libpq, libpqd, libpqdll or libpqddll. Once the auto-link is activated, it is almost impossible not to link with the specified file. The build fails when the file is not found. Thank you and keep up the good work.

Attachments

Change History

08/01/08 11:52:46 changed by jtv

We recently changed that in the development version... Is the current compiler-public.hxx what you want?

08/04/08 03:58:09 changed by ondrasekxy@atlas.cz

In compiler-public.hxx lines 162 to 174 could read:

#if defined(PQXX_AUTOLINK)
  #if defined(PQXX_PQ_STATIC) 
    #ifdef _DEBUG 
      #pragma comment(lib, "libpqd") 
    #else 
      #pragma comment(lib, "libpq") 
    #endif 
  #else 
    #ifdef _DEBUG 
      #pragma comment(lib, "libpqddll") 
    #else 
      #pragma comment(lib, "libpqdll") 
    #endif 
  #endif 
#endif 

08/04/08 05:02:19 changed by ondrasekxy@atlas.cz

  • severity changed from normal to trivial.

I've found that there is a simple way to remove specific library from the list of default libraries with /NODEFAULTLIB[:library] linker option. I'm sorry that I've alerted you on what is in fact unimportant thing. I just don't like the auto-link feature, except when used for system libraries.

08/04/08 22:19:38 changed by jtv

  • status changed from new to closed.
  • resolution set to fixed.

OK, then I'll leave it as it is for now.


Add/Change #152 (PQXX_AUTOLINK also for libpq)




Change Properties
Action