Re: gcc ignoring defined macros?
От | Dave Page |
---|---|
Тема | Re: gcc ignoring defined macros? |
Дата | |
Msg-id | 03AF4E498C591348A42FC93DEA9661B83AF27B@mail.vale-housing.co.uk обсуждение исходный текст |
Ответ на | gcc ignoring defined macros? ("Dave Page" <dpage@vale-housing.co.uk>) |
Ответы |
Re: gcc ignoring defined macros?
|
Список | pgadmin-hackers |
> -----Original Message----- > From: Adam H. Pendleton [mailto:fmonkey@fmonkey.net] > Sent: 02 October 2003 23:29 > To: Dave Page > Cc: Hiroshi Saito; pgadmin-hackers@postgresql.org > Subject: Re: [pgadmin-hackers] gcc ignoring defined macros? > > > > How are you adding the -DSSL flag to the command line? It might be > mistaken for a linker flag because of its location in the > args. Just a > shot in the dark, really... 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.
В списке pgadmin-hackers по дате отправления: