MinGW sees no WinAPI function



  • I wrote my bike file for the Vindows, I use WinApi functions in the fodder files, but by making a team make at MinGW, it doesn't want to create a complete file. How do you connect WINApi to MinGw see them?

    введите сюда описание изображения WinMake.txt:

    CC=g++
    CFLAGS=-c 
    CLIBS = -lws2_32
    win: sniffer.exe
    

    sniffer.exe: main.o WinSniffer.o
    $(CC) main.o WinSniffer.o $(CLIBS) -lws2_32 -o Sniffer
    main.o: main.cpp
    $(CC) $(CFLAGS) main.cpp $(CLIBS)

    WinSniffer.o: WinSniffer.cpp _WINSniffer.h
    $(CC) $(CFLAGS) WinSniffer.cpp $(CLIBS)
    clean:
    rm *.o sniffer sniffer.exe -v



  • Add.

    #include <Windows.h>
    

    If it doesn't work, update MinGW until http://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/Personal%20Builds/mingw-builds/ ♪

    Just make sure there's no code. #define WIN32_LEAN_AND_MEAN


Log in to reply
 


Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2