Category : gcc

I load a path name with cmake add_definitions(-DMY_PATH =${CMAKE_INSTALL_FULL_DATADIR}/path) and want to use as a string in my C++ program to load some data. For this the stringification operator # is really handy – I use the macro provided in this answer which is the same as here. Now when I have "linux" or "unix" ..

Read more

I am trying to install CRFPP V0.51 for ParsCit. But I am running into an Error for file feature_index.cpp. How can I fix the error of Rvalue/Lvalue? feature_index.cpp:174:60: error: cannot bind rvalue reference of type ‘int&&’ to lvalue of type ‘int’ 174 | old2new.insert(std::make_pair<int, int>(it->second.first, new_maxid)); | ~~~~~~~~~~~^~~~~ In file included from /usr/include/c++/9/bits/stl_algobase.h:64, from /usr/include/c++/9/bits/char_traits.h:39, ..

Read more

I’m trying to build protocol-buffer by following these instructions. This is what I did. git clone https://github.com/protocolbuffers/protobuf.git cd protobuf git submodule update –init –recursive ./autogen.sh ./configure make -j6 After the successful build, I checked ldd -d src/.libs/protoc It showed a lot of undefined symbols. [email protected]:~/…/protobuf# ldd -d src/.libs/protoc linux-vdso.so.1 (0x00007fff1f3a5000) libprotoc.so.28 => not found libstdc++.so.6 ..

Read more

I’m writing a piece of code using GCC’s vector extensions (__attribute__((vector_size(x)))) that needs several constant masks. These masks are simple enough to fill in sequentially, but adding them as vector literals is tedious and error prone, not to mention limiting potential changes in vector size. Is it possible to generate the constants using a constexpr ..

Read more

I want to try using cython following the instructions in the documentation. I use the command: cythonize -i test2.pyx as stated in documentation file is created test2.c, but the file with the extension .pyd does not appear next to the original file but instead an error Error text: ompiling D:MiscellaneaProgrammigProgramming-PythonProject_Bot_2.7datatest2.py because it changed. 1/1] Cythonizing ..

Read more