Derleme ve Bağlama
Aşağıdaki derleme dosyası, istemci ve sunucu uygulamalarını derlemek ve bunları RPC çalışma zamanı kitaplığına ve standart C çalışma zamanı kitaplığına bağlamak için gereken dosyalar arasındaki bağımlılıkları gösterir.
Bu derleme dosyası, bu öğreticideki kaynak kodundan istemci ve sunucu uygulamaları oluşturmak için kullanılabilir. Burada gösterilen saplamalar ve üst bilgiler MIDL sürüm 2.0 ile oluşturulmuştur. Derleyici ve bağlayıcı komutları ile bağımsız değişkenler, bilgisayarınızın yapılandırmasına bağlı olarak farklı olabilir. Daha fazla bilgi için derleyici belgelerinize bakın.
#makefile for helloc.exe and hellos.exe
#link refers to the linker
#conflags refers to flags for console applications
#conlibs refers to libraries for console applications
!include <ntwin32.mak>
all : helloc hellos
# Make the client side application helloc
helloc : helloc.exe
helloc.exe : helloc.obj hello_c.obj
$(link) $(linkdebug) $(conflags) -out:helloc.exe \
helloc.obj hello_c.obj \
rpcrt4.lib $(conlibs)
# helloc main program
helloc.obj : helloc.c hello.h
$(cc) $(cdebug) $(cflags) $(cvars) $*.c
# helloc stub
hello_c.obj : hello_c.c hello.h
$(cc) $(cdebug) $(cflags) $(cvars) $*.c
# Make the server side application
hellos : hellos.exe
hellos.exe : hellos.obj hellop.obj hello_s.obj
$(link) $(linkdebug) $(conflags) -out:hellos.exe \
hellos.obj hello_s.obj hellop.obj \
rpcrt4.lib $(conlibsmt)
# hello server main program
hellos.obj : hellos.c hello.h
$(cc) $(cdebug) $(cflags) $(cvarsmt) $*.c
# remote procedures
hellop.obj : hellop.c hello.h
$(cc) $(cdebug) $(cflags) $(cvarsmt) $*.c
# hellos stub file
hello_s.obj : hello_s.c hello.h
$(cc) $(cdebug) $(cflags) $(cvarsmt) $*.c
# Stubs and header file from the IDL file
hello.h hello_c.c hello_s.c : hello.idl hello.acf
midl hello.idl