Results 1 to 9 of 9
  1. #1
    Join Date
    Feb 2008
    Posts
    7

    Problem VTM 5 adding game code

    this has been bugging me, I just switched to 3d buzz's version of c++, and implemented the resources and game code into and all that. But when I compiled I got 4 linking errors. I would really appreciate the help I can get, I want to continue learning programming

    Errors:
    Code:
    1>EvilMonkies.obj : error LNK2005: "class wxAppConsole * __cdecl wxCreateApp(void)" (?wxCreateApp@@YAPAVwxAppConsole@@XZ) already defined in Evil_Monkies_2.0.obj
    1>EvilMonkies.obj : error LNK2005: _WinMain@16 already defined in Evil_Monkies_2.0.obj
    1>EvilMonkies.obj : error LNK2005: "class wxAppInitializer wxTheAppInitializer" (?wxTheAppInitializer@@3VwxAppInitializer@@A) already defined in Evil_Monkies_2.0.obj
    1>C:\Documents and Settings\Ryan\My Documents\Visual Studio 2005\Projects\Evil Monkies 2.0\Debug\Evil Monkies 2.0.exe : fatal error LNK1169: one or more multiply defined symbols found

  2. #2
    Join Date
    Oct 2006
    Posts
    19
    Sounds to me like you've got some duplicate class entries in your code. Might want to have a quick run down of your code. I would think they would be fairly easy to see.

  3. #3
    Join Date
    Feb 2008
    Posts
    7
    *facepalm* I found the error thx djdoomsday for your advice but now I have another error when I try to run the program.

    "unable to run program, the application has failed to start because the application configuration is incorrect. Review the manifest file for possible errors. Reinstalling the application may fix the problem. For more details, please see the application event log."

    Does this mean I'd have to look through the project properties to find the error? Thx in advance to anyone who helps

  4. #4
    Join Date
    Jun 2003
    Location
    Trier, Germany
    Posts
    1,350
    try project properties->manifest tool->input and output->embed manifest = no.

  5. #5
    Join Date
    Feb 2008
    Posts
    7
    try project properties->manifest tool->input and output->embed manifest = no.
    I tried it but I still got the same error.

  6. #6
    Join Date
    Oct 2006
    Posts
    1,548
    If you're using 2005, its a known bug. I downloaded the hot fix for it and it worked fine afterwards. The other way around it is to Rebuild the project, and not just build it.

    I dont have a link to the hot fix, but i found it after googling the error code
    [quote][\quote]

  7. #7
    Join Date
    Feb 2008
    Posts
    7
    Quote Originally Posted by wforl View Post
    If you're using 2005, its a known bug. I downloaded the hot fix for it and it worked fine afterwards. The other way around it is to Rebuild the project, and not just build it.

    I dont have a link to the hot fix, but i found it after googling the error code
    well completely rebuilding it didn't work, and I tried googling it and all I found was like a IDE Crashing when building a program hotfix... Is that the right hotfix I need?

  8. #8
    Join Date
    Apr 2008
    Posts
    57
    When things start to get hairy in visual studio, grab notepad - copy all your code and paste it into a new project, this can save you massive headaches if the settings have exploded.

    Also the error you reported that doomsday mentioned can be also caused via including the same .cpp/.h twice theres a preprocessor command to notify you when you are doing this, its pretty easy to set up too:

    #ifndef HEADER or CLASSNAME (i usually change HEADER to an all caps version of my class' name)
    #define HEADER or CLASSNAME
    . . . // the code in your .h file
    #endif // HEADER or CLASSNAME (this goes at the end, the commend with the class name is just a naming convention in order for you to know which preprocessor ifndef is ending here.)

    example:

    myenums.h:

    #ifndef MYENUMS
    #define MYENUMS
    enum Myenums {
    myfirstenum,
    mysecondenum,
    mythirdenum
    };
    #endif //MYENUMS


    If you are into your naming convention its seen as good practise to add a _H at the end (MYENUMS_H) to signal that it is in fact a header name for a proprocessor command.

    just remember im no expert :P this is something i had to learn the hard way and it solved all of my duplication issues ^^ so i thought id share so i hope it helps and good luck with the code!

  9. #9
    Join Date
    Feb 2008
    Posts
    7

    goodness

    okay, it compiled, no errors. Or at least that's what I would love to think buuuut... Well I go to try and run it, and I get greeted by this giant window of errors. I've tried looking at it but I don't understand it at all... Help solving this big annoying box is greatly appreciated!!

    http://i997.photobucket.com/albums/a...frrl/erors.png

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •