Remember me

Lost Password?

Register now!


Who's Online
66 user(s) are online (58 user(s) are browsing Forums)

Members: 1
Guests: 65

cobale, more...

Support us!


« 1 ... 5 6 7 (8)

Re: gcc 9 and 10
Just can't stay away
2007/7/14 21:30
From Lothric
Posts: 1325

Probably adding "extern" in global.h will help, and then defining those symbols in one C file only.

   Report Go to top

Re: gcc 9 and 10
Just popping in
2011/7/20 20:01
From In the sticks
Posts: 172
If you have a globals header file you can have something like


    #define GLOBAL_PREFIX 
    #define GLOBAL_VAL(x)    = x
    #define GLOBAL_PREFIX extern
    #define GLOBAL_VAL(x)

#endif         /* #ifndef DOXYGEN_SHOULD_SKIP_THIS */

GLOBAL_PREFIX const char *G_NAME_S GLOBAL_VAL ("name");
GLOBAL_PREFIX int g_log_level GLOBAL_VAL (1);

then in one of the c source files have


before the

#include "globals.h"

line in that particular file and it will define and declare the variables just fine

   Report Go to top

Re: gcc 9 and 10
Site Builder
2006/12/2 23:57
From Athens/Dublin
Posts: 821
Thanks again for your proposals.
The reason I mentioned this problem in this thread is because I thought that this might be a problem of the GCC 10 itself. Let's don't derail the thread further.

I really appreciate your feedback guys. Thanks again.

   Report Go to top

« 1 ... 5 6 7 (8)

[Advanced Search]

Powered by XOOPS 2.0 © 2001-2016 The XOOPS Project