Results 1 to 4 of 4

Thread: Dev will not let me compile function prototype!!

  1. #1

    Thread Starter
    Frenzied Member aewarnick's Avatar
    Join Date
    Dec 2002
    Posts
    1,037

    Dev will not let me compile function prototype!!

    Here is the prototype:
    LRESULT CALLBACK WndProc1(HWND, UINT, WPARAM, LPARAM);

    Next I have a class (my own window, called Form).
    Then I have the actual WndProc1 CALLBACK.
    and that is it. No Main or anything.

    It is not known if I leave out the prototype.

    Error when using the prototype:
    main.cpp D:\Files\C__PRO~1\Game\Dev\main.o(.text+0x38)
    multiple definition of `_Z8WndProc1P6HWND__jjl@16'

  2. #2

    Thread Starter
    Frenzied Member aewarnick's Avatar
    Join Date
    Dec 2002
    Posts
    1,037
    Does anyone know why Dev did not recognize the function prototype until I renamed the file to a .h file instead of a .cpp file?

  3. #3
    Hyperactive Member
    Join Date
    Sep 2001
    Posts
    396
    I'm not sure why either, but I can offer my 2 cents' explanation.

    I think you are not supposed to include *.cpp, only *.h .

  4. #4

    Thread Starter
    Frenzied Member aewarnick's Avatar
    Join Date
    Dec 2002
    Posts
    1,037
    Yes, that was it. Thank you.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width