小编Fed*_*omp的帖子

将Rust应用程序从Linux交叉编译到Windows

基本上我正在尝试将最简单的代码编译到Windows,而我正在Linux上进行开发.

fn main() {
    println!("Hello, and bye.")
}
Run Code Online (Sandbox Code Playgroud)

我通过搜索互联网找到了这些命令:

rustc --target=i686-w64-mingw32-gcc  main.rs
rustc --target=i686_pc_windows_gnu -C linker=i686-w64-mingw32-gcc  main.rs
Run Code Online (Sandbox Code Playgroud)

可悲的是,他们都没有工作.它给我一个关于std crate丢失的错误

$ rustc --target=i686_pc_windows_gnu -C linker=i686-w64-mingw32-gcc  main.rs 

main.rs:1:1: 1:1 error: can't find crate for `std`
main.rs:1 fn main() {
          ^
error: aborting due to previous error
Run Code Online (Sandbox Code Playgroud)

有没有办法在Linux上编译将在Windows上运行的代码?

linux windows cross-compiling rust

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

Python:如何在Windows 7 x64上安装mysqldb?

我尝试在Windows x64上安装Mysql-python.

我安装了python x64,setuptools(在叶子上检查,成功安装)但我无法安装mysqldb.我试图执行

C:\ Users\Fedcomp\Desktop\leaf-0.4\MySQL-python-1.2.3> python setup.py install

但赶上这个

In file included from _mysql.c:34:
D:\servers\xampp_server\xampp\mysql\include/config-win.h:211:1: warning: "finite
" redefined
D:\servers\xampp_server\xampp\mysql\include/config-win.h:164:1: warning: this is
 the location of the previous definition
D:\servers\xampp_server\xampp\mysql\include/config-win.h:277:1: warning: "HAVE_S
TDDEF_H" redefined
In file included from D:\Python27\include/Python.h:8,
                 from pymemcompat.h:10,
                 from _mysql.c:29:
D:\Python27\include/pyconfig.h:673:1: warning: this is the location of the previ
ous definition
error: command 'gcc' failed with exit status 1
Run Code Online (Sandbox Code Playgroud)

也尝试用msvc但是赶上这个(MS Visual express安装)

C:\Users\Fedcomp\Desktop\leaf-0.4\MySQL-python-1.2.3>python setup.py …
Run Code Online (Sandbox Code Playgroud)

python mysql 64-bit windows-7

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

如何在cmake中链接winsock?

我发现只有这个字符串

    find_library(WSOCK32_LIBRARY wsock32)
    find_library(WS2_32_LIBRARY ws2_32)
Run Code Online (Sandbox Code Playgroud)

(我是cmake的初学者)如何在cmake中链接winsock2(winsock?)?

c++ winsock cmake

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

找到gzip的开始和结束?

我有一些文件,有一些随机字节和多个gzip文件.如何在某个文件中找到gzip流的开始和结束?gzip流之间有很多随机字节.所以,基本上我需要找到任何gzip文件并从那里获取它.

gzip file archive

6
推荐指数
2
解决办法
6525
查看次数

解析类似JSON的标记

老实说,我不知道这是什么标记(我想知道这个标记是否有名称).什么是最简单的解析这样的结构的方法?我在txt文件中有很多这些.

unlockType BirthdayCake {
       // Don't delete
    commonName      "Birthday Cake"
    autoTag
    category        Item
    path            models/
    timedExclusive  1
    descSymbol      BirthdayCakeDesc
    dispSymbol      BirthdayCakeDisp
    flairCfg        "Cake/Idle.aaf mat_BirthdayCake< /scale 1.5 /animation Cake/Idle.aaf 0 looping 0.8  /followDist 3.0 /moveSlew 0.0666  /moveVelThresh 10.0 /animEaseTime 1.0 /zOffRobot 2.7 /rotX 20.0 /zSpinDef bone_spinA 80.0"
    //OnInspectOrUnlock Menus previewInit Cake/Idle.aaf BirthdayCake< /scale 1.5 /animation Cake/Idle.aaf 0 looping 0.8 /rotSpeed 30 /pos 3.5 0 1 /scaleMult 1.0
    property        BirthdaySpirit          10
}
Run Code Online (Sandbox Code Playgroud)

php regex

5
推荐指数
2
解决办法
139
查看次数

使用Boost.asio和cmake?

我想静态链接boost.asio到我没有外部库的小项目(在结果中只有单个exe/bin文件来分发它).Boost.asio需要Boost.system,我开始淹死试图弄清楚如何编译这一切.如何在cmake中使用Boost.asio?

c++ boost cmake boost-asio

3
推荐指数
1
解决办法
6374
查看次数

标签 统计

c++ ×2

cmake ×2

64-bit ×1

archive ×1

boost ×1

boost-asio ×1

cross-compiling ×1

file ×1

gzip ×1

linux ×1

mysql ×1

php ×1

python ×1

regex ×1

rust ×1

windows ×1

windows-7 ×1

winsock ×1