MessageBoxA can not be resolved?

This is a discussion on MessageBoxA can not be resolved? within the Windows Programming forums, part of the Platform Specific Boards category; Hello everyone, I am developing a DLL project for Windows Mobile (C/C++). I have removed the UNICODE and _UNICODE definition ...

  1. #1
    Registered User
    Join Date
    May 2006
    Posts
    1,579

    MessageBoxA can not be resolved?

    Hello everyone,


    I am developing a DLL project for Windows Mobile (C/C++). I have removed the UNICODE and _UNICODE definition from project --> settings. But build the following code, there is an error (compile could pass, but link can not pass),

    error LNK2019: unresolved external symbol CreateDirectoryA referenced in function foo

    Code:
    #include <winbase.h>
    
    int foo()
    {
    	CreateDirectory (L"hello", NULL);
    	CreateDirectoryA ("hello", NULL);
    	CreateDirectoryW (L"hello", NULL);
    
    	return 0;
    }

    thanks in advance,
    George

  2. #2
    Registered User
    Join Date
    May 2006
    Posts
    1,579
    The title should be CreateDirectoryA can not be resolved. Sorry that I can not change the title.


    regards,
    George

  3. #3
    Deathray Engineer MacGyver's Avatar
    Join Date
    Mar 2007
    Posts
    3,211
    You should include windows.h instead of winbase.h per MSDN instructions. Also, what happened to main()? This isn't all your code because the linker would probably be asking you the same question.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. error LNK2019: unresolved external symbol
    By Warlax in forum C++ Programming
    Replies: 8
    Last Post: 12-09-2008, 01:37 PM
  2. List Views
    By Cactus_Hugger in forum Windows Programming
    Replies: 0
    Last Post: 01-01-2006, 01:07 AM
  3. Trying to write CReadAviclass
    By simly01 in forum C++ Programming
    Replies: 4
    Last Post: 07-31-2002, 11:11 PM

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