Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


[C++] Error

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
manc
Grandmaster Cheater
Reputation: 1

Joined: 16 Jun 2006
Posts: 551

PostPosted: Tue Sep 16, 2008 8:31 pm    Post subject: [C++] Error Reply with quote

Anyone know what this means

Code:

Linking...
LINK : error LNK2001: unresolved external symbol _WinMainCRTStartup
C:\Documents and Settings\Matt\Desktop\TestingGUI\Debug\TestingGUI.exe : fatal error LNK1120: 1 unresolved externals
Build log was saved at "file://c:\Documents and Settings\Matt\Desktop\TestingGUI\TestingGUI\Debug\BuildLog.htm"
TestingGUI - 2 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========



Trying to make a simple dialog that looks like this:
[img=http://img262.imageshack.us/img262/142/83851255sx0.th.png]


Its just a .h + .rc so far, no .cpp. Just a plain dialog. Do I have to have a source file and define it and whatnot for it to simply exist?

_________________
Back to top
View user's profile Send private message
lurc
Grandmaster Cheater Supreme
Reputation: 2

Joined: 13 Nov 2006
Posts: 1900

PostPosted: Tue Sep 16, 2008 8:33 pm    Post subject: Reply with quote

If there's no CPP source file, there's no entry point, meaning you will obviously have errors.

Add a CPP File, with a WinMain entry point.

_________________
Back to top
View user's profile Send private message
Overload
Master Cheater
Reputation: 0

Joined: 08 Feb 2008
Posts: 293

PostPosted: Tue Sep 16, 2008 8:40 pm    Post subject: Reply with quote

You need a main method. Either int main() or WINMAIN
_________________
Blog

Quote:
Rhys says:
you can be my maid
Rhys says:
ill buy you a french maid outfit
Tyler says:
Sounds good
Rhys says:
ill hold you to that
Back to top
View user's profile Send private message MSN Messenger
manc
Grandmaster Cheater
Reputation: 1

Joined: 16 Jun 2006
Posts: 551

PostPosted: Tue Sep 16, 2008 8:42 pm    Post subject: Reply with quote

Wouldnt

Code:
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
LPSTR lpCmdLine, int nCmdShow)

{
}


work?

MSVC++ gives errors.

_________________
Back to top
View user's profile Send private message
lurc
Grandmaster Cheater Supreme
Reputation: 2

Joined: 13 Nov 2006
Posts: 1900

PostPosted: Tue Sep 16, 2008 8:52 pm    Post subject: Reply with quote

Warning: Coded in quick-reply

Code:
#include <windows.h>
#include <tchar.h>
#include <commctrl.h>
#include "resource.h"

#pragma comment (lib, "comctl32.lib")

BOOL DlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
    switch (uMsg)
    {
        case WM_CLOSE:
        case WM_DESTROY:
            EndDialog(hDlg, 0);
            break;
    }
    return TRUE;
}

BOOL WINAPI _tWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nShowCmd)
{
    INITCOMMONCONTROLSEX Init;
    Init.dwSize = sizeof(INITCOMMONCONTROLSEX);
    Init.dwICC  = ICC_STANDARD_CLASSES;
    InitCommonControlsEx(&Init);
   
    // Change "IDD_DIALOG1" to the name of the dialog you made in the .rc
    DialogBox(hInstance, MAKEINTRESOURCE(IDD_DIALOG1), NULL, (DLGPROC)DlgProc);
    return TRUE;
}

_________________
Back to top
View user's profile Send private message
manc
Grandmaster Cheater
Reputation: 1

Joined: 16 Jun 2006
Posts: 551

PostPosted: Tue Sep 16, 2008 9:00 pm    Post subject: Reply with quote

I see. My .rc dialog was named IDD_DIALOG1 so it worked fine. However, the only things that showed up were checkbox, ok, and cancel. There was no background, no titlebar, nothing.


Also, WTF?

[img=http://img291.imageshack.us/img291/2203/35407549vx9.th.png]


Why is
Code:
'TestingGUI.exe': Loaded 'C:\Program Files\Internet Download Manager\idmmkb.dll"
even happening? Internet Download Manager? How the hell is that involved?
_________________
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites