I created a map and exported for Visual C++. I copied the code from the .c file into my .h file and everything is errorless, but when I run the program and try to access the content I get linker errors.
error LNK2005: "int * TerrainSeqPosition" (?TerrainSeqPosition@@3PAHA) already defined in game_engine.obj
There are about 30 of them and they are all the same except for the names of the variables change.
Any ideas?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The .TSD files should be seen as examples on how to create your own. These are often very old and won't work just like that. The idea is that you change the TSD to export the images/maps in a format you need for your project.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I created a map and exported for Visual C++. I copied the code from the .c file into my .h file and everything is errorless, but when I run the program and try to access the content I get linker errors.
There are about 30 of them and they are all the same except for the names of the variables change.
Any ideas?
A .c is compiled once, a .h is compiled each time it is included. So if you transform a .c in .h, the global variable become "already defined".
I don't know what the resulting .c is like so I can't tell you more, but the problem comes from something like this.
The .TSD files should be seen as examples on how to create your own. These are often very old and won't work just like that. The idea is that you change the TSD to export the images/maps in a format you need for your project.