首页| 论坛| 消息

回复: 安防-报警联动管理平台源码发放
#11 [mxcai2005 05-13 18:11]
用户名: admin
密码: admin
要把ams 放到File 目录下运行,不然会提示少文件
改了一些东西,解决编译出错及中文乱码的问题,另外把QSharedMemory 关掉了,不然运行一次之后再次运行会提示运行已经在运行,应该是内存没清空造成的,在ubuntu 12.04 下 qt4.8.2 编译通过


还是谢谢 楼主的分享
#12 回 mxcai2005 的帖子 [liudianwu 05-14 14:50]
mxcai2005:用户名: admin
密码: admin
要把ams 放到File 目录下运行,不然会提示少文件
改了一些东西,解决编译出错及中文乱码的问题,另外把QSharedMemory 关掉了,不然运行一次之后再次运行会提示运行已经在运行,应该是内存没清空造成的,在ubuntu 12.04 下 qt4.8.2 编译通过
 (2014-05-13 18:11) 
感谢兄弟这么仔细的测试,尽管测试结果说明不大正确,呵呵!FILE文件夹下的文件是用来复制到可执行文件生成目录的,例如AMS为数据库文件,MAP为对应地图文件等。默认采用的UTF-8编码,QSharedMemory就是为了限定一个程序重复运行的,而不是你描述的BUG:应该是内存没清空造成的?
#13 回 liudianwu 的帖子 [mxcai2005 05-14 15:17]
liudianwu:感谢兄弟这么仔细的测试,尽管测试结果说明不大正确,呵呵!FILE文件夹下的文件是用来复制到可执行文件生成目录的,例如AMS为数据库文件,MAP为对应地图文件等。默认采用的UTF-8编码,QSharedMemory就是为了限定一个程序重复运行的,而不是你描述的BUG:应该是内存没清空造成的? (2014-05-14 14:50) 
呵呵
QSharedMemory就是为了限定一个程序重复运行的, 可我在terminal 上运行之后,关掉再运行就提示出有一个程序在运行,莫非QSharedMemory 对linux 支持不好,真心不懂 求教
#14 [mxcai2005 05-14 15:19]
Windows: QSharedMemory does not "own" the shared memory segment. When all threads or processes that have an instance of QSharedMemory attached to a particular shared memory segment have either destroyed their instance of QSharedMemory or exited, the Windows kernel releases the shared memory segment automatically.
Unix: QSharedMemory "owns" the shared memory segment. When the last thread or process that has an instance of QSharedMemory attached to a particular shared memory segment detaches from the segment by destroying its instance of QSharedMemory, the Unix kernel release the shared memory segment. But if that last thread or process crashes without running the QSharedMemory destructor, the shared memory segment survives the crash.
HP-UX: Only one attach to a shared memory segment is allowed per process. This means that QSharedMemory should not be used across multiple threads in the same process in HP-UX.
#15 [mxcai2005 05-14 15:37]
linux下估计得捕捉信号 然后再 deatch();

<< 1 2 3 4 5 >> (3/15)

回复 发表
主题 版块