mingw

How do I compile a dll with R and RCPP?

匆匆过客 提交于 2020-01-10 04:16:24
问题 I have written a .cpp file and I want to compile it to a .dll for use with R and RCPP. (without using the inline package). I am using WinXP and R 2.13.2 and RCPP 0.9.7. I am using Rtools 2.14. How do I include Rcpp.h in minGW's search path? I underastand that the files that I need to include are in C:\Program Files\R\R-2.13.2\library\Rcpp\include. However, I was not able to add the to "add" them to "search path". I tired a temporary "hack". I copied the contents of C:\Program Files\R\R-2.13.2

C++: Vector bounds

一个人想着一个人 提交于 2020-01-09 11:05:11
问题 I am coming from Java and learning C++ in the moment. I am using Stroustrup's Progamming Principles and Practice of Using C++. I am working with vectors now. On page 117 he says that accessing a non-existant element of a vector will cause a runtime error (same in Java, index out of bounds). I am using the MinGW compiler and when I compile and run this code: #include <iostream> #include <cstdio> #include <vector> int main() { std::vector<int> v(6); v[8] = 10; std::cout << v[8]; return 0; } It

Windows下编译linphone

守給你的承諾、 提交于 2020-01-09 01:11:04
本博文介绍了再MSYS&MINGW环境中编译linphone(貌似当前版本是3.5.2),可参照解压后README.mingw文件的说明进行编译,下面把主要注意事项进行说明 1 下载最新版mingw 从官网 http://www.mingw.org/ 下载最新版mingw-get-inst.exe,例如本人从官网( http://sourceforge.net/projects/mingw/files/MinGW/ )下载到的是mingw-get-inst-20120426.exe,如图: 以默认路径安装:C:\MinGW,安装时正如README.mingw说描述,3个安装选项必须选择: Download lastest mingw-get-inst.exe from http://www.mingw.org Run mingw-get-inst.exe. Choose "download lastest catalogues". In the feature list, select: * C compiler * C++ compiler * Mingw developer toolkit Let the installer fetch and install everything. 在mingw shell命令行执行如下安装和操作: mingw-get install

Windows使用nmake编译nginx报错&apos;sed&apos; 不是内部或外部命令,也不是可运行的程序

感情迁移 提交于 2020-01-08 13:45:52
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> 这个是因为我们没有正确配置msys 和 mingw32 在windows 上面的路径产生的,不用理会。 来源: oschina 链接: https://my.oschina.net/daxian1110/blog/3154795

Cannot link boost.python with mingw

做~自己de王妃 提交于 2020-01-07 04:34:10
问题 I have already build boost.python lib by mingw,Got two lib files: libboost_python-mgw45-mt-1_46_1.a libboost_python-mgw45-mt-d-1_46_1.a But I cant link these libs in my test programs.And the other components like regex works fine.I dont know how to solve this. my user-config.jam: using python : 2.7 : F:\\Programs\\Python\\python # cmd-or-prefix : F:\\Programs\\Python\\include : F:\\Programs\\Python\\lib : <toolset>gcc # condition ; and the build command: bjam toolset=gcc --with-python My

C++ HelloWorld program compiled with MinGW crashes with “Illegal Argument”

老子叫甜甜 提交于 2020-01-07 04:05:36
问题 I decided it was time that I learned C++, and after struggling for 3+ hours trying to get the compiler to work, I finally created a working program. However, it seemingly spontaneously broke when I tried to refactor the project in Eclipse by cutting and pasting it. The program simply crashes, and Windows brings up the dreaded dialogue "HelloWorld.exe has stopped working." A bit of debugging revealed that "cout" was considered an illegal argument. I looked some more into the issue, and I'm now

C++ HelloWorld program compiled with MinGW crashes with “Illegal Argument”

倾然丶 夕夏残阳落幕 提交于 2020-01-07 04:05:17
问题 I decided it was time that I learned C++, and after struggling for 3+ hours trying to get the compiler to work, I finally created a working program. However, it seemingly spontaneously broke when I tried to refactor the project in Eclipse by cutting and pasting it. The program simply crashes, and Windows brings up the dreaded dialogue "HelloWorld.exe has stopped working." A bit of debugging revealed that "cout" was considered an illegal argument. I looked some more into the issue, and I'm now

windows mingw asterisk '*' passing by argv[1] to string

时光毁灭记忆、已成空白 提交于 2020-01-07 03:04:55
问题 I wrote a code below #include<stdio.h> int main(int argc, char *argv[]) { char cmd[50]="dir"; if (argc == 2) { sprintf(cmd,"dir %s",argv[1]); } if (argc == 3) { sprintf(cmd,"dir %s %s", argv[1], argv[2]); } printf("%s\n",cmd); system(cmd); return 0; } when I executed like below I think can't pass '*' by *argv[] How can I pass something like "*.c" ? update code #include<stdio.h> int main(int argc, char *argv[]) { char cmd[50]="dir"; if (argc == 2) { sprintf(cmd,"dir %s",argv[1]); } if (argc ==

Shellcode testing gone wrong

痴心易碎 提交于 2020-01-07 02:25:08
问题 Hey I'm using a bit of code most of you are familiar with. It basically takes an array of characters and casts it as a function pointer. With this code you can theoretically test any shellcode's functionality with it, and it would be a very valuable program for my work, if it would behave... I'm doing this on Windows XP SP3, and am using MinGW's gcc to compile and gdb to debug the damn thing. Here's what I've got... unsigned char code[] = "\x90\x90\x90\x90\x90\x90\x90\x90"; main() { printf(

如何在批处理文件中回显换行符?

拈花ヽ惹草 提交于 2020-01-07 01:27:13
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> 你怎么能从批处理文件输出中插入换行符? 我想做的事情如下: echo hello\nworld 哪个会输出: hello world #1楼 当回显某些内容以重定向到文件时,多个echo命令将不起作用。 我想也许“>>”重定向器是一个不错的选择: echo hello > temp echo world >> temp #2楼 使用: echo hello echo. echo world #3楼 echo hello & echo.world 这意味着您可以定义 & echo. 作为换行符的常量 \\n 。 #4楼 如果有人来这里是因为他们希望从MINGW make makefile中回显一个空行,我就用了 @cmd /c echo. 只需使用 echo. 导致可怕的 process_begin: CreateProcess(NULL, echo., ...) failed. 错误信息。 我希望这有助于至少有一个人在那里:) #5楼 你可以使用 @echo ( @echo + [space] + [insecable space]) 注意:使用Alt + 0160可以获得不可移植的空间 希望能帮助到你 :) [编辑]嗯,你是对的,我需要它在Makefile中,它在那里完美地工作。 我想我的答案不适合批处理文件