pera wrote:
> Hello, I'm trying to make a tiny app with glut (cross-platform)
> in C with gcc. I'm not using "int main(int argc, char **argv)"
> instead that I'm setting the start point with "void
> _start(void)" (and - nostartfiles in my makefile)... and works,
Why are you dooing this? Specifying the program entry point
yourself means, that you totally omit the runtime libraries
initialisation code. This code does im****tant things: Set up
dynamic memory management structures for malloc, set FPU
registers, and in case of C++ calls static constructors.
> but the problem is that glutInit need argc and argv.
> My question is, there is someway to use glut without real argc
> and argv?
Well, yes, but you will then be unable to set things like window
geometry and stuff by command line parameters.
> if I define my own argc (=1) and argv pointer I get a
> segmentation fault :S ("Program received signal SIGSEGV,
> Segmentation fault. 0xb7270622 in strrchr () from
> /lib/libc.so.6")
Could it be due to the simple fact, that libc isn't initialized
and thus any call in a function of it may hit uninitialized
structures?
Did you try those self defined glutInit parameters from within a
ordinary main?
Wolfgang Draxinger
--
E-Mail address works, Jabber: hexarith@[EMAIL PROTECTED]
ICQ: 134682867


|