Using .NET for console applications

This is a discussion on Using .NET for console applications within the C++ Programming forums, part of the General Programming Boards category; Alright, I've had a version of vs.net on my system for a while, but haven't used it for console applications ...

  1. #1
    30 Helens Agree neandrake's Avatar
    Join Date
    Jan 2002
    Posts
    640

    Using .NET for console applications

    Alright, I've had a version of vs.net on my system for a while, but haven't used it for console applications (mostly because the console stuff I write is for school and the grader uses VS 6). I'm totally fed up with the bs with 6 not being compliant (a whole bunch of bs errors, forward declarations not working, etc). So I started a new win32 console application in .net and added the files I am working on. I go to compile and I get this:

    Code:
    file_db error LNK2019: unresolved external symbol "int __cdecl menu(void)" (?menu@@YAHXZ) referenced in function _main
    What is wrong with .net? Anyone had this problem? I tried looking through options, and I haven't seen anything that might fix this stupid pos. (sorry if this has been covered before, I searched to no avail). Damn VS6 and damn my grader.
    Environment: OS X, GCC / G++
    Codes: Java, C#, C/C++
    AOL IM: neandrake, Email: neandrake (at) gmail (dot) com

  2. #2
    Registered User jlou's Avatar
    Join Date
    Jul 2003
    Posts
    1,088
    Instead of a win32 console application, I usually create an Empty Project (.NET) and just add a cpp file. This avoids all the extra stuff the VC adds in.

    Your linker error looks like it is specific to your code, though. Do you call a function named menu?

  3. #3
    30 Helens Agree neandrake's Avatar
    Join Date
    Jan 2002
    Posts
    640
    Omg, was totally look at menu() thinking it was main(). I feel like such a moron. Prototype was wrong. Everything works ok. =)
    Environment: OS X, GCC / G++
    Codes: Java, C#, C/C++
    AOL IM: neandrake, Email: neandrake (at) gmail (dot) com

  4. #4
    Registered User big146's Avatar
    Join Date
    Apr 2003
    Posts
    74
    If you want to create a console app without the wizzard.just select win32 console app and then select empty project under application settings.. this way you only have to add a cpp file.
    big146

  5. #5
    30 Helens Agree neandrake's Avatar
    Join Date
    Jan 2002
    Posts
    640
    That's what I was doing, I had just been interpreting the link error wrong. I was expecting some junk about console problems with main function and such (as I have had them before when trying to make a console app in .net), but I just didn't take enough time to let the error register in my head.
    Environment: OS X, GCC / G++
    Codes: Java, C#, C/C++
    AOL IM: neandrake, Email: neandrake (at) gmail (dot) com

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. A question about windows programming
    By Hussain Hani in forum Windows Programming
    Replies: 16
    Last Post: 05-23-2007, 07:38 AM
  2. Some .NET Distribution Stats
    By nickname_changed in forum C# Programming
    Replies: 2
    Last Post: 05-14-2005, 03:41 AM
  3. IE 6 status bar
    By DavidP in forum Tech Board
    Replies: 15
    Last Post: 10-23-2002, 05:31 PM
  4. Visual J#
    By mfc2themax in forum A Brief History of Cprogramming.com
    Replies: 0
    Last Post: 10-08-2001, 02:41 PM

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