libpqxx: PGSQLSRC in win32/common cannot contain spaces?

Forgive me if the solution to this is obvious, but when trying to set the path for PGSQLSRC in win32/common for compiling using nmake in Developer Command Prompt as suggested by libpqxx install instructions, the following compile command fails:

nmake /f win32/vc-libpqxx.mak ALL

The paths I tried were:

PGSQLSRC=C:\Program Files\PostgreSQL\11
PGSQLSRC="C:\Program Files\PostgreSQL\11"
PGSQLSRC=C:\Program^ Files\PostgreSQL\11

Each one fails to either find the correct directories to include (as the space breaks up the path and cl.exe gets confused), or the compile works and subsequent copy commands in the nmake process fail. None of the above syntax options work to escape the space correctly for all steps in the compile process that use that path.

I made a hasty edit to the file common-sample suggesting to use the quotes method but didn’t realise it failed if I did a clean and totally fresh compile using nmake. https://github.com/jtv/libpqxx/commit/9ff78d2db75918d0a2c61dbd93b104502c1680b2

I will update this suggested patch and submit a new one once I find out the best way to escape the path name.

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 17 (17 by maintainers)

Commits related to this issue

Most upvoted comments

I had better luck using the 8 character path variation but this seems a dirty workaround

PGSQLSRC=C:\PROGRA~1\PostgreSQL\11

Is there a better solution than this which could be suggested? Or could vc-libpqxx.mak be changed in a way to make more typical escaping methods work?