473,670 Members | 2,624 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

error: initializer element is not constant in demobox.c GTK

varuns
39 New Member
hi
i m stuck while compiling my code for generating bindings for c code to be accessible from python

i have read the ext.pdf available at python.org, and i think i have done every thing right.

But while compilation an error message is displayed

Expand|Select|Wrap|Line Numbers
  1. demobox.c:495: error: initializer element is not constant
  2. demobox.c:495: error: (near initialization for `_PyDemoBox_methods[0].ml_meth')
  3. ......
  4.  
  5. demobox.c:628: error: syntax error at end of input
  6. demobox.c:611: warning: unused variable `demobox_functions'

In .override file i have included line

Expand|Select|Wrap|Line Numbers
  1. import gobject.GObject as PyGObject_Type
  2. import gtk.VBox as PyGtkVBox_Type
(as i have inherited from this class)

can any one point at what the problem is
Jun 29 '07 #1
1 1802
bartonc
6,596 Recognized Expert Expert
There may be one member (actually a site admin) who checks in here with lots of C compiler experience. I think that one of the main reasons many people choose python is to avoid becoming a compiler experts (that's certainly my case). All this stuff sure seems to be a lot harder on *nix than it is on Windows. It's really quite interesting to see the change in the trends...

Good luck with that.
Jun 29 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
19557
by: Todd Nathan | last post by:
Hi. have this code and compiler problem. GCC 2.95.3, BeOS, error "initializer element is not constant" #ifdef FILEIO { static struct { char *sfn; FILE *sfd; } stdfiles = {
6
16972
by: Clint Olsen | last post by:
What about the following is not computable? It seems that the size of foo is easily computable: typedef struct { char *name; char *data; } Foo; int main(void) {
2
7215
by: David Green | last post by:
Ok, i'm a real c n00b but i needed a piece of code for some work i was doing. Initially i was running the stuff under linux and using gcc to compile the c code and it worked fine but now i need to port it to windows and when i try to compile the same code with the visual studio command line tool "cl" i get this error: const.c(92) : error C2099: initializer is not a constant const.c(97) : error C2099: initializer is not a constant with...
3
2450
by: Levi Campbell | last post by:
Hi, I'm trying to debug an app someone else wrote called eMixer. Here's the log contents: cc -O3 -funroll-loops -c -o main.o main.c cc -O3 -funroll-loops -c -o nctgui.o nctgui.c cc -O3 -funroll-loops -c -o mixer.o mixer.c mixer.c: In function `open_soundcard_alsa':
3
1391
by: vib | last post by:
Hi there, I wish to get some advice on the problem I face in initializing a table. Here is the code. I've an array of strings, ptrNameString . I want to initialize a table, mySoftKeyTable with some contents of the string from the array. This initialization is not in any function, but rather outside of any function. However, the compiler complaints, the related lines( L1, L2, L3, L4) of "Initializer element is not constant". I
1
4108
varuns
by: varuns | last post by:
hi i m stuck while compiling my code for generating bindings for c code to be accessible from python i have read the ext.pdf available at python.org, and i think i have done every thing right. But while compilation an error message is displayed demobox.c:495: error: initializer element is not constant demobox.c:495: error: (near initialization for `_PyDemoBox_methods.ml_meth')
2
4994
by: hankypan1 | last post by:
Hi All, I need a tree data structure for my application. It is the non - cyclic simple tree where i can have any number of children node and each child can recursively become a sub tree like a normal tree. Now the thing is i can popullate my tree at compile time like a global data. Since i know my tree definition at compile time, instead of using pointers to point to siblings or child nodes, i am planning to use the array
17
5214
by: spooler123 | last post by:
Just a small little program. Can not figure out what am I doing wrong. #include <stdio.h> #include <limits.h> #include <float.h> int main() { double max = FLT_MAX;
16
2768
by: Gowtham | last post by:
Hi, I had some C code written which initialized a global variable as: FILE *yyerfp = stdout; This used to work fine in older versions of gcc. Now, when I tried to compile this code (with gcc 3.2.3), I got errors like:
0
8386
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8901
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8814
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8660
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7415
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6213
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5683
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
2
2041
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1792
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.