[CXX-94] C++ Client driver headers dependency on pch.h Created: 28/Apr/12  Updated: 04/May/14  Resolved: 17/Mar/14

Status: Closed
Project: C++ Driver
Component/s: None
Affects Version/s: None
Fix Version/s: legacy-0.8.0

Type: Bug Priority: Major - P3
Reporter: Pieter Willem Jordaan Assignee: Andrew Morrow (Inactive)
Resolution: Done Votes: 0
Labels: cxxmove, driver, legacy-cxx
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Ubuntu 12.04 x64. Boost 1.49


Issue Links:
Related
is related to SERVER-7504 Core Server Headers should not includ... Closed

 Description   

After downloading and building the latest c++ mongo driver tarball (28 April 17:55 SAST) I can't get a simple program built with the mongo driver. Everywhere I include dbclient.h I receive the following error: /usr/local/include/mongo/client/dbclient.h:30:17: fatal error: pch.h: No such file or directory.

The file /usr/local/include/mongo/pch.h exists however. The latest v2.0 client driver tarball does not have this issue.

I think the headers including pch.h should not rely on the mongo driver's include path (-Imongo) and should rather include ../pch.h. This is a guess as to what the problem is though.



 Comments   
Comment by Andrew Morrow (Inactive) [ 17/Mar/14 ]

Fixed, in that pch.h no longer exists in the tree.

Comment by Andrew Morrow (Inactive) [ 13/Mar/14 ]

https://github.com/mongodb/mongo-cxx-driver/pull/20

Comment by Pieter Willem Jordaan [ 10/Mar/14 ]

Not sure if the dependency on pch is resolved, but I no longer require the workaround (-Isrc/mongo)

Comment by Pieter Willem Jordaan [ 29/Apr/12 ]

From tutorial.cpp:

// g++ src/mongo/client/examples/tutorial.cpp -pthread -Isrc -Isrc/mongo -lmongoclient -lboost_thread-mt -lboost_system -lboost_filesystem -L[path to libmongoclient.a] -o tutorial
//g++ tutorial.cpp -L[mongo directory] -L/opt/local/lib -lmongoclient -lboost_thread-mt -lboost_filesystem -lboost_system -I/opt/local/include -o tutorial

It works if and only if I use this in both examples: -Isrc/mongo

I believe building client apps should not have to rely on -Isrc/mongo but only -Isrc as I believe a recent commit was made to make mongo/client/dbclient.h the only needed include file. Not pch.h

Comment by Pieter Willem Jordaan [ 28/Apr/12 ]

modified SConstruct and removed the boost dependency on "*-mt" libraries

build command: scons --extrapath /usr/local install

Generated at Wed Feb 07 21:58:11 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.