Search code examples
c++visual-c++intlinker-errorslnk

error LNK1152: cannot resolve one or more undecorated symbols. How to fix?


The problem with the problem is, I don't know where the problem exists, so I can't paste all my source codes here.

The error is a LNK error, LNK 1152 to be exact. I get 3 warnings brought with it:

error LNK1152: cannot resolve one or more undecorated symbols   
warning LNK4002: "int __clrcall main(cli::array<class System::String ^ >^)" (?main@@$$HYMHP$01AP$AAVString@System@@@Z) defined in Release\Note Reminder.obj
warning LNK4002: "int __clrcall main(int,char * * const)" (?main@@$$HYMHHQAPAD@Z) defined in Release\INIwriter.obj
warning LNK4022: cannot find unique match for symbol 'main

I have NO IDEA how to fix this error. Someone had this before, and fixed it?


Solution

  • This appears to be C++-CLI or something, not C++. You're defining main in more than one object file. You're even told which files those are.