Thread: LINK : fatal error LNK1561: entry point must be defined

  1. #1
    Registered User
    Join Date
    Dec 2005
    Posts
    118

    LINK : fatal error LNK1561: entry point must be defined

    if somebody could help me or point me into the right direction i would highly appreciate it
    im using microsof visualc++ 2005 express edition

  2. #2
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    28,413
    Any code example to compile and link? On a wild guess, do you have a global main function?
    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

  3. #3
    For Narnia! Sentral's Avatar
    Join Date
    May 2005
    Location
    Narnia
    Posts
    719
    Are you still having trouble with SDL? You have to add:
    Code:
    int main( int argc, char* args[] ) 
    {
    }
    Videogame Memories!
    A site dedicated to keeping videogame memories alive!

    http://www.videogamememories.com/
    Share your experiences with us now!

    "We will game forever!"

  4. #4
    Registered User
    Join Date
    Dec 2005
    Posts
    118
    yep sdl just doesnt want to work for me lol
    http://www.aaroncox.net/tutorials/ar...ingBlocks.html

  5. #5
    Registered User
    Join Date
    Dec 2005
    Posts
    118
    i copy the guide word for word when setting up sdl but im not sure why it just doesnt work ill check the code to see if the main() is the same as you say i need or ill change it and try that

  6. #6
    Registered User
    Join Date
    Dec 2005
    Posts
    118
    this is the main at the moment

    int main(int argc, char **argv)

  7. #7
    Registered User
    Join Date
    Dec 2005
    Posts
    118
    nope i changed it and still get the error

  8. #8
    Registered User
    Join Date
    Dec 2005
    Posts
    118
    perhaps somebody could check that my system is setup correctly?

  9. #9
    For Narnia! Sentral's Avatar
    Join Date
    May 2005
    Location
    Narnia
    Posts
    719
    First, stop bumping with multiple posts. Second, we have no clue where you put your files, what your linking, or anything of that nature, so we can't help you. Thirdly, I think you should practice doing console programs before doing anything with graphics, your knowledge seems limited.
    Videogame Memories!
    A site dedicated to keeping videogame memories alive!

    http://www.videogamememories.com/
    Share your experiences with us now!

    "We will game forever!"

  10. #10
    Registered User
    Join Date
    Dec 2005
    Posts
    118
    ok im sorry if i offend people by posting alot with little knowledge about what im posting
    if i new what information you needed i probly would also then know the anwser to my question
    i have always tried to learn things by adapting other peoples codes to see what happens by means of trial and error and reading tutorials i gradually expand my knowledge but because i dont understand this sytem very well and cant get the compiler to compile the programs i downloaded i cant use trial and error or any thing for that matter as i cant evan test to see if my code is working
    if i wrote the program myself i may have been able to answer your questions to help you help me but i didnt so please look on the link i sent and download the sourse file because its not my code i dont want to post it as i dont want people to think that i may have either wrote it or stolen it .
    ps in not up to date with forum etiqute and for this i am sorry

  11. #11
    Reverse Engineer maxorator's Avatar
    Join Date
    Aug 2005
    Location
    Estonia
    Posts
    2,318
    If you have a problem with your compiler and nothing helps, download a new one.

    For example, Dev-C++: http://www.bloodshed.net/dev/devcpp.html
    "The Internet treats censorship as damage and routes around it." - John Gilmore

  12. #12
    For Narnia! Sentral's Avatar
    Join Date
    May 2005
    Location
    Narnia
    Posts
    719
    He said he had that. He downloaded the MSVC Express Edition so he can easily install SDL. But apparently he still can't figure it out. I gave him the tutorials at lazyfooproductions.com and he still can't install it. I'm not sure what's so hard about it...
    Videogame Memories!
    A site dedicated to keeping videogame memories alive!

    http://www.videogamememories.com/
    Share your experiences with us now!

    "We will game forever!"

  13. #13
    Registered User
    Join Date
    Dec 2005
    Posts
    118
    well the thing is i started with devcpp but i couldnt get sdl to work in there either for some reason so i spent the whole of last night downlading the microsoft visual express compiler as recomended but still cant get it to work in there im not sure if its the file imtrying to compile or my compiler isnt set up correctly im not entirely sure as to what a linker is but i would guess that it holds the address of where the files it needs are located .
    i have looked at several tutorials on how to set up sdl on both dev and visual but for some strange reason its just not working so obvioulsy im doing something wrong but i just dont know what.
    aslo i used tutorial from game dev site
    i think it might be because im using sombody elses code who may have set there sdl up differently to the way i have seen to do it.
    sentral i dont mean to sound like a complete noob.
    as u have the same version of compiler i have maybe you could tell me where u save the sdl include sdl libs and sdl header files and also maybe what u write in the relavant linker box that way it is sure to work
    Last edited by thestien; 10-08-2006 at 12:15 PM.

  14. #14
    Reverse Engineer maxorator's Avatar
    Join Date
    Aug 2005
    Location
    Estonia
    Posts
    2,318
    SDL works for me with Dev-C++.
    "The Internet treats censorship as damage and routes around it." - John Gilmore

  15. #15
    Registered User
    Join Date
    Dec 2005
    Posts
    118
    maxorator could you please tell me how u have sdl setup on your computer
    i mean so i can set mine up exactly the same way
    and also with devcpp do u have t ochange the linker files every new project?
    oh and do you use sdl_image and sdl_ttf?
    if so can u tlell me how u have those set up also
    i would really appreciate it as this has been driving me mad for days now.
    all i want is to make a simple program that draws a box with lines in it lol
    thanks

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. How accurate is the following...
    By emeyer in forum C Programming
    Replies: 22
    Last Post: 12-07-2005, 12:07 PM
  2. Variables already defined while linking.
    By xconspirisist in forum C++ Programming
    Replies: 2
    Last Post: 06-10-2005, 05:20 AM
  3. DLL compiling question
    By Noose in forum Windows Programming
    Replies: 2
    Last Post: 12-16-2004, 07:16 AM
  4. Request for comments
    By Prelude in forum A Brief History of Cprogramming.com
    Replies: 15
    Last Post: 01-02-2004, 10:33 AM
  5. mmsystem.h and link error
    By swordfish in forum Windows Programming
    Replies: 5
    Last Post: 09-20-2001, 11:26 PM