Changed my main function, now this.

This is a discussion on Changed my main function, now this. within the Windows Programming forums, part of the Platform Specific Boards category; Error!!! Code: LIBCMTD.lib(crt0.obj) : error LNK2019: unresolved external symbol _main referenced in function ___tmainCRTStartup I am trying to rig a ...

  1. #1
    Absent Minded Programmer
    Join Date
    May 2005
    Posts
    964

    Changed my main function, now this.

    Error!!!

    Code:
    LIBCMTD.lib(crt0.obj) : error LNK2019: unresolved external symbol _main referenced in function ___tmainCRTStartup
    I am trying to rig a project I already have going, which was created as a console application.
    I basically added winmain and it's not recognizing it as the main function.

    Is there any way I can change my project settings (vs2005 express) to support my new main function?

    Or do I have to create a windows application from scratch?
    Sometimes I forget what I am doing when I enter a room, actually, quite often.

  2. #2
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    No, you can change the Subsystem in "project->properties->linker ->system", change it from "console" to "windows".

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  3. #3
    Absent Minded Programmer
    Join Date
    May 2005
    Posts
    964
    Fixed!!!

    God, I only dug through the settings for 3 hours.

    lol

    I had to change the SubSystem to WINDOWS!!!

    EDIT:
    Oops, thanks for the quick response, but i finally found it!

    It will be implanted into my memory thanks to those troublesome hours.
    Sometimes I forget what I am doing when I enter a room, actually, quite often.

  4. #4
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    Quote Originally Posted by Shamino View Post
    Fixed!!!

    God, I only dug through the settings for 3 hours.

    lol

    I had to change the SubSystem to WINDOWS!!!

    EDIT:
    Oops, thanks for the quick response, but i finally found it!

    It will be implanted into my memory thanks to those troublesome hours.
    Yes, I had to look it up myself, as I rarely do that.

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 4
    Last Post: 05-13-2011, 08:28 AM
  2. <Gulp>
    By kryptkat in forum Windows Programming
    Replies: 7
    Last Post: 01-14-2006, 12:03 PM
  3. Problem with Visual C++ Object-Oriented Programming Book.
    By GameGenie in forum C++ Programming
    Replies: 9
    Last Post: 08-29-2005, 11:21 PM
  4. Replies: 4
    Last Post: 11-23-2003, 06:15 AM
  5. Struct *** initialization
    By Saravanan in forum C Programming
    Replies: 20
    Last Post: 10-09-2003, 12:04 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21