0
0

I’m using the ID’s from the header files generated during the fmod build process. However, I’m getting problems once the header file is included in more than one place. I am getting:

[code:35orl53l]error LNK2005: "char const * const BLAH_BLAH_BLAH .....already defined in[/code:35orl53l]

To me this is expected behaviour from the linker, I’ve included the definition from muliple places, I’m going to have mutliple defines floating around.

It seems to me there are 3 ways to resolve this:
[list:35orl53l]
1. Declare the guids as const char* const
2. Extern the decleration, and do the actual define in a .cpp file
3. Add a command line option to prevent the guids been added to the .h
[/list:u:35orl53l]

For now I’m parsing the file and altering the declerations as part of my build process.

I just wanted to check:
[list:35orl53l]
a. Is this intentional?
b. Is there something I’m missing as to why the guid’s are declared/defined in the way they are?[/list:u:35orl53l]

  • You must to post comments
0
0

I have the same question…

Could this be fixed, please in the next Designer Tool release?

The

const char* const

seems like an easy way to do it

Thanks
Greg

  • You must to post comments
0
0

[quote="MikeJ":2vjk3s6c]
1. Declare the guids as const char* const
[/quote:2vjk3s6c]
That’s the same thing as char const * const

  • You must to post comments
0
0

[quote="nullsquared":2snzm551][quote="MikeJ":2snzm551]
1. Declare the guids as const char* const
[/quote:2snzm551]
That’s the same thing as char const * const[/quote:2snzm551]

The problem is in the header generated by the tools the guids are declared as:

[code:2snzm551]const char *EVENT_GUID = "{guid}";[/code:2snzm551]

Like you say,
[code:2snzm551]const char* const EVENT_GUID = "{guid}";[/code:2snzm551]
and
[code:2snzm551]char const * const EVENT_GUID = "{guid}";[/code:2snzm551]
are both the same thing and either would fix the linker error 😀

  • You must to post comments
0
0

i have the same issue, i must modify the .h file manually at every update. is there any reason for this, or an easy workaround?

  • You must to post comments
Showing 4 results
Your Answer

Please first to submit.