% cat a.c typedef struct X X; struct X { float f; int d; }; void setf_(X *x) { x->f = 1.8; } void setd_(X*); void setd2_(X *x) { setd_(x); } % cat xmod.f90 module xmod type X real :: f integer :: d end type end module subroutine setd(tx) use xmod type(X) :: tx tx%d = 18 end subroutine % cat b.f90 program B use xmod type(X) :: tx call setf(tx) call setd2(tx) print *, tx end program % gcc -c a.c; ifort -c xmod.f90; ifort -c b.f90; ifort -o ab a.o b.o xmod.o; ./ab 1.800000 18
20130614
Interoperabilidade entre C e Fortran 90
20130609
Ubuntu 12.10 sem NetworkManager usando rede WPA2
# rfkill 0 unblock # rfkill 1 unblock # wpa_passphrase ssid pwd >ssid.conf # wpa_supplicand -D wext -i wlan0 -c ssid.confSe isso funcionar, adicionar a /etc/network/interfaces:
auto wlan0 iface wlan0 inet dhcp wpa-ssid ssid wpa-psk pwd
Assinar:
Postagens (Atom)