Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

i'm trying to compile the quantum gis sources code following the step by step how to compile guide, but i'm facing an error when code is linked.

I'm compiling in Windows 7 x64 in Microsoft Visual Studio 2010 Professional and i'm using the environment variables created by OSGeo4W.bat file.

The exact message error is this one:

1>     Creating library C:/qgis-1.7.4/build/src/core/RelWithDebInfo/qgis_core.lib and object C:/qgis-1.7.4/build/src/core/RelWithDebInfo/qgis_core.exp
1>qgssearchstring.obj : error LNK2019: unresolved external symbol "class QgsSearchTreeNode * __cdecl parseSearchString(class QString const &,class QString &)" (?parseSearchString@@YAPAVQgsSearchTreeNode@@ABVQString@@AAV2@@Z) referenced in function "public: bool __thiscall QgsSearchString::setString(class QString)" (?setString@QgsSearchString@@QAE_NVQString@@@Z)
1>flex_qgssearchstringlexer.obj : error LNK2001: unresolved external symbol "union YYSTYPE yylval" (?yylval@@3TYYSTYPE@@A)
1>C:\qgis-1.7.4\build\src\core\RelWithDebInfo\qgis_core.dll : fatal error LNK1120: 2 unresolved externals

When i compile the qgssearchstringparser.cpp.rule with diagnostic i have the following messages! The problem is from bison compilation? It as bison conflicts shift reduce. How can i resolve them?

1> C:\Progra~2\GnuWin32\bin\bison.exe -oC:/qgis-1.7.4/build/src/core/qgssearchstringparser.cpp -d -v -t C:/qgis-1.7.4/src/core/qgssearchstringparser.yy 1> if errorlevel 1 goto :VCEnd (TaskId:11) 1> Generating qgssearchstringparser.cpp (TaskId:11) 1> C:\Progra~2\GnuWin32/share/bison/yacc.c:158: m4: Warning: Excess arguments to built-in _m4_popdef' ignored (TaskId:11) 1> C:\Progra~2\GnuWin32/share/bison/yacc.c:1071: m4: Warning: Excess arguments to built-in_m4_popdef' ignored (TaskId:11) 1> C:\Progra~2\GnuWin32/share/bison/yacc.c:1740: m4: Warning: Excess arguments to built-in `_m4_popdef' ignored (TaskId:11) 1> C:\Progra~2\GnuWin32/share/bison/yacc.c:1741: error: m4_divert_pop(0): diversion mismatch: (TaskId:11) 1> C:\Progra~2\GnuWin32/share/bison/yacc.c:155: m4_divert_push: 0 (TaskId:11) 1> stdin:1: m4_divert_push: KILL (TaskId:11) 1> C:\Progra~2\GnuWin32/share/bison/yacc.c:1741: the top level (TaskId:11) 1> C:/qgis-1.7.4/src/core/qgssearchstringparser.yy: conflitos: 15 de deslocamento/reduþÒo (TaskId:11)

share|improve this question
    
It's advisable to follow the build instructions hub.qgis.org/projects/quantum-gis/repository/revisions/master/…. –  underdark May 3 '12 at 11:02
1  
i corrected this issue editing qgssearchstringparser.cpp.rule properties option and adding the parameter option -LC++ to the command line that his being run to generate the file. –  Marco May 3 '12 at 13:01

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.