草庐IT

compilers_and_libraries

全部标签

OpenSSL:configure: error: OpenSSL library not found解决方案

  大家好,我是爱编程的喵喵。双985硕士毕业,现担任全栈工程师一职,热衷于将数据思维应用到工作与生活中。从事机器学习以及相关的前后端开发工作。曾在阿里云、科大讯飞、CCF等比赛获得多次Top名次。现为CSDN博客专家、人工智能领域优质创作者。喜欢通过博客创作的方式对所学的知识进行总结与归纳,不仅形成深入且独到的理解,而且能够帮助新手快速入门。  本文主要介绍了OpenSSL:configure:error:OpenSSLlibrarynotfound解决方案,希望能对使用openssl的同学们有所帮助。文章目录1.问题描述2.解决方案1.问题描述  今天在安装openssh时,当运行完con

C++ Armadillo : GCC vs VC++2013: Operator () and overloading

我正在尝试使用ArmadilloC++库开发Linux/Win64应用程序。以下代码在GCC-4.7中编译,但在使用Armadillo提供的VS项目文件的VisualStudio2013中编译失败。#include#include"armadillo"usingnamespacearma;usingnamespacestd;//worksinGCC-4.7//VC++2013:compileerror:C3066voidfoo1(vec::fixed&bar){bar(1)=1.;}//worksvoidfoo2(vec::fixed&bar){bar.at(2)=1.;}//work

Python 扩展 : using different compiler flags for a C parts and C++ parts

对于我的python扩展,我有C(来自嵌入式库)和C++文件,它们被编译并链接在一起。只有C++部分与Python接口(interface)(通过SWIG)。这在VS2015的windows和linux下的gcc中都有效。但是,对于gcc,C++文件需要一组不同于C文件的编译器标志(例如-std=c++11、-Wno-reorder),以避免出现有关C中不正确标志的警告。在setuptools/distutils中有没有办法单独更改每个文件的编译器标志,例如。基于文件扩展名?我已经使用了来自https://stackoverflow.com/a/36293331/3032680的自定义

Visual Studio 2012 : LPCWSTR and wstring 中的 C++ 编译错误

以下代码在VisualStudio2010中编译但在VisualStudio2012RC中编译失败。#include//Windowsstuffstypedef__nullterminatedconstwchar_t*LPCWSTR;classCTestObj{public:CTestObj(){m_tmp=L"default";};operatorLPCWSTR(){returnm_tmp.c_str();}//returnsconstwchar_t*operatorstd::wstring()const{returnm_tmp;}//returnsstd::wstringprote

c++ - ltrace: 在 "library.so"中找不到 .dynsym 或 .dynstr

我尝试过使用ltrace。我尝试使用以下命令来分析程序sampleapp,ltrace-c-T--library=library.so--output=out使用的library.so文件。txt./SampleApp.但它显示上述错误。但是library.so是一个调试版本。所以符号表应该在那里。我尝试用objdump--sourcelibrary.so|验证它grepCreateSocket()。它返回使用该CreateSocket()函数的代码。这意味着它包含一个符号表。那为什么会出现这个错误呢?相关帖子:measureCPUusagepersecondofadynamicall

c++ - g++ : Is there a way to access compile flags inside the code that is being compiled?

有没有一种方法(例如,定义的常量)来访问正在编译的代码中运行编译器的编译标志。例如,我想要一个程序来写入编译时使用的标志。intmain(){std::coutgcc/g++是否存在这样的常量?或者更好:是否有在gcc和clang中都定义的常量?我对检查优化级别和-march标志的值特别感兴趣。那么,如果没有显示所有标志的常量,是否至少有显示这些值的常量? 最佳答案 以下命令打印出所有预定义的宏:g++-dM-E-这适用于gcc和g++。您可以自行检查-不幸的是,没有宏可让您轻松访问完整的gcc/g++命令行。幸运的是,大多数-m.

c++ - 虚继承与多态 : Is the cereal library messing with object layout?

我有四个类(A、B、C和D)遵循经典菱形图案和Container包含unique_ptr的类.我想使用cereal序列化这些类序列化库。structA{intf1;intf2;intf3}structB:publicvirtualA{templateinlinevoidsave(Archive&ar)const{std::cerrf1)f2)f3)f1f2f3CEREAL_REGISTER_TYPE(B);CEREAL_REGISTER_TYPE(C);CEREAL_REGISTER_TYPE(D);structContainer{std::unique_ptrobj;template

C++ fatal error C1001 : An internal error has occurred in the compiler

在Release模式下编译时出现以下错误。1>d:\users\eyal\projects\code\yalla\core\src\runbox\win32\window.cpp:fatalerrorC1001:Aninternalerrorhasoccurredinthecompiler.1>(compilerfile'f:\dd\vctools\compiler\utc\src\p2\main.c',line249)1>Toworkaroundthisproblem,trysimplifyingorchangingtheprogramnearthelocationslistedab

c++ - CMake 识别 MSVC(C 和 CXX),但仍然抛出 'No CMAKE_*_COMPILER found'

我一直在四处寻找,这个问题似乎以各种形式出现了很多。最常见的原因是缺少编译器,即C和CXX编译器未知。然而,就我而言,情况并非如此。我的机器上有C和C++编译器,例如通过VisualStudio,一切都可以正常编译。但是,通过cmake,会发生这种情况:>cmake.输出:--Buildingfor:VisualStudio142015--TheCcompileridentificationisMSVC19.0.24215.1--TheCXXcompileridentificationisMSVC19.0.24215.1CMakeErroratCMakeLists.txt:12(pro

c++ - 具有模板特化的 constexpr 数组成员 : inconsistent behavior cross compilers

考虑以下代码:#includetemplatestructfoo{};templatestructfoo{staticconstexprcharvalue[]="abcde";};templatestructbar{staticconstexprcharvalue[]="abcde";};templatestructbaz{staticconstexprintvalue=12345;};intmain(){charc=foo::value[2];chard=bar::value[2];inte=baz::value;std::cout编译时:clang++-std=c++14./tes