Full stack programmer new toy Rust (four) first graphics program

Rust now as a full-stack development tools, at least the following parts are to be made.

operating system

server

Client

Web

 

Start with the client, huh, I am familiar with SDL go from slightly

First, go first to the library, download a lot of this back, it should be quite stable

image

Zhaomaohuahu results, compile a bunch of gibberish error, check error id know lib file is not found.

A look simply not relevant to sdl2 lib and dll download back.

According to experience a meal toss, download their own finally compiled, but it feels wrong ah, ah without such a play.

Finally https://github.com/Rust-SDL2/rust-sdl2

Find instructions on github project

The first download vc related libraries, rust in the default windows with vc linker, so the next vc

image

Second create a directory and put into place lib and dllcopy

image

 

The third modification cargo.toml

image

Add a build script

image

This is not involved in compiling the script only as a secondary copy files to compile

Code in this project, if you want to do with rust sdl under windows, this can build pull down

https://gitee.com/lightsever/rust_study/tree/master/hello03

 

image

Source code is also relatively simple, just open a sdl window, and has been changing his background color.

SDL is a cross-platform multimedia library that can engage 2d 3d graphics, sound play them.

It's just an environment.

The first full-stack environments rust toss again, getting to know.

Guess you like

Origin www.cnblogs.com/crazylights/p/12116755.html