<windows.h> compiler help..!

This is a discussion on <windows.h> compiler help..! within the Windows Programming forums, part of the Platform Specific Boards category; To make a long story short: Before my pc crashed and I lost everything, I could compile and run windows.h ...

  1. #1
    VA National Guard The Brain's Avatar
    Join Date
    May 2004
    Location
    Manassas, VA USA
    Posts
    903

    <windows.h> compiler help..!

    To make a long story short:

    Before my pc crashed and I lost everything, I could compile and run windows.h programs fine. After re-installation of msvc++ 6.0, bloodshed, and borland I am still unable to compile windows programs.. I've tried playing with a bunch of compiler settings.. I've created win32 projects (which I didn't have to in the past) and although my programs will compile, they do not run (nothing happens upon program execution) The win32projects wizzard seems to only add StdAfx.cpp and one other similar file.

    * Have two hard drives c: and f: and all my compilers are installed on f:
    *Trying to build a stand-alone .cpp will result in "unresolved external _main" error and other unresolved windows functions
    *Trying to build as a win32 project will result in good compilation, but no working program
    *I can physically locate the windows.h file in msvc's "include" folder, so I know it's there. (doesn't seem to be much to it though)


    Googling for information results in conformation that I should create win32 projects.


    Specific compiler error attemped as a stand-alone (not a win32 project):


    --------------------Configuration: pixel1 - Win32 Debug--------------------
    Compiling...
    pixel1.cpp
    Linking...
    LIBCD.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
    Debug/pixel1.exe : fatal error LNK1120: 1 unresolved externals
    Error executing link.exe.

    pixel1.exe - 2 error(s), 0 warning(s)
    Last edited by The Brain; 05-11-2005 at 04:25 PM.
    • "Problem Solving C++, The Object of Programming" -Walter Savitch
    • "Data Structures and Other Objects using C++" -Walter Savitch
    • "Assembly Language for Intel-Based Computers" -Kip Irvine
    • "Programming Windows, 5th edition" -Charles Petzold
    • "Visual C++ MFC Programming by Example" -John E. Swanke
    • "Network Programming Windows" -Jones/Ohlund
    • "Sams Teach Yourself Game Programming in 24 Hours" -Michael Morrison
    • "Mathmatics for 3D Game Programming & Computer Graphics" -Eric Lengyel

  2. #2
    Registered User
    Join Date
    Jan 2005
    Posts
    847
    Have you checked that your compilers' include and library directories are set correctly? In MSVC go to Tools->options and click the directories tab.

  3. #3
    VA National Guard The Brain's Avatar
    Join Date
    May 2004
    Location
    Manassas, VA USA
    Posts
    903
    Include directory seems to be set to the correct path
    Attached Images Attached Images  
    • "Problem Solving C++, The Object of Programming" -Walter Savitch
    • "Data Structures and Other Objects using C++" -Walter Savitch
    • "Assembly Language for Intel-Based Computers" -Kip Irvine
    • "Programming Windows, 5th edition" -Charles Petzold
    • "Visual C++ MFC Programming by Example" -John E. Swanke
    • "Network Programming Windows" -Jones/Ohlund
    • "Sams Teach Yourself Game Programming in 24 Hours" -Michael Morrison
    • "Mathmatics for 3D Game Programming & Computer Graphics" -Eric Lengyel

  4. #4
    Registered User
    Join Date
    Jan 2005
    Posts
    847
    hmm and libraries? And are the source files you're trying to compile located on the same drive as the compiler? Not that it should matter but maybe you've run into a bug of some kind.
    Last edited by Quantum1024; 05-11-2005 at 06:38 PM.

  5. #5
    Registered User kryptkat's Avatar
    Join Date
    Dec 2002
    Posts
    638
    Just a reminder to use the -tW windows switch on the borland 5.5 and check the .cfg files

    Not sure if that helps.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. added start menu crashes game
    By avgprogamerjoe in forum Game Programming
    Replies: 6
    Last Post: 08-29-2007, 02:30 PM
  2. Compiler Paths...
    By Cobra in forum C++ Programming
    Replies: 5
    Last Post: 09-26-2006, 05:04 AM
  3. C Compiler and stuff
    By pal1ndr0me in forum C Programming
    Replies: 10
    Last Post: 07-21-2006, 12:07 PM
  4. I can't get this new compiler to work.
    By Loduwijk in forum C++ Programming
    Replies: 7
    Last Post: 03-29-2006, 06:42 AM
  5. how to call a compiler?
    By castlelight in forum C Programming
    Replies: 3
    Last Post: 11-22-2005, 11:28 AM

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