I have the bcp tool, it came pre-built with the boost installer. I'd like to extract the dependencies I need from boost into a smaller file, since I'd like to be able to build this project at school. I'm trying to use bcp, but I don't understand how to use it, despite these instructions: http://www.boost.org/doc/libs/1_52_0/tools/bcp/doc/html/index.html#bcp.syntax
I've tried typing: bcp boost/thread.hpp /"E:\documents\Dropbox\School\Comp 445\Comp445_Assign2_v2\boost2" from the command prompt, from within my boost folder: C:\Program Files (x86)\boost\boost_1_51
It just spits out a "usage" guide: bcp {dbtable | query} {in | out | queryout | format} datafile
I've also tried: bcp timed_mutex /, bcp mutex / to no avail.
I find this really confusing; it doesn't look at all like what they say in the boost documentation, and I'm not sure what a lot of this means in any case. I've found a lot of threads where people recommend bcp, but I've had a hard time finding any where people are asking how to use it.
As @Rup pointed out in the comments, the likely error is that you have SQL Server's Bulk Copy Program present on your system. That program is also named bcp.exe
and is most likely present in your PATH
environment variable. The Boost bcp
is either not present in your PATH
, or is preceded by the SQL bcp
(Windows will stop searching for other programs as soon as it finds a match).
To call the Boost bcp you should either
- Rename it to something else (e.g.
boost-bcp
) and update yourPATH
variable to reflect that and make sure there are no other conflicting names. Then call with "boost-bcp" --YOUR_OPTIONS. - Call the Boost
bcp
with the full path to its current location, e.g. "C:\Boost\bcp.exe" --YOUR_OPTIONS
来源:https://stackoverflow.com/questions/13407664/how-do-i-use-boost-bcp