Duplicate identifier error

Monkey Forums/Monkey Programming/Duplicate identifier error

Oddball(Posted 2013) [#1]
I'm giving monkey another try, but I'm unable to compile/run anything. Even stuff that used to work is now no longer compiling/running. I'm using v66 on OS X 10.8 with Xcode 4.6 and I get the same error on all targets. Any help would be appreciated. The error I get is
Duplicate identifier 'Image' found in module 'graphics' and module 'graphics'.
I get the error with my own code and all the samples.


tiresius(Posted 2013) [#2]
Clear your build folders if you recently updated to v66 ?


Oddball(Posted 2013) [#3]
That didn't help. I've deleted all the build folders and I'm still getting the error. Also I haven't updated anything. I last used monkey in December to make the app I posted in the apps section of this site. Since then I haven't altered any code or update monkey. I tried using it today and I'm getting the error above.


Jesse(Posted 2013) [#4]
I got that error before but I can't recall how I fixed it. I am not sure if it was the module name capitalized incorrectly or accessing the module once directly with subfolder information such as:

import module.Alphamodule


and other time with just the single folder/file name:

Import Alphamodule



I believe it was the later one.

I think for it to recognize in both cases as the same module it needs to match the complete module name in both instances as being the same one by calling them exactly by the exact same conventions.


Oddball(Posted 2013) [#5]
Thanks for trying but non of that helped. I've completely reinstalled monkey and that seems to have worked. I would have liked to have found out what the problem was, but I haven't got time for messing around and not getting any work done. I just hope I don't have to reinstall monkey every month.


DruggedBunny(Posted 2013) [#6]
Might possibly have been that weird OSX thing where it still refers to stuff that's been moved into the trash folder.


DGuy(Posted 2013) [#7]
I started getting this same message after I reorganized some code.

I determined it had something to with having an single "master" import file which was importing several other files plus declaring a few globals.

This master import file was being imported by every other source file (even files the master import file was importing.)

After getting rid of the master import file and explicitly importing files where needed and moving the globals declarations into other files, the message went away.

BTW, I'm also on a Mac.

HTH