News:

When registered with our forums, feel free to send a "here I am" post here to differ human beings from SPAM bots.

Main Menu

The 04 May 2007 build will NOT be out.

Started by killerbot, May 04, 2007, 08:07:26 PM

Previous topic - Next topic

killerbot

it seems once again, it doesn't build on linux.

codesnippets.cpp:23:6: error: #error IS_PLUGIN_CODE *not* defined for plugin code
make[5]: *** [codesnippets.lo] Error 1


To all developers, please use include files [next week I will post some information on include files and a guideline on how to use them] correctly or other ifdef stuff. And please please, build with a non pch environment. PCH's are bad, bad, bad, they are a very easy tool to break compilation. They have benefits, but to be honest currently on the CB project they do more damage then good.
To be honest 50% of the commits these days are breaking the linux build.

stahta01

Quote from: killerbot on May 04, 2007, 08:07:26 PM
it seems once again, it doesn't build on linux.

codesnippets.cpp:23:6: error: #error IS_PLUGIN_CODE *not* defined for plugin code
make[5]: *** [codesnippets.lo] Error 1


To all developers, please use include files [next week I will post some information on include files and a guideline on how to use them] correctly or other ifdef stuff. And please please, build with a non pch environment. PCH's are bad, bad, bad, they are a very easy tool to break compilation. They have benefits, but to be honest currently on the CB project they do more damage then good.
To be honest 50% of the commits these days are breaking the linux build.

I assume from this that if I submit my patches needed to compile Code::Blocks under windows without using pch, that they will be used.

Tim S
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

killerbot

Cb project itself on windows (cbp files) fall back on GCC with pch. But with makefiles on linux it more often without pch (good ;-)  );
So if it builds on widows by turning off pch one can already be more confident it will also build on linux, though still no full guarantee (wx is sometimes different)

Pecan

#3
The problem with codesnippets on linux is not precompile headers.

Mandrav took out the BUILDING_PLUGIN define in the codesnippets-unix.cbp, so I had to come up with something else. I chose "IS_PLUGIN_CODE".

I have no idea where to put the define for make files.

Does it go in the .am somewhere?

Quote from: killerbot on May 04, 2007, 08:07:26 PM
To be honest 50% of the commits these days are breaking the linux build.

Yuup, it's a development environment. And CB is built around .cbp files. Those are working. Where's the make file? I'll try to figure out how to fix it.

mandrav

QuoteMandrav took out the BUILDING_PLUGIN define in the codesnippets-unix.cbp, so I had to come up with something else. I chose "IS_PLUGIN_CODE".

I removed it because it disabled the use of pch. But if you need this put it back.
Be patient!
This bug will be fixed soon...

Pecan

Quote from: mandrav on May 05, 2007, 12:02:02 AM
QuoteMandrav took out the BUILDING_PLUGIN define in the codesnippets-unix.cbp, so I had to come up with something else. I chose "IS_PLUGIN_CODE".

I removed it because it disabled the use of pch. But if you need this put it back.

I don't need it if I can define my own "IS_PLUGIN_CODE" without screwing up Killerbot's makefile.

How can I define my own compiler flag in the .cbp without disabling the makefile?

pasgui

Quote from: Pecan on May 05, 2007, 12:15:10 AM
Quote from: mandrav on May 05, 2007, 12:02:02 AM
QuoteMandrav took out the BUILDING_PLUGIN define in the codesnippets-unix.cbp, so I had to come up with something else. I chose "IS_PLUGIN_CODE".

I removed it because it disabled the use of pch. But if you need this put it back.

I don't need it if I can define my own "IS_PLUGIN_CODE" without screwing up Killerbot's makefile.

How can I define my own compiler flag in the .cbp without disabling the makefile?


To compile rev3934, I made this modification in codeblocks/src/plugins/contrib/codesnippets/Makefile.am file:

Index: Makefile.am
===================================================================
--- Makefile.am   (rĂ©vision 3934)
+++ Makefile.am   (copie de travail)
@@ -4,7 +4,7 @@
         $(WX_GTK2_CFLAGS) \
      -I$(top_srcdir)/src/include \
      -I$(top_srcdir)/src/include/wxscintilla/include \
-        -I$(top_srcdir)/src/include/wxFlatNotebook/include
+        -I$(top_srcdir)/src/include/wxFlatNotebook/include -DBUILDING_PLUGIN


libdir = $(pkgdatadir)/plugins
@@ -16,7 +16,6 @@
libcodesnippets_la_LIBADD = $(PLUGIN_WX_LIBS) ../../../sdk/libcodeblocks.la

libcodesnippets_la_SOURCES =    codesnippets.cpp \
-         codesnippetsapp.cpp \
         codesnippetstreectrl.cpp \
         codesnippetswindow.cpp \
         edit.cpp \
@@ -36,7 +35,6 @@
         version.cpp

noinst_HEADERS =     codesnippets.h \
-         codesnippetsapp.h \
         codesnippetstreectrl.h \
         codesnippetswindow.h \
         defsext.h \

killerbot

fyi : rev 3934 still hasn't fixed the problem though

Pecan

Quote from: killerbot on May 05, 2007, 10:14:37 AM
fyi : rev 3934 still hasn't fixed the problem though

Ok, I'll start ripping out the code.
If we can't represent the .cbp in the linux makefile, I don't want to fight it.

killerbot

although I haven't looked at the actual problem, it should be possible to add extra preprocessor directives in a makefile , += to CFLAGS or those darn things

Pecan

Quote from: killerbot on May 05, 2007, 11:57:55 AM
although I haven't looked at the actual problem, it should be possible to add extra preprocessor directives in a makefile , += to CFLAGS or those darn things

Yeah, I spent hours on google trying to figure out how.

But for now, I'll just remove the code from linux that causes the problem.

Then, if I ever learn makefile.am preprocessors, I'll think about putting it back. But I doubt it.