-
Notifications
You must be signed in to change notification settings - Fork 81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
error: use of undeclared identifier 'SIP_NULLPTR' #92
Comments
|
@Ghostkeeper 4.19.14. I figure out that my gcc version is 4.2.1 ,should I update it to the newer one? |
Oh yeah that could help. We build it using GCC 4.9 on our build server (and I'm using 8.2 in my development environment). As far as I know we've always required version 4.9.2 or higher. |
@Ghostkeeper I found that My sip version is 4.19.8. It's up to date from homebrew. What should I do to solve this problem? I update GCC version to GCC5.But this problem still happen. |
I looked it up, now, and I'm using SIP 4.19.12, but it shouldn't matter much. I think that your problem is more along the lines of that it's using a different version of SIP to generate the C++ source code than the SIP headers that get linked to that source code. I don't know how to debug that for you though. It needs a lot of rummaging around through CMake. |
For some reason libArcus always uses the global SIP, not the one from the current env. The workaround is to uninstall SIP from Homebrew (because it is outdated!), and install SIP 4.19.14+ from source into the global Python env. I don't know how to fix that from the CMake files. |
Did you see if you could change the following CMake variables:
|
I encountered this myself today. The solution was to dig into the CMake parameters (toggle advanced) and make sure that Like Fulg says, for some reason it always finds the Sip executable installed on my system. But it does snap to the Sip headers in my installation folder as desired. If the two are incompatible you'll get this error. |
(Python_3.5.2-PyQt_5.10) zhoudeMacBook-Pro:build zhou$ cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$VIRTUAL_ENV -DCMAKE_PREFIX_PATH=$VIRTUAL_ENV -DBUILD_STATIC=ON -DBUILD_PYTHON=ON -DBUILD_EXAMPLES=OFF ..
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/zhou/Documents/cura-environment/libArcus-master/build
(Python_3.5.2-PyQt_5.10) zhoudeMacBook-Pro:build zhou$ make -j4
[ 35%] Built target Arcus
[ 47%] Building CXX object CMakeFiles/python_module_Arcus.dir/python/sipArcuspart1.cpp.o
[ 47%] Building CXX object CMakeFiles/python_module_Arcus.dir/python/sipArcuspart2.cpp.o
[ 58%] Building CXX object CMakeFiles/python_module_Arcus.dir/python/sipArcuspart3.cpp.o
[ 58%] Building CXX object CMakeFiles/python_module_Arcus.dir/python/sipArcuspart0.cpp.o
In file included from In file included from In file included from /Users/zhou/Documents/cura-environment/libArcus-master/build/python/sipArcuspart0.cpp/Users/zhou/Documents/cura-environment/libArcus-master/build/python/sipArcuspart3.cpp::1010:
:
/Users/zhou/Documents/cura-environment/libArcus-master/build/python/sipArcuspart2.cpp:10:
In file included from /Users/zhou/Documents/cura-environment/libArcus-master/build/python/sipArcuspart1.cpp:10:
/Users/zhou/Documents/cura-environment/libArcus-master/build/python/sipAPIArcus.h/Users/zhou/Documents/cura-environment/libArcus-master/build/python/sipAPIArcus.h::163163::99:: warningwarning: : /Users/zhou/Documents/cura-environment/libArcus-master/build/python/sipAPIArcus.h:163:9: warning:
'sipConvertFromSliceObject'
'sipConvertFromSliceObject' macromacro redefinedredefined [-Wmacro-redefined][-Wmacro-redefined]
/Users/zhou/Documents/cura-environment/libArcus-master/build/python/sipAPIArcus.h:163:9: warning:
'sipConvertFromSliceObject' macro redefined [-Wmacro-redefined]
'sipConvertFromSliceObject' macro redefined [-Wmacro-redefined]
#define sipConvertFromSliceObject sipAPI_Arcus->api_convert_from_slice_object#define sipConvertFromSliceObject sipAPI_Arcus->api_convert_from_slice_object#define sipConvertFromSliceObject sipAPI_Arcus->api_convert_from_slice_object
#define sipConvertFromSliceObject sipAPI_Arcus->api_convert_from_slice_object
/usr/local/include/sip.h:2021:9: note: previous definition is here
/usr/local/include/sip.h#define sipConvertFromSliceObject PySlice_GetIndicesEx:
2021:9
/usr/local/include/sip.h:2021note:: 9:previous definition noteis: hereprevious
definition is here
#define sipConvertFromSliceObject PySlice_GetIndicesEx
#define sipConvertFromSliceObject PySlice_GetIndicesEx
/usr/local/include/sip.h:2021:9: note: previous definition is here
#define sipConvertFromSliceObject PySlice_GetIndicesEx
/Users/zhou/Documents/cura-environment/libArcus-master/build/python/sipArcuspart3.cpp:29:9: error: use
of undeclared identifier 'SIP_NULLPTR'
SIP_NULLPTR,
What I should do to solve this problem?Thanks!
The text was updated successfully, but these errors were encountered: