Giter Site home page Giter Site logo

Comments (6)

pstavirs avatar pstavirs commented on June 2, 2024 1

You need to build libprotobuf for Windows yourself and set the CPLUS_INCLUDE_PATH and LIBRARY_PATH env vars appropriately as given in the Build Instructions

Or you might skip all that and buy the pre-packaged Ostinato for Windows installer directly which is much more easier :-D

from ostinato.

typzzh avatar typzzh commented on June 2, 2024

error: cast between incompatible function types from 'FARPROC' {aka 'int (attribute((stdcall)) )()'} to 'DWORD (attribute((stdcall)) )(const GUID, PNET_LUID)' {aka 'long unsigned int (attribute((stdcall)) )(const _GUID, _NET_LUID)'} [-Werror=cast-function-type] hDll ? reinterpret_cast<decltype(&function)> (GetProcAddress(hDll, #function)) : NULL;

from ostinato.

pstavirs avatar pstavirs commented on June 2, 2024

Please share the full build log.

FYI, the build instructions are at https://devguide.ostinato.org/build-instructions/

from ostinato.

typzzh avatar typzzh commented on June 2, 2024

Thanks pstavirs, Appreciate!

this is the full build log:
ostinato_compile.txt

portmanager.cpp: In member function 'pcap_if_t* PortManager::GetPortList()':
portmanager.cpp:45:82: error: cast between incompatible function types from 'FARPROC' {aka 'int (attribute((stdcall)) )()'} to 'DWORD (attribute((stdcall)) )(const GUID, PNET_LUID)' {aka 'long unsigned int (attribute((stdcall)) )(const _GUID, _NET_LUID)'} [-Werror=cast-function-type]
hDll ? reinterpret_cast<decltype(&function)> (GetProcAddress(hDll, #function)) : NULL;
^
portmanager.cpp:180:22: note: in expansion of macro 'MyGetProcAddress'
auto guid2Luid = MyGetProcAddress(ipHlpApi_, ConvertInterfaceGuidToLuid);
^~~~~~~~~~~~~~~~
portmanager.cpp:45:82: error: cast between incompatible function types from 'FARPROC' {aka 'int (attribute((stdcall)) )()'} to 'DWORD (attribute((stdcall)) )(const NET_LUID, PWSTR, SIZE_T)' {aka 'long unsigned int (attribute((stdcall)) )(const _NET_LUID, wchar_t, long unsigned int)'} [-Werror=cast-function-type]
hDll ? reinterpret_cast<decltype(&function)> (GetProcAddress(hDll, #function)) : NULL;
^
portmanager.cpp:181:23: note: in expansion of macro 'MyGetProcAddress'
auto luid2Alias = MyGetProcAddress(ipHlpApi_, ConvertInterfaceLuidToAlias);
^~~~~~~~~~~~~~~~
cc1plus.exe: all warnings being treated as errors

from ostinato.

typzzh avatar typzzh commented on June 2, 2024

@pstavirs Now I encountered following building problems in windows. cannot find -lprotobuf

mingw32-make[2]: Entering directory 'C:/cppqt/ostinato/server'
g++ -static -Wl,-subsystem,console -mthreads -o debug\drone.exe @object_script.drone.Debug -lwpcap -lpacket -liphlpapi -L..\common\debug -lostproto -L..\rpc\debug -lpbrpc -lm -LC:\cppqt\protobuf-cpp-3.20.2\build -lprotobuf C:\Qt\5.15.2\mingw81_32\lib\libQt5Network.a C:\Qt\5.15.2\mingw81_32\lib\libQt5Script.a C:\Qt\5.15.2\mingw81_32\lib\libQt5Xml.a C:\Qt\5.15.2\mingw81_32\lib\libQt5Core.a
C:/Qt/Tools/mingw810_32/bin/../lib/gcc/i686-w64-mingw32/8.1.0/../../../../i686-w64-mingw32/bin/ld.exe: cannot find -lprotobuf
collect2.exe: error: ld returned 1 exit status
mingw32-make[2]: *** [Makefile.drone.Debug:159: debug/drone.exe] Error 1
mingw32-make[2]: Leaving directory 'C:/cppqt/ostinato/server'
mingw32-make[1]: *** [Makefile.drone:45: debug] Error 2
mingw32-make[1]: Leaving directory 'C:/cppqt/ostinato/server'
mingw32-make: *** [Makefile:88: server-make_first] Error 2
mingw32-make: *** Waiting for unfinished jobs....

from ostinato.

typzzh avatar typzzh commented on June 2, 2024

Thanks pstavirs! good idea !

from ostinato.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.