FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

[CLOSED] X11 & OpenGL: example needed

 
Post new topic   Reply to topic     Forum Index -> Bindings
View previous topic :: View next topic  
Author Message
Digited



Joined: 30 Oct 2007
Posts: 19

PostPosted: Mon Mar 17, 2008 9:22 am    Post subject: [CLOSED] X11 & OpenGL: example needed Reply with quote

Does anyone use X11 bindings and OpenGL under linux? I'm trying to compile some basic code, but get lots of errors with unions in module X11.Xlib like this:
hellolinux.dSad.text._Dmain+0x65): undefined reference to `_D3X114Xlib3_N36__initZ'

N36 is XMapEvent, that I don't declare or use myself... Same errors, when I try to declare a XEvent and use it in XNextEvent.

Can someone give source with X11 window (better if opengl) setup?

I don't want to use frameworks like SDL. I use DMD 1.028 and tango Frank.


Last edited by Digited on Thu Mar 20, 2008 1:12 pm; edited 1 time in total
Back to top
View user's profile Send private message
clayasaurus



Joined: 21 May 2004
Posts: 857

PostPosted: Mon Mar 17, 2008 10:38 am    Post subject: Reply with quote

If you do not want to use a framework like SDL, at least you could look at the source code of SDL, GLFW, or another framework to determine how they set up a window using X.
Back to top
View user's profile Send private message AIM Address
Digited



Joined: 30 Oct 2007
Posts: 19

PostPosted: Mon Mar 17, 2008 12:24 pm    Post subject: Reply with quote

The problem is that gcc's linker "ld" cant link unions from X11. I can and do look at source of gld and c-sdl, but now the first thing is to find out: only I have link errors and crashes with XEvent and other unions from X11 or everybody using latest DMD have too?

simplest code:

import X11.Xlib;

int main( char[][] args )
{
XEvent event; // then try declaring it "static"
XNextEvent( null, &event );
}

does it link and run? (of course, with linking static lib X11)
Back to top
View user's profile Send private message
Digited



Joined: 30 Oct 2007
Posts: 19

PostPosted: Thu Mar 20, 2008 1:10 pm    Post subject: Reply with quote

All works fine.

Closed.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> Bindings All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group