小编use*_*er1的帖子

GCC运行时库与Microsoft Visual C++运行时可再发行组件

任何人都可以了解C++库的版本控制和发布

  • GCC库(libgcc,libstdc ++,..?)
  • Microsoft Visual C++运行时库(6.0,2005,2008,2010,2012,2013,2015,....)

由于我对GCC编程的有限接触,我从未见过C++运行时库与程序一起分发.MS Windows程序通常就是这种情况.

一个相对较旧的Linux系统可以运行一个较新的C++ 14程序(在较新的系统上编译,然后复制到旧系统)?

GCC程序员是否与程序一起分发运行时库?如果不是,为什么Windows程序会分发它们?GCC发行版如何确保C++程序在安装时始终有效?

那么Qt这样的框架怎么样,Qt如何在Linux和Windows上处理版本控制和发布?Qt是否还为不同版本分发运行时?

可能与平台有关,Linux的设计方式与Windows的设计方式有关.

GCC和MS Windows采用的方法有何根本不同?

c c++ qt gcc visual-c++

15
推荐指数
1
解决办法
2953
查看次数

打印所有std :: locale名称(Windows)

我的程序用德语检查大写字母.

#include <iostream>
#include <boost/algorithm/string/classification.hpp>
#include <boost/locale.hpp>

using namespace std;

int main()
{
    locale::global(locale("Germany_german"));
    //locale::global(locale("de_DE.UTF-8")); //Also tried "de_DE.UTF-8", but does not work

    string str1 = "über";
    cout << boolalpha << any_of(str1.begin(), str1.end(), boost::algorithm::is_upper()) << endl;

    string str2 = "Ää";
    cout << boolalpha << any_of(str2.begin(), str2.end(), boost::algorithm::is_upper()) << endl;

    return 0;
}
Run Code Online (Sandbox Code Playgroud)

程序在控制台上崩溃并出错

terminate called after throwing an instance of 'std::runtime_error'
  what():  locale::facet::_S_create_c_locale name not valid
Run Code Online (Sandbox Code Playgroud)

我不知道确切的语言环境字符串是什么,"de_DE.UTF-8"也不起作用.

有没有什么办法可以为OS支持的所有语言环境获取确切的语言环境名称字符串.可能是头文件中有一个列表,但我没有看到任何<locale>标题.

c++ windows boost locale c++11

12
推荐指数
1
解决办法
4275
查看次数

Visual Leak Detector报告泄漏了一个int*的40个字节

这是我的计划

#include <vld.h>

using namespace std;

int main() {
    int* p = new int(100);
}
Run Code Online (Sandbox Code Playgroud)

视觉泄漏探测器报告

Visual Leak Detector Version 2.3 installed.
WARNING: Visual Leak Detector detected memory leaks!
---------- Block 1 at 0x00891B60: 4 bytes ----------
  Call Stack:
    c:\xxx\documents\visual studio 2010\projects\stl1\stl1\stl1.cpp (11): stl1.exe!main + 0x7 bytes
    f:\dd\vctools\crt_bld\self_x86\crt\src\crtexe.c (555): stl1.exe!__tmainCRTStartup + 0x19 bytes
    f:\dd\vctools\crt_bld\self_x86\crt\src\crtexe.c (371): stl1.exe!mainCRTStartup
    0x76B7338A (File and line number not available): kernel32.dll!BaseThreadInitThunk + 0x12 bytes
    0x774B97F2 (File and line number not available): ntdll.dll!RtlInitializeExceptionChain + 0x63 bytes
    0x774B97C5 (File …
Run Code Online (Sandbox Code Playgroud)

c++ memory-leaks visual-leak-detector

7
推荐指数
1
解决办法
540
查看次数

单元测试FileSystemWatcher:如何以编程方式触发已更改的事件?

FileSystemWatcher看了一个目录进行更改,当有一个新的XML文件时,它会解析该文件并对其执行某些操作.

我在我的项目中有一些示例XML文件,我用于我编写的解析器的单元测试目的.

我正在寻找一种方法来使用示例XML文件来测试FileSystemWatcher.

是否可以以编程方式创建事件(以某种方式涉及XML文件)以触发FSW.Changed事件?

.net c# unit-testing filesystemwatcher

7
推荐指数
1
解决办法
2946
查看次数

Windows 10是否支持Visual C++ 6?

我使用的是Visual C++ 6 SP6,它在Windows 8.1上运行正常.只是想知道MS是否继续支持Windows 10.

visual-c++ windows-10

6
推荐指数
1
解决办法
2507
查看次数

Android中的InMobi Ad集成

我正在开展InMobi广告与示例项目的集成.

我已经更新了project id,PLACEMENT_ID但我正在收到消息onAdLoadFailed

Unable to load interstitial ad (error message: An invalid ad request was sent and was rejected by the Ad Network. Please validate the ad request and try again)
Run Code Online (Sandbox Code Playgroud)

需要帮忙.

android inmobi

6
推荐指数
1
解决办法
2072
查看次数

麻烦在Mingw 64下使用wxWidgets 3.0.2库

这是我编译wxWidgets库的方法.

下载https://sourceforge.net/projects/wxwindows/files/3.0.2/wxMSW-Setup-3.0.2.exe

set path=%MINGW%\bin
cd D:\wxWidgets-3.0.2\build\msw

mingw32-make -f makefile.gcc CFG=64 CXXFLAGS=-std=c++11 BUILD=debug UNICODE=1 MONOLITHIC=1
mingw32-make -f makefile.gcc CFG=64 CXXFLAGS=-std=c++11 BUILD=release UNICODE=1 MONOLITHIC=1
Run Code Online (Sandbox Code Playgroud)

无法将我的测试程序与构建的新库链接起来.

D:\wxWidgets-3.0.2\lib\gcc_lib64/libwxmsw30ud.a(monolib_filename.o): In function `wxChmod(wxString const&, unsigned short)':
D:\wxWidgets-3.0.2\build\msw/../../include/wx/filefn.h:513: undefined reference to `wxMSLU__wchmod(wchar_t const*, int)'
D:\wxWidgets-3.0.2\lib\gcc_lib64/libwxmsw30ud.a(monolib_filename.o): In function `wxOpen(wxString const&, int, unsigned short)':
D:\wxWidgets-3.0.2\build\msw/../../include/wx/filefn.h:515: undefined reference to `wxMSLU__wopen(wchar_t const*, int, int)'
D:\wxWidgets-3.0.2\lib\gcc_lib64/libwxmsw30ud.a(monolib_file.o): In function `wxRemove(wxString const&)':
D:\wxWidgets-3.0.2\build\msw/../../include/wx/wxcrt.h:758: undefined reference to `wxMSLU__wremove(wchar_t const*)'
D:\wxWidgets-3.0.2\lib\gcc_lib64/libwxmsw30ud.a(monolib_file.o): In function `wxAccess(wxString const&, unsigned short)':
D:\wxWidgets-3.0.2\build\msw/../../include/wx/filefn.h:511: undefined reference to `wxMSLU__waccess(wchar_t const*, int)'
D:\wxWidgets-3.0.2\lib\gcc_lib64/libwxmsw30ud.a(monolib_filefn.o): …
Run Code Online (Sandbox Code Playgroud)

c++ wxwidgets compilation mingw-w64

5
推荐指数
1
解决办法
5297
查看次数

Odoo:将 res.company 对象导出到 JSON

company = self.env['res.company'].search([('id', '=', 1)])
print company.name # prints 'my company' which is correct
print json.dumps(company) # error TypeError: res.company(1,) is not JSON serializable
Run Code Online (Sandbox Code Playgroud)

问题是如何简单地导出companyjson对象?

我正在寻找一种适用于任何模型的通用方法。

json odoo-11

5
推荐指数
1
解决办法
3557
查看次数

为什么程序员使用void*

我正在学习动力学数据结构,例如malloc功能.为什么有时程序员使用void*指针参数(例如)整数和字符的动态变量?有什么区别?有什么好处?

c pointers void dynamic-memory-allocation

2
推荐指数
1
解决办法
379
查看次数

Vue 路由器页面刷新时出现 404

我正在使用具有历史模式的 Vue 路由器。在按钮上单击当前页面,我将其路由到下一页。在第二页上,当我重新加载时,我收到 404。有没有办法在 Vue 中处理这个问题并将其重定向到主页。

export default new Router({
  mode: "history",
  routes: [
    {
      path: "/",
      name: "first",
      component: First
    },
    {
      path: "/abc",
      name: "abc",
      component: Second,
      props: true
    },
Run Code Online (Sandbox Code Playgroud)

javascript vue.js vue-router

2
推荐指数
1
解决办法
1万
查看次数