当前位置: 首页 > news >正文

网站经常被黑网上店铺怎么开通

网站经常被黑,网上店铺怎么开通,平面设计风格有哪些类型,广州深圳做网站这个过程有挺多坑#xff0c;记录一下。我这里的环境#xff1a; Windows 11 Qt 6.2 Boost 1.8.4 CMake 3.25.2 Visual Stutio 2019#xff08;主要用于C编译#xff09; 1、下载并将Boost编译为静态库 b2.exe toolsetmsvc-14.2 install --prefixboost安装路径 links… 这个过程有挺多坑记录一下。我这里的环境 Windows 11 Qt 6.2 Boost 1.8.4 CMake 3.25.2 Visual Stutio 2019主要用于C编译 1、下载并将Boost编译为静态库 b2.exe toolsetmsvc-14.2 install --prefixboost安装路径 linkstatic 参考 C Boost库在windows下的安装与使用 - 知乎 (zhihu.com) 2、CMake中使用静态库 set(Boost_USE_STATIC_LIBS ON) add_compile_definitions(BOOST_PYTHON_STATIC_LIB) 参考 Win10下CMakeList.txt配置使用Boost.python - 知乎 (zhihu.com) 3、Python程序 如下foo.py def greeting(s):print(Get the param in Python: , s, \n)return Hello, I come from Pyhon world. 4、CMake程序 cmake_minimum_required(VERSION 3.14) project(PythonCaller LANGUAGES CXX) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQUIRED ON) set(Boost_USE_MULTITHREADED ON) set(Boost_USE_STATIC_LIBS ON) set(PYTHON_ROOT 编译boost时python的运行环境根路径#例如d:/dev/Anaconda3 add_compile_definitions(BOOST_PYTHON_STATIC_LIB) set(PYTHON_INCLUDE ${PYTHON_ROOT}/include) set(PYTHON_LIBRARIES ${PYTHON_ROOT}/libs/python38.lib) add_definitions(-DBOOST_PYTHON_NO_ASSERT) find_package(Boost REQUIRED COMPONENTS python system) include_directories(${PYTHON_INCLUDE} ${Boost_INCLUDE_DIRS}) MESSAGE( STATUS Boost_LIBRARIES ${Boost_LIBRARIES}. ) MESSAGE( STATUS Boost_INCLUDE_DIRS ${Boost_INCLUDE_DIRS}.) MESSAGE( STATUS Boost_LIBRARY_DIRS ${Boost_LIBRARY_DIRS}.) MESSAGE( STATUS Boost_PYTHON_LIBRARY ${Boost_PYTHON_LIBRARY}.) add_executable(PythonCaller main.cpp) target_link_libraries(PythonCaller ${Boost_PYTHON_LIBRARY} ${PYTHON_LIBRARIES}) 5、C程序 #include boost/python.hpp // Boost.Python #include iostream #include stringnamespace pyboost::python;int main(int argc, char* argv[]) {Py_Initialize(); // 初始化 Python 解释器try{//导入模块 hellohello.pypy::object hello boost::python::import(foo);//获取属性函数、类等py::object greeting hello.attr(greeting);//执行Python函数py::object py_res greeting(Hello, I come from C world.);//转换并返回结果使用 boost::python::extract 转换std::string res py::extractstd::string(py_res);std::cout Get the result from python: res std::endl;}catch (const boost::python::error_already_set){PyErr_Print();return -1;}Py_Finalize(); // 终止 Python 解释器return 0; }要注意头文件包含顺序把”#include boost/python.hpp“放在STL包含头文件之前否则报错 xxx\Boost\1_84_0\include\boost-1_84\boost/assert/source_location.hpp(102): error C2039: _snprintf: 不是 std 的成员 参考 _snprintf: is not a member of std · Issue #32 · boostorg/system · GitHub 6、运行时设置python环境变量 需要设置Python环境变量。在Windows中执行如下命令Linux用export命令 set PYTHONHOMEPython环境根目录 否则C Boost调用python报错 init_fs_encodingfailed to get the Python codec of the file 原因是python的环境变量没有配置好。 set PYTHONHOMEPython环境根目录 参考 【BUG】C Boost调用python报错init_fs_encodingfailed to get the Python codec of the file_fatal python error: init_fs_encoding: failed to ge-CSDN博客 7、运行结果 Get the param in Python:  Hello, I come from C world. Get the result from python: Hello, I come from Pyhon world.
http://www.hkea.cn/news/14369949/

相关文章:

  • 网站建设的优势何江八佰yy影视
  • 邯郸住房城乡建设厅网站抖音代运营都做什么
  • 我想建设网站做网站需要考虑哪些
  • 网站建设实训实训心得wordpress免登录付费阅读
  • 如何免费做网站网页上海3d建模培训学校
  • 泰安北京网站建设公司阿里指数app下载
  • c 做彩票网站网站空间和域名
  • 做网站用的图片怎样压缩深圳企业网站推广
  • 长沙做网站微联讯点不错印刷网站模板下载
  • 杭州手机建站模板flash网站带后台
  • 国外扁平化风格网站做各国民宿租赁的网站
  • 自如网站做的好 服务口碑营销怎么做
  • 网站建设与管理复习知识点网络游戏服务网
  • 宁波行业网站建设二楼平台设计
  • 网站建设的布局对网络推广的影响服务式办公室网
  • 大型网站 前端购买网站空间的方法
  • 与市场营销有关的网站o2o电商网站
  • 网林时代网站建设重庆制作手机网站
  • 上海知名网站建设创建公司网站难吗
  • 网站设计制作的公司百度快速排名用什
  • 做一个网站平台需要什么东莞南城网站开发公司
  • 南京做网站好的公司wordpress分页跳转首页
  • 做100个网站效果营销型网站公司
  • 可以做推送的网站什么行业应该做网站
  • 网站建设和软件开发家政保洁服务网站模板
  • 我做网站推广wordpress游戏主题
  • 常州网站建设公司推荐如何建设自己的网站 知乎
  • 湖南城乡建设厅官方网站上海网站建设品牌
  • 页面简单的网站学习做ppt 的网站
  • discuz网站ip东莞外贸网络推广