Thread: defining entry point

  1. #1
    Registered User
    Join Date
    Aug 2009
    Posts
    39

    defining entry point

    How is possible to define as enty point another function that main() or Winmain()? I entered the preprocessor instruction #pragma comment(linker, "/ENTRY:entry_point"), but still I get the error
    Code:
    LIBCD.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
    Debug/whatever.exe : fatal error LNK1120: 1 unresolved externals

  2. #2
    Registered User
    Join Date
    Sep 2001
    Posts
    4,912
    Why don't you just rename the functions? And remember that #pragma directives vary from compiler to compiler, so check your documentation.

    You know - you're asking a lot of questions along the lines of cracking other programs - would you mind explaining why you're doing this?

  3. #3
    Registered User
    Join Date
    Aug 2009
    Posts
    39
    Would you mind explaining why it concerns you?

  4. #4
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    28,413
    Quote Originally Posted by vril
    Would you mind explaining why it concerns you?
    Read the forum guidelines:
    5. Messages relating to cracking, (erroneously called "hacking" by many), copyright violations, or other illegal activities will be deleted. Due to the overlapping boundaries of code with malicious intent, and other legitimate uses of it, the moderators will assess each potential infraction on a case by case basis.
    Even as members rather than moderators, it is in our own interest to ensure that this message board neither closes down due to something related to the law, or degrades into a "community" with a focus on cracking instead of more general C and C++ related programming.
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  5. #5
    Registered User
    Join Date
    Sep 2001
    Posts
    4,912
    Because as I've explained to you before, we have a very strict policy against cracking-related posts, and due to the sudden increase in posts on the topic, several of which were started by you, I, nor the other mods, have no reservations about closing the threads if we think that's what you're getting at.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. For the numerical recipes in C types!
    By Smattacus in forum C Programming
    Replies: 5
    Last Post: 10-28-2008, 07:57 PM
  2. Entry Point Not Found?!
    By pobri19 in forum C++ Programming
    Replies: 2
    Last Post: 10-25-2008, 09:00 AM
  3. Help realy needed
    By ZohebN in forum C++ Programming
    Replies: 2
    Last Post: 04-08-2008, 09:37 AM
  4. const Point& and const Point are same
    By noobcpp in forum C++ Programming
    Replies: 5
    Last Post: 06-30-2007, 01:39 AM