由买买提看人间百态

topics

全部话题 - 话题: mingw
1 2 3 下页 末页 (共3页)
x**n
发帖数: 1055
1
的确是传的指针,但是没有用semaphore, boost thread好像没有这个东西吧
是这样的,假设有msvc.dll和mingw.dll
又用VC8.0写了个主程序
typedef struct
{
boost::barrier* brr;
boost::mutex* mtx;
boost::condition* cv;
} BT_PARAM;
main()
{
...
BT_PARAM* bt_param;
bt_param=new BT_PARAM;
接下来初始化bt_param;
接下来loadlibrary,打开msvc.dll和mingw.dll
产生两个线程
boost::thread* t_msvc=new boost::thread(p_msvc,bt_param);
boost::thread* t_mingw=new boost::thread(p_mingw,bt_param);
...
}
然后在msvc.dll.cpp中加上这么一段:
...
bt_param->brr->wait();
...
同样在在mingw.dll.cpp中加上这么一段:
..... 阅读全帖
y****e
发帖数: 23939
2
来自主题: Programming版 - 问一个MinGW + CMake 的问题
我在WinXP下用MinGW加CMake来port 我的Project,原来是
Linux下开发的。
用Cmake一开头就出了问题,我选用Unix Makefiles, 但是
MinGW的C compiler总被抱怨:
The C compiler "gcc.exe" is not able to compile a simple test program.
It fails with the following output:
0[main] make 2924 fhandler_base::dup(some disk file) failed, handle 0,
Win32 error 6
Building object file testCCompiler.o...
Access violation
请有经验的大虾出手指教,先谢过了。
t*****t
发帖数: 72
3
来自主题: Programming版 - 死了,哪里有mingw的入门介绍?
1) download
http://prdownloads.sourceforge.net/mingw/MinGW-4.1.1.exe?download
2) after installation, add the "bin" dir to your system enviromental
variables.
3) open any console under windows, you can run any commands under that
"bin" dir, like gcc, g++, nm, .... the same command as you use in
Linux terminals.
a****y
发帖数: 86
4
来自主题: Programming版 - mingw gcc 没有输出结果
一个非常简单的程序测试.
在D盘, test.c
#include
int main()
{
printf("hello!\n");
return 0;
}
用mingw编译.cmd命令行
c:\MinGW\bin\gcc d:\test.c -o d:\test.exe
没有输出结果.一片空白.但是如果我去点test.exe文件,黑框只闪一下就自动关闭了.但
是如果仔细看
会发现黑框里面第一行有我要的输出结果.
不知道为什么. 请教大家.谢谢!
x**n
发帖数: 1055
5
我有两个windows下的DLL,
一个是Code::blocks加上MingW 4.3.3 编译的DLL
另一个是Visual C++ 2005编译的DLL
都是差分程序,因此想通过类似boost.thread的实现线程同步并且传递数据
因为是不同编译器生成的DLL,所以想问问有没有这个可能实现这两个不同编译器生成
的DLL线程的同步?
因为两个DLL都依赖很多库,所以想要都用同一个编译器去编译(比如都用Visual C++或
者都用MingW编译成功)太困难了
谢谢!
x**n
发帖数: 1055
6
我用MSVC的LoadLibrary和GetProcAddress可以打开另一个MingW的DLL并且调用MingW
DLL的函数没问题,但是要同步就不行,呵呵
g*****n
发帖数: 420
7
来自主题: Programming版 - MinGW在win7上就是一个垃圾
而且mingw 在windows上编译速度特别慢,比我虚拟机里面的mingw cross compile 都慢
太多了
q*****g
发帖数: 1568
8
来自主题: Programming版 - 死了,哪里有mingw的入门介绍?
【 以下文字转载自 Linux 讨论区 】
发信人: qiuxing (球星), 信区: Linux
标 题: 死了,哪里有mingw的入门介绍?
发信站: BBS 未名空间站 (Mon Oct 31 16:00:23 2005), 转信
他自己主页的那个介绍太复杂了。谁稍微讲一下大概的原理?我目前有
Windows, cygwin, colinux(gentoo),怎么才能编译我的那一堆source
code好让别人在Windows下面跑?我老板急着要呢!
在线等,呵呵。
N**g
发帖数: 5
9
来自主题: Programming版 - 打算安装mingw,我应该下哪些文件呢,
XP的操作系统.要求能编C,C++.
http://www.mingw.org/download.shtml#hdr2,不知道该下那些文件.
谢谢帮助!
x**n
发帖数: 1055
10
谢谢,好像有点明白您说的思路,不过是否能稍微详细展开一下实现的细节?
就是在mingw.dll.c和msvc.dll.c中把GetProcAddress得到的
ptr_func_mingw和ptr_func_msvc作为参数传入用其中一个编译器写的wait()?然后在
wait中实现所有的同步操作?
我是不是应该有wait(ptr_func_mingw)和wait(ptr_func_msvc)这样一个函数?
有没有这方面成功的例子?
非常感谢!!
b***i
发帖数: 3043
11
我建议你做个试验,写两个简单的dll,一个用mingW, 一个msvc, 在里面做循环,等待
,同步。主程序开始两个线程后要等待join吧。
如果出错,用下面的方案再试试。在dll中都定义startThread(.......,
aFunctionPointertoWait)
然后在主程序中定义一个函数,用来wait,你那个boost的barrier也在主程序中声明,
通过这个函数来等待。就是说,这个barrier的等待不是分别在两个dll中,而是统一通
过主程序的唯一的函数来做,避免不同编译器不同的实现不兼容。wait那个函数,可以
增加一些参数,你可以打印看看谁呼叫你,那一行,要增加很多调试信息。
h**********c
发帖数: 4120
12
I review the post.
It seems you probably can't do this, cause the underling thread library for
MingW/cygwin etc is pthread. MSVC uses thread library Microsoft wrote.
So in your Ming code and MSVC, do they include the same boost library.
x**n
发帖数: 1055
13
我已经实现此mingw和msvc线程同步的功能,都用的boost.thread,现在在win和linux
上都可以编译运行,非常感谢bihai的提示

for
N******K
发帖数: 10202
14
来自主题: Programming版 - MinGW在win7上就是一个垃圾
MinGW gcc4.9
obj文件 section太多就编译不下去了
查了一下stack overflow 就是这个情况 没法改
在win7上用gcc 看来是不行了 必须装linux
t**********n
发帖数: 135
15
来自主题: Computation版 - 有人在mingw下用过arpack++么?
Mingw 5.1 GCC 3.4.5 ARPACK++ 1.08。
加上
#include "arlsnsym.h"
之后就疯狂得出了很多错误信息。有人遇到过么?
projectpath/arpackpp/include/blas1f.h:27: error: `sasum' was not declared in
this scope
projectpath/arpackpp/include/blas1f.h:27: error: `_' was not declared in
this scope
projectpath/arpackpp/include/blas1f.h:27: error: initializer expression list
treated as compound expression
projectpath/arpackpp/include/blas1f.h:27: error: expected `,' or `;' before
'(' token
projectpath/arpackpp/include/blas1f.h:29: error: v
a*****e
发帖数: 182
16
来自主题: Computation版 - 请教如何在window XP下装GCC/MinGW
我要用一个模拟计算软件,可以用GCC, 不支持visual c++。 看了网上关于安装GCC/
MinGW的方法很复杂,有什么简单点的方法吗?这里高手多, 望指点!
m********a
发帖数: 1312
17
来自主题: Programming版 - g++ for Windows
从所需的dll来看mingw的g++比cygwin的要省些麻烦,因此一直用mingw g++。
$ cygcheck g++
Found: c:\MinGW\bin\g++.exe
c:\MinGW\bin\g++.exe
C:\WINDOWS\system32\KERNEL32.dll
C:\WINDOWS\system32\ntdll.dll
C:\WINDOWS\system32\msvcrt.dll
C:\WINDOWS\system32\USER32.dll
C:\WINDOWS\system32\GDI32.dll
$ cygcheck /usr/bin/g++.exe
C:\cygwin/bin\g++.exe
C:\cygwin/bin\cygwin1.dll
C:\WINDOWS\system32\ADVAPI32.DLL
C:\WINDOWS\system32\ntdll.dll
C:\WINDOWS\system32\KERN
b*******g
发帖数: 513
18
说说我干的东西吧,我装了 dev c++,compiler 我用MinGW,我也不懂到底该怎么装
compiler,就下载了一个MinGW,让它run,一步一步的。也不知道是不是应该在dev c++里
边装 MinGW?总之我的dev c++和MinGW是独立装的。不知这样对吗?如果不对,正确的
又是怎样的?然后我在dev里面,新建了一个project,打开这个project后看到一堆代码
。我也看不懂。就接着这堆代码写了一个最最简单的cpp程序:
#include
using namespace std;
int main ()
{
cout << "Hello World!";
return 0;
}
然后,我excute->compile &run
得到这样一些东西,在dev c++的底部:
[Linker error] undefined reference to `__cpu_features_init'
ld returned 1 exit status
F:\Dev-Cpp\Makefile.win [Build Error] [Proje
s*********h
发帖数: 6288
19
update 3
1) 安装git
2) 安装 gcc编译器 比如 mingw
3) 确认编译程序名为 make.exe,如果用的是mingw,把mingw32-make.exe改名为make.
exe
4) git clone --recursive https://github.com/dmlc/xgboost
cd xgboost; make -j4
5) 在xgboost 目录下 ./build.sh
6) 进入python-package 目录 python setup.py install
multiprocess的问题也“解决”了。以gridSearchCV为例,n_jobs=4比如
windows下forking有问题。需要把gridSearchCV放到 if __name__ = "__main__":下,
然后以script 运行。
============================================
update 2
xgboost是装好了,multiprocess似乎还是不行……
=====
update
1) 安装git
2) 安装 gcc... 阅读全帖
e******y
发帖数: 147
20
来自主题: Programming版 - 用eclipse的看过来
在装C++
已经装了eclipse 和 MinGW, 但是装完了之后,在toolchain 里面没有 MinGW。我在
网上也看到有人问这个问题,但是似乎都无解。
http://stackoverflow.com/questions/8607945/why-doesnt-mingw-sho
http://stackoverflow.com/questions/4138615/how-can-i-change-the
求大牛指导
g*******g
发帖数: 18
21
minGw C++ www.mingw.org
or Dev C++ will be suitalbe for you.
F***Q
发帖数: 6599
22
来自主题: Hardware版 - win上面有什么比较好的shell么?

调用
try cygwin64 terminal or msys
if you install cygwin, you should have cygwin64 terminal on your desktop
https://cygwin.com/install.html
if you install mingw, you may also have msys terminal.
http://www.mingw.org/wiki/msys
g*********s
发帖数: 1782
23
【 以下文字转载自 Programming 讨论区 】
发信人: gandjmitbbs (Nothing), 信区: Programming
标 题: Help: how to use Eclipse as C++ IDE in XP?
发信站: BBS 未名空间站 (Mon Jan 7 21:04:22 2008)
I've already download and installed Eclipse. Then I realized there's no C++
compiler installed in XP. So I googled and found it seemed MinGW would help.
However, after installing MinGW, I still cannot compile a simple "hello,
world" code.
Anyone can give suggestions, or give links about step-by-step instructions
how to install Eclipse
g*********s
发帖数: 1782
24
来自主题: Programming版 - Help: how to use Eclipse as C++ IDE in XP?
I've already download and installed Eclipse. Then I realized there's no C++
compiler installed in XP. So I googled and found it seemed MinGW would help.
However, after installing MinGW, I still cannot compile a simple "hello,
world" code.
Anyone can give suggestions, or give links about step-by-step instructions
how to install Eclipse and use it in XP, given a fresh XP installation?
Thanks a lot!
c*****t
发帖数: 1879
25
来自主题: Programming版 - Mysterious PgSQL 8.3 crash
试了 200,也不行。不是 stack 的问题。这个问题类似
char* foo = "abc";
foo[0] = 'd';
因为 official windows binary 是用 vc++ compiled,而我的 dll 是用
MinGW 编的,以为是这问题。但是我尝试用 MinGW 编译了 PgSQL 8.3 以
后也是同样的问题。
sigh,8.3 里刚好有我急切需要的 composite type array 支持,但是这
个问题让俺止步。俺这个程序在 8.2.6 上执行好好的,但是 8.2.6 没
composite type array 支持我下面要加的东西就没法写 :(
c*****t
发帖数: 1879
26
来自主题: Programming版 - Mysterious PgSQL 8.3 crash
Finally got it fixed. The new postgresql pre-compiled binary was
created using VC8 instead of MinGW which was used in previous versions,
so are the library files it bundles with it. I was using MinGW and
there are some incompatibilities between these two (particulary for
the vararg I guess). That's why some stuff works fine and some aren't.
Also, postgres re-defines sprintf etc to use its own routine, that's
why I was looking at the wrong place.
l*******G
发帖数: 1191
27
来自主题: Programming版 - makefile 里面那个-D flags的问题
-D is just a comment line way of defining flags
#define FLAGNAME
to be referenced in code with:
#if defined FLAGNAME
...work related to FLAGNAME ...
#endif
e.g. you can put the following in makefile:
#--------------
FORT := ifort
OS := $(shell uname -s | sed 's/[\/ ]/-/g')
OS := $(patsubst CYGWIN_%,CYGWIN,$(OS))
OS := $(patsubst MINGW%,MINGW,$(OS))
OS := $(patsubst sn%,UNICOS-sn,$(OS))
CPU := $(shell uname -m | sed 's/[\/ ]/-/g')
CPPFLAGS += -D$(shell echo ${OS} | tr "-" "_" | tr [a-z] [A-Z
a*******e
发帖数: 428
28
来自主题: Programming版 - develop linux apps on Windows
Hi, geeks,
Is there an easy way to develop Linux apps on Windows? I heard gcc +
cygwin (or MinGW) can do the job, but someone claims that cygwin or MinGW
are mainly for developing Windows apps on Linux. I am wondering if I can do
the reverse.
Any comments?
t*****n
发帖数: 4908
29
我真闲那,把这英文帖子都读完了。newpolice你们的程序可以在mingw下编译吗?如果
可以的话换gcc吧。我手上百万的C++和百万的C在mingw下跑的欢欢的,fresh build也
就十分钟以内的事。我都是Eclipse CDT写代码,Emacs下gcc编译和调试。偶尔用用grep。我机器已经2岁了,4G内存,够用了。

many
wind.
you
The
c*******y
发帖数: 1630
30
来自主题: Programming版 - 请教一个makefile 小问题
在mingw下的make,修改文件后,不管是h还是cpp文件,make都不重新编译啊。
试了加了dependency,还试了下载了makedepend,都不行。
每次改一点点,都得make clean & make, 太费时了。
经验不足,见笑。是不是mingw就不支持。
btw,是cmd下直接用make的,不是在cygwin下的bash里面用的。不得已,用这样的环境
b*********n
发帖数: 2284
31
来自主题: Programming版 - 求救
请高人指点。今天第一次装MinGW编译cpp程序,多线程的计算程序,需要用OpenMP。我
用 gcc -fopenmp xxxx.cpp 编译,结果有如下错误
c:/mingw/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/bin/ld.exe: cannot
find -lpthread
collect2.exe: error: ld returned 1 exit status
请教怎么解决,谢谢!
r****t
发帖数: 10904
32
来自主题: Programming版 - 求救
mingw does not support pthread. 到linux 下面玩吧。
there maybe third party pthread port to mingw, you can make the call whether
or not to invest time in using it.
m****e
发帖数: 488
33
来自主题: Programming版 - 求问C++问题
在windows下用C++,已经安装了MinGW和Eclipse。我需要用2个library,一个是gsl 另
外一个是armadillo 我把这些library的头文件已经拷到MinGW的include 目录下。然后
要运行我的C++ code用eclipse,但是出现如下错误信息
undefined reference to `gsl_ran_chisq'" and "launch failed binary not found"
这是怎么了,怎么才能弄好?
谢谢
s*********h
发帖数: 6288
34
update 2
xgboost是装好了,multiprocess似乎还是不行……
=====
update
1) 安装git
2) 安装 gcc编译器 比如 mingw
3) 确认编译程序名为 make.exe,如果用的是mingw,把mingw32-make.exe改名为make.
exe
4) git clone --recursive https://github.com/dmlc/xgboost
cd xgboost; make -j4
5) 在python里面添加path. sys.path.append(your_xgboost_path)
done。
===============================================
网上都说得自己编译,
需要找到一个xgboost.sln文件,问题是git上的文件夹下面没有这么一个文件。
用别人编译的xgboost似乎有无法使用multiprocess的问题。
请问大家在windows下怎么安装xgboost的?
F***Q
发帖数: 6599
35

because my desktop is that linux box. I am tired of windows, it is too
restrictive. I am sure with cygwin/mingw, you can do this as well.
here is my script:
-----------------------------------------------------------------------
#!/bin/sh
lynx -dump "http://boston.craigslist.org/search/sss?query=pentax" \
| grep -i 'pentax' | grep '\[' | sed -e 's/\[[0-9]*\]//g' |head -6 \
> /tmp/craigslist.today
NEWITEM=`diff /tmp/craigslist.today /tmp/craigslist.yesterday | wc -l`
if [ $NEWITEM != "0" ]; then... 阅读全帖
x****c
发帖数: 25662
36
no work to do a.
no visual studio, downloading mingw, see if I can use it.
d********g
发帖数: 10550
37
来自主题: PhotoGear版 - 想彻底放弃Windows了
Windows就搞自己那套还行,反正也没别的移植,没比较
webserver、database同样东西Windows版一般性能低不少。当然这也不能全怪Windows
,有些移植无法100%原生因为没有完全对应的库,只好mingw、cygwin转一遍,是要差些

高。
r*********r
发帖数: 3195
38
来自主题: PhotoGear版 - JOJO 全面粉果啊。。。
windows:
no ssh ! need putty, which sucks
no scp ! need winscp, which sucks
no terminal ! use cmd.exe, sucks big time
no gcc ! use mingw, cygwin, which suck
no gzip ! need winzip, winrar (use unregistered version?)
no postscript printer ! need ghostscript/ghostview, which sucks
mac os x: has everything
x5
发帖数: 27871
39
来自主题: PhotoGear版 - [合集] JOJO 全面粉果啊。。。
☆─────────────────────────────────────☆
product (MITBBS 首席 thinkpadfans) 于 (Sat Oct 27 23:34:28 2012, 美东) 提到:
看来就等上rmbp 凑够果子三件套了
☆─────────────────────────────────────☆
skydive (跳跳~~修竹凝妆,垂杨驻马) 于 (Sat Oct 27 23:35:08 2012, 美东) 提到:
果子的iOS设备我有 iphone 5个,ipad 2个,apple TV一个。。。
呵呵,不过我坚决不碰mac OS ..

☆─────────────────────────────────────☆
product (MITBBS 首席 thinkpadfans) 于 (Sat Oct 27 23:37:30 2012, 美东) 提到:
这是为啥呢?
好像你也是粉高分IPS屏的啊?
山狮子系统太烂?
☆─────────────────────────────────────☆
daye52... 阅读全帖
z***i
发帖数: 8285
40
谢包子。这个你装个MinGW,win下面就能用了

刚看了一下,这个是unix下的啊
怪不得,当初只有温都是
不过当初用过别的,比如ads,只不过算得比较慢,用了一天一夜还没算完
x*******n
发帖数: 185
41
do you know openmp? go with that
if you code in C/C++, both mingw and microsoft visual c has openmp supported.
if you code in matlab, use mex to code in c.
s*****e
发帖数: 21415
42
来自主题: Apple版 - 说说苹果几个弱智的地方
您做梦呢,直接run X
mac缺省有x server吗?
windows 下面 cygwin , mingw, xming, colinux之类的也一大堆
i**h
发帖数: 424
43
I would be very happy if my mingw gdb has a GUI.
r*******e
发帖数: 971
44
rt Visual Studio可以排除,于是要么裸奔(这个难度大了点)要么还得去找Eclipse
的CDT
eclipse的CDT不带编译器,这个很讨厌。Windows下是用MinGW解决的。
MacOS下面怎么弄呢??
a9
发帖数: 21638
45
来自主题: Apple版 - 准备换回PC了
那是mingw吧
N**g
发帖数: 5
46
怎么安装? GOOGLE, BAIDU上面找不到,只好麻烦大侠们了!
弄了几天,连"HELLOWORLD"都出不来.
谢谢!
m***a
发帖数: 38
RR
发帖数: 561
48
来自主题: CS版 - Help, install C++ compiler
you can use cygwin or mingw
l********a
发帖数: 1154
49
visual studio
or
MinGW-w64 GCC for both x64 & x86 Windows!
l****g
发帖数: 761
50
linux -> g++
windows -> mingw
1 2 3 下页 末页 (共3页)