0

I'm working on Visual Studio (for C++ and OpenGL but i'm a neewbie) and I've imported the code with the option in Visual Studio "Import Project From Code" but it do not compile...

The problem is that the code isn't mine (co-worker) and I cannot contact the author (vacation...) to know on witch environment he runs.. or to ask him to convert the code... I also Use FreeImage Library but i thinks it's just a detail.

I get error " Cannot start programm, the specified file cannot be found"...

Then I've got some errors for unsolvable symbols but the wierd part is that in the console it writes :

error LNK2005: _main already defined in dummy.obj
error LNK2019: unsolved external symbol __imp_FreeImage_Initialise@4 referenced in main function
error LNK2019: unsolved external symbol __impFreeImage_DeInitialise@0
...

And so one but in the code there is no @0, what do they mean...?

Dr.L
  • 3
  • 2
  • `@0` as a suffix means that this function has a Pascal-style calling convention, a.k.a. STDCALL in the Windows API, where it is the responsibility of the called function to remove its arguments from the stack. The 0 is the length in bytes of arguments, i.e. none in this case. This is fairly common for DLL-exported functions on Windows, and chances are one of the defines in your header file that declare these functions specified the calling convention. – Rup Nov 11 '14 at 22:34

1 Answers1

1

Unresolved external usually means that there is a linker dependency not met.

Basically, this message means that VS cannot find FreeImage library. In the install directory of FreeImage, there should be a .lib somewhere. In your project settings, under linker, make sure that the FreeImage .lib file is there and that the additionnal library directory contains the path where the .lib is.

Eric
  • 19,525
  • 19
  • 84
  • 147
  • Sorry if I've made a duplicate but I didn't find my problem... (Lack of vocabulary for Keywords...:/, english is foergin laguage for me..) I've modified that, and now VS is saying that it lacks the .dll of FreeImage.. But It's on the file with the .exe .. – Dr.L Nov 12 '14 at 07:14