Added
Link Here
|
0 |
- |
1 |
--- libcurv/io/cpp_program.cc.orig 2021-09-29 21:29:01 UTC |
|
|
2 |
+++ libcurv/io/cpp_program.cc |
3 |
@@ -65,7 +65,7 @@ Cpp_Program::compile(const Context& cx) |
4 |
file_.close(); |
5 |
|
6 |
// compile C++ to optimized object code |
7 |
- auto cc_cmd = stringify("c++ -fpic -O3 -c ", path_.string()); |
8 |
+ auto cc_cmd = stringify("c++ -isystem /usr/local/include -fpic -O3 -c ", path_.string()); |
9 |
//auto cc_cmd = stringify("c++ -fpic -c -g ", path_.c_str()); |
10 |
if (system(cc_cmd->c_str()) != 0) { |
11 |
preserve_tempfile(); |
12 |
@@ -79,7 +79,7 @@ Cpp_Program::compile(const Context& cx) |
13 |
#else |
14 |
auto lib_name = register_tempfile(tempfile_id_,".so"); |
15 |
#endif |
16 |
- auto link_cmd = stringify("c++ -shared -o ", lib_name.string(), " ", obj_name.string()); |
17 |
+ auto link_cmd = stringify("c++ -isystem /usr/local/include -Wl,-rpath,/usr/local/lib -shared -o ", lib_name.string(), " ", obj_name.string()); |
18 |
if (system(link_cmd->c_str()) != 0) |
19 |
throw Exception(cx, "c++ link failed"); |
20 |
|