Facing problem while linking

This is a discussion on Facing problem while linking within the C++ Programming forums, part of the General Programming Boards category; Hi,I am new to programming in C++.i have BORLAND C++ version 3.1.I am having problems quite often when i am ...

  1. #1
    Registered User
    Join Date
    Feb 2003
    Posts
    1

    Question Facing problem while linking

    Hi,I am new to programming in C++.i have BORLAND C++ version 3.1.I am having problems quite often when i am trying to link some complex examples given by the borland with C++.The the liker gives this error msg"Undefined symbol _main in module WINMAIN".I will be thankfull if someone tells me the solution of the problem I am facing.
    thank you.

  2. #2
    End Of Line Hammer's Avatar
    Join Date
    Apr 2002
    Posts
    6,231
    Did you tell your compiler to make a console app? It looks like it trying to make a Windows one.
    When all else fails, read the instructions.
    If you're posting code, use code tags: [code] /* insert code here */ [/code]

  3. #3
    Me -=SoKrA=-'s Avatar
    Join Date
    Oct 2002
    Location
    Europe
    Posts
    448
    I was having the same problem. I'm using version 5.5 but should work as well. You have to add the option to compile a windows app. Something like:

    bcc32 -tW main.cpp

    where bcc32 is how your compiler is called. Mine is like that and probably your's as well. -tW is the option to compile a windows app and main.cpp is the name of your fiel with the code
    Hope this helps.
    If this doesn't work try d/l the version 5.5 command line tools. It's free!
    SoKrA-BTS "Judge not the program I made, but the one I've yet to code"
    I say what I say, I mean what I mean.
    IDE: emacs + make + gcc and proud of it.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. A question related to strcmp
    By meili100 in forum C++ Programming
    Replies: 6
    Last Post: 07-07-2007, 03:51 PM
  2. c++ linking problem for x11
    By kron in forum Linux Programming
    Replies: 1
    Last Post: 11-19-2004, 10:18 AM
  3. fine! tried but facing a problem
    By samirself in forum C Programming
    Replies: 11
    Last Post: 10-07-2004, 09:59 AM
  4. Long file linking problem
    By hypertension in forum C Programming
    Replies: 3
    Last Post: 10-15-2002, 10:55 PM
  5. Linking problem...
    By BrianK in forum C++ Programming
    Replies: 2
    Last Post: 10-08-2002, 05:13 PM

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