2013-08-06 49 views
0

因爲我需要做一些PostgreSQL的擴展。我想在codeblock中編譯源代碼。我創建了一個項目文件並遞歸添加了源代碼。重建後,它會報告這樣的錯誤。我認爲應該是鏈接地址錯誤,我應該填寫鏈接地址和包含地址的地址是什麼?謝謝。如何配置在codeblock中編譯postgresql?

ubescan.l: In function 'cube_yylex': 
cubescan.l:46:1: error: 'yylval' undeclared (first use in this function) 
cubescan.l:46:1: note: each undeclared identifier is reported only once for each function it appears in 
cubescan.l:46:30: error: 'CUBEFLOAT' undeclared (first use in this function) 
cubescan.l:47:22: error: 'O_BRACKET' undeclared (first use in this function) 
cubescan.l:48:22: error: 'C_BRACKET' undeclared (first use in this function) 
cubescan.l:49:22: error: 'O_PAREN' undeclared (first use in this function) 
cubescan.l:50:22: error: 'C_PAREN' undeclared (first use in this function) 
cubescan.l:51:22: error: 'COMMA' undeclared (first use in this function) 
cubescan.l: In function 'cube_scanner_init': 
cubescan.l:97:2: error: 'scanbuflen' undeclared (first use in this function) 
cubescan.l:98:2: error: 'scanbuf' undeclared (first use in this function) 
+1

你有[從源代碼安裝]閱讀PostgreSQL的說明書中的章節上(http://www.postgresql.org/docs/ current/interactive/installation.html)或[從Windows源代碼安裝](http://www.postgresql.org/docs/current/interactive/install-windows.html)?另外,你確定你的修改需要源代碼編譯嗎? Postgres提供了大量[擴展功能的機制](http://www.postgresql.org/docs/current/interactive/server-programming.html),其中大多數不需要編譯整個源代碼。 – IMSoP

+0

關於擴展功能,你到底想要做什麼? –

回答

0

它看起來像你對我試圖語法加CUBE(也許ROLLUP)到PostgreSQL。如果是這種情況,並且如果您正在努力爲PostgreSQL做出貢獻,那麼這可能是錯誤的地方。更好的方法是使用PostgreSQL電子郵件列表,特別是pgsql-hacker,並在那裏討論你的設計。如果有文檔IMSOP指出你不完整的地方,那將是最好的地方。

你應該問那裏而不是這裏的原因不僅僅是你可以期待的技術問題的幫助,而是社區在討論設計實施之前讚賞一些聯繫。 PostgreSQL有着強烈的同行評審文化,社區期望CUBE/ROLLUP功能,或者至少在我上次查看時是在TODO上。與其他開發人員一起工作是完成這種事情的最佳方式。

(請原諒我,如果這個答案聽起來太像「大眼夾」)