Re: gcc ignoring defined macros?
От | Adam H. Pendleton |
---|---|
Тема | Re: gcc ignoring defined macros? |
Дата | |
Msg-id | 3F81A5A3.9020600@fmonkey.net обсуждение исходный текст |
Ответ на | Re: gcc ignoring defined macros? ("Dave Page" <dpage@vale-housing.co.uk>) |
Список | pgadmin-hackers |
Dave Page wrote:
ahp
I was about to fix this, when I realized that I was about to add -DSSL to the command-line for *all* situations. Is this what we want, or is this supposed to be a conditional compile option? If it's needed for *all* situations, then why included it at all, why not just remove the #ifdefs and always compile the SSL code?Ah-ha!! Right, I editted the line in src/Makefile that compiles frmConnect.cpp. I added -DSSL so the final command read: if g++ -DSSL -DHAVE_CONFIG_H -I. ........ And that works. :-) Further investigation of the command line: if g++ -DHAVE_CONFIG_H -I. -I. -I.. -DDATA_DIR=\"/usr/local/pgadmin3/share/pgadmin3/\" -Wall -g -I../src/include -I../src/agent/include -I -DSSL -I/usr/local/pgsql/include -I/usr/local/lib/wx/include/gtk2ud-2.5 -D__WXDEBUG__ -D__WXGTK__ -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -I/usr/local/include -DDATA_DIR=\"/usr/local/pgadmin3/share/pgadmin3/\" -Wall -g -I../src/include -I../src/agent/include -I -g -O2 -MT frmConnect.o -MD -MP -MF ".deps/frmConnect.Tpo" \ -c -o frmConnect.o `test -f 'ui/frmConnect.cpp' || echo './'`ui/frmConnect.cpp; \ then mv ".deps/frmConnect.Tpo" ".deps/frmConnect.Po"; \ else rm -f ".deps/frmConnect.Tpo"; exit 1; \ fi shows up the problem. Firstly, a bunch of it seems to be included twice. Note the double inclusion of: -DDATA_DIR=\"/usr/local/pgadmin3/share/pgadmin3/\" -Wall -g -I../src/include -I../src/agent/include -I Then secondly, notice the -I on the end which does not have a path - that's what seems to be losing the SSL definition because it gets picked up as the argument to -I. Further investigation shows that that path is set to ${WXHOME} which is ovbviously empty when the command is created. Adding a / to the end of it makes things work nicely. Not sure about the best way to fix this properly, so I guess it's over to you Adam :-) Regards, Dave.
ahp
В списке pgadmin-hackers по дате отправления: