Error with QNetworkSession::interface()
-
@LeLev Do you have a macro in rpc.h called "interface"?
-
@LeLev Can you post the whole build log?
-
@LeLev said in Error with QNetworkSession::interface():
how to find rpc.h ?
For me its present in
C:\Qt\Qt5.9.3\Tools\mingw530_32\i686-w64-mingw32\include
and 12 th line says#define interface struct
-
C:/Qt/Tools/mingw730_64/bin/mingw32-make -f Makefile.Release mingw32-make[1]: Entering directory 'C:/Users/lev/Documents/build-udp_inspector-Desktop_Qt_5_12_0_MinGW_64_bit-Release' g++ -c -fno-keep-inline-dllexport -O2 -std=gnu++11 -Wall -W -Wextra -fexceptions -mthreads -DUNICODE -D_UNICODE -DWIN32 -DMINGW_HAS_SECURE_API=1 -DQT_DEPRECATED_WARNINGS -DQT_NO_DEBUG -DQT_QUICK_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_NEEDS_QMAIN -I..\CN16K_Spyer -I. -I..\LIB\SSH_Lib\SSH_files -I..\CN16K_SFTP -I..\..\..\..\Qt\5.12.0\mingw73_64\include -I..\..\..\..\Qt\5.12.0\mingw73_64\include\QtQuick -I..\..\..\..\Qt\5.12.0\mingw73_64\include\QtWidgets -I..\..\..\..\Qt\5.12.0\mingw73_64\include\QtGui -I..\..\..\..\Qt\5.12.0\mingw73_64\include\QtANGLE -I..\..\..\..\Qt\5.12.0\mingw73_64\include\QtQml -I..\..\..\..\Qt\5.12.0\mingw73_64\include\QtNetwork -I..\..\..\..\Qt\5.12.0\mingw73_64\include\QtCore -Irelease -I\include -I..\..\..\..\Qt\5.12.0\mingw73_64\mkspecs\win32-g++ -o release\main.o ..\CN16K_Spyer\main.cpp In file included from C:/Qt/Tools/mingw730_64/x86_64-w64-mingw32/include/oleidl.h:7:0, from C:/Qt/Tools/mingw730_64/x86_64-w64-mingw32/include/ole2.h:38, from C:/Qt/Tools/mingw730_64/x86_64-w64-mingw32/include/wtypes.h:12, from C:/Qt/Tools/mingw730_64/x86_64-w64-mingw32/include/winscard.h:10, from C:/Qt/Tools/mingw730_64/x86_64-w64-mingw32/include/windows.h:97, from C:/Qt/Tools/mingw730_64/x86_64-w64-mingw32/include/winsock2.h:23, from ..\LIB\SSH_Lib\SSH_files/libssh.h:64, from ..\LIB\SSH_Lib\SSH_files/sftp.h:42, from ..\CN16K_SFTP/cn16k_sftp.h:7, from ..\CN16K_Spyer\fileloader.h:7, from ..\CN16K_Spyer\main.cpp:11: ..\CN16K_Spyer\main.cpp: In function 'int qMain(int, char**)': ..\CN16K_Spyer\main.cpp:33:38: error: expected unqualified-id before 'struct' QNetworkInterface intr = session.interface(); ^ mingw32-make[1]: *** [Makefile.Release:767: release/main.o] Error 1 mingw32-make[1]: Leaving directory 'C:/Users/lev/Documents/build-udp_inspector-Desktop_Qt_5_12_0_MinGW_64_bit-Release' mingw32-make: *** [Makefile:36: release] Error 2 11:33:31: Le processus "C:\Qt\Tools\mingw730_64\bin\mingw32-make.exe" s'est terminé avec le code 2. Erreur lors de la compilation/déploiement du projet udp_inspector (kit : Desktop Qt 5.12.0 MinGW 64-bit) When executing step "Make"
-
@LeLev said in Error with QNetworkSession::interface():
QNetworkInterface intr = session.interface();
Is it a typo? Should be int not intr.
-
@LeLev Forget my comment, somehow I managed to read this line in a wrong way :-)
-
@LeLev
Error with QNetworkSession::interface():Do you have a macro in rpc.h called "interface"?
Can you check this ?
-
@LeLev This is strange. You're not building for MacOS.
__OBJC__
is defined when building for MacOS, see https://stackoverflow.com/questions/2054669/objc-in-objective-c
-
@LeLev Do you have anything related to MacOS in your pro file?
11/16