wtf, anttweakbar raped my s0b -.-

0x32789

Expert
Joined
May 26, 2014
Messages
849
Reaction score
51
Location
LongForgotten <-> 0x32789
Code:
1>cheat.obj : error LNK2019: unresolved external symbol "void __cdecl runNewMenu(void)" (?runNewMenu@@YAXXZ) referenced in function "void __cdecl cheat_hook(struct HWND__ *)" (?cheat_hook@@YAXPAUHWND__@@@Z)
1>dumb_menu.obj : error LNK2019: unresolved external symbol "void __cdecl toggleATBCursor(bool)" (?toggleATBCursor@@YAX_N@Z) referenced in function "int __cdecl menu_callback_misc(int,struct menu_item *)" (?menu_callback_misc@@YAHHPAUmenu_item@@@Z)
1>keyhook.obj : error LNK2019: unresolved external symbol _TwEventWin@16 referenced in function "long __stdcall wnd_proc(struct HWND__ *,unsigned int,unsigned int,long)" (?wnd_proc@@YGJPAUHWND__@@IIJ@Z)
1>proxyIDirect3DDevice9.obj : error LNK2019: unresolved external symbol _TwNewBar@4 referenced in function "void __cdecl renderHandler(void)" (?renderHandler@@YAXXZ)
1>proxyIDirect3DDevice9.obj : error LNK2019: unresolved external symbol _TwInit@8 referenced in function "void __cdecl renderHandler(void)" (?renderHandler@@YAXXZ)
1>proxyIDirect3DDevice9.obj : error LNK2019: unresolved external symbol _TwWindowSize@8 referenced in function "void __cdecl renderHandler(void)" (?renderHandler@@YAXXZ)
1>proxyIDirect3DDevice9.obj : error LNK2001: unresolved external symbol "struct CTwBar * twBar_MainMenu" (?twBar_MainMenu@@3PAUCTwBar@@A)
1>C:\Users\Desktop\mod_s0beit_sa-2\bin\d3d9.dll : fatal error LNK1120: 7 unresolved externals
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========

the fuck is this shit  :red_eyes:
I just installed ant tweak bar and latest version with some tutorials from la pirula source code
why the fuck does ant tweak bar hate me?
I have  both 64 bit and 32 bit .lib, included the header(its not their problem atall but just telling).
Any fix?

look at libraries ss:-
http://imgur.com/a/IXvnF
 

0x32789

Expert
Joined
May 26, 2014
Messages
849
Reaction score
51
Location
LongForgotten <-> 0x32789
waiting for a pro guy to answer
[member=60]Opcode.eXe[/member] ?
[member=2]0x688[/member] ?
[member=111]springfield[/member] ?
[member=7052]iAnthony[/member] ?
[member=5679]T3K[/member] (Special)?
 
Joined
Feb 18, 2005
Messages
2,963
Reaction score
267
First two errors are not even related to ATB, the compiler can't find the definition of those funcs, they usually are in a .cpp file, so make sure you added the .cpp file to your project.
 

0x32789

Expert
Joined
May 26, 2014
Messages
849
Reaction score
51
Location
LongForgotten <-> 0x32789
well..
to be honest ant tweak bar dosent have any c++ source file(cpp), It only contains a header and library file and DLL Extension file.
and second which cpp are u talking about, ant tweak bar dont have any, and I bet you know it. Not even la pirula has it

if I cant get it to fixed.
:sadpepe:
 
Joined
Feb 18, 2005
Messages
2,963
Reaction score
267
I don't think you understood me.

this is the declaration of the func, usually in the h/hpp files.
Code:
void runNewMenu(void)
you call this in cheat_hook.

the definition is the body of the function, usually in the cpp files.

Code:
void runNewMenu(void)
{
 codez here 
 do stuffz 
 bla bla bla
}

the compiler can't find this.
 

0x32789

Expert
Joined
May 26, 2014
Messages
849
Reaction score
51
Location
LongForgotten <-> 0x32789
I have these three includes tigether
#include "cheat.h"
#include "ini.h"
#include "keyhook.h"
and If I put it before them, the ini.h and keyhook contains the keyhook and the ini contains bla bla
it will still give same errors but if I put before cheat.h, It will give me errors of that undeclared vars etc..

Which include should I put inside its code or seperate the functions into 3 of them. i dont understand a shit about this one, should I add #include "keyhook.h" and "ini.h" and "new_menu.cpp" in cheat.h?  :surprised:
 

0x32789

Expert
Joined
May 26, 2014
Messages
849
Reaction score
51
Location
LongForgotten <-> 0x32789
0x38729 link said:
I have these three includes tigether
#include "cheat.h"
#include "ini.h"
#include "keyhook.h"
and If I put it before them, the ini.h and keyhook contains the keyhook and the ini contains bla bla
it will still give same errors but if I put before cheat.h, It will give me errors of that undeclared vars etc..

Which include should I put inside its code or seperate the functions into 3 of them. i dont understand a shit about this one, should I add #include "keyhook.h" and "ini.h" and "new_menu.cpp" in cheat.h?  :surprised:

EDIT: I did some test in my laboratory lab and did surgery of this project,  :trollface:

New Errors: (Reduced)
1>dumb_menu.obj : error LNK2005: "void __cdecl toggleATBCursor(bool)" (?toggleATBCursor@@YAX_N@Z) already defined in cheat.obj
1>main.obj : error LNK2005: "void __cdecl runNewMenu(void)" (?runNewMenu@@YAXXZ) already defined in cheat.obj
1>main.obj : error LNK2005: "void __cdecl toggleATBCursor(bool)" (?toggleATBCursor@@YAX_N@Z) already defined in cheat.obj
1>main.obj : error LNK2005: "struct CTwBar * twBar_MainMenu" (?twBar_MainMenu@@3PAUCTwBar@@A) already defined in proxyIDirect3DDevice9.obj

I know what it means but cant get it to fixed
Anyone knows fix for these 4 errors above? cheat.obj, I mean cheat.h or cheat.cpp dosent have them defined or created again in it but they use only "runNewMenu" which code is:

Code:
void runNewMenu ()
{
	if ( KEY_PRESSED(set.key_new_menu) )
	{
		if ( gta_menu_active() ) return;
		if ( g_SAMP != NULL ) if( g_Scoreboard->iIsEnabled ) return;

		cheat_state->_generic.new_menu ^= 1;
		if ( cheat_state->_generic.new_menu )
			toggleATBCursor( true );
		else
			toggleATBCursor( false );
	}
}

and this is my main.h, look where I putted new_menu.cpp at the end cuz it cant find functions log cuz they come after its include
/*
PROJECT: mood_sa
*/
#ifndef __MODMAIN_H
#define __MODMAIN_H

#define WIN32_LEAN_AND_MEAN
#define _CRT_SECURE_NO_WARNINGS 1

#define M0D_FOLDER "mod_sa\\"
#define M0D_NAME "mod_sa"
#define M0D_VERSION "v0.-255555"
#define SAMP_VERSION "SA:MP 0.6.3"
#define M0D_DEV_ADVANCEDINFO

// Use this to activate the SQLite Vehicle Recording.
// You'll need the SQLite libs. Check sqlite3/readme.txt for help.
//#define __CHEAT_VEHRECORDING_H__

#define BP _asm int 3
#define NAME "Project M0d_SA"

#define COMPILE_DT ""__DATE__" "__TIME__""
#define COMPILE_VERSION _MSC_VER

#define INI_FILE "mod_sa.ini"
#define RAW_TEX_FILE "mod_sa.raw"

#define RUNMODE_SINGLEPLAYER 0
#define RUNMODE_SAMP 1

// let's do a precompiled header, why not
#pragma message( "Compiling precompiled header.\n" )

// illegal instruction size
#pragma warning( disable : 4409 )

// 'class1' : inherits 'class2::member' via dominance
#pragma warning( disable : 4250 )

// unreferenced formal parameter
#pragma warning( disable : 4100 )

// handler not registered as safe handler
#pragma warning( disable : 4733 )

// API/SDK includes
#include <windows.h>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <float.h>
#include <shellapi.h>
#include <d3dx9.h>
#include <Gdiplus.h>
#include <assert.h>
#include <algorithm>
#include <list>
#include <map>
#include <set>
#include <string>
#include <vector>
#include <functional>

#include <intrin.h>
#pragma intrinsic(_ReturnAddress)

// typedefs/classes for legacy
#include "stddefs.h"
#include "stdtypes.h"
#include "CVector.h"
#include "CVector2D.h"
#include "CMatrix.h"
#include "CMatrix_Pad.h"

// public SA classes
// try to always include these in the private class's header
#include "SharedUtil.h"
#include <game/CGame.h>
#include <game/CWanted.h>

//#include <ijsify.h>
#include "SString.h"

// Ant Tweak Bar, New menu
#include "AntTweakBar.h"
#include "new_menu.h"


// private SA classes
#include "CEntitySA.h"
#include "Common.h"
#include "CGameSA.h"
#include "CWorldSA.h"
#include "CPoolsSA.h"
#include "CClockSA.h"
#include "CFontSA.h"
#include "CRadarSA.h"
#include "CMenuManagerSA.h"
#include "CCameraSA.h"
#include "CCheckpointsSA.h"
#include "CRenderWareSA.h"
#include "CCoronasSA.h"
#include "CPickupsSA.h"
#include "CPathFindSA.h"
#include "CWeaponInfoSA.h"
#include "CExplosionManagerSA.h"
#include "CFireManagerSA.h"
#include "CHandlingManagerSA.h"
#include "CHudSA.h"
#include "C3DMarkersSA.h"
#include "CStatsSA.h"
#include "CTheCarGeneratorsSA.h"
#include "CPadSA.h"
#include "CAERadioTrackManagerSA.h"
#include "CWeatherSA.h"
#include "CTextSA.h"
#include "CPedSA.h"
#include "CPedSoundSA.h"
#include "CAudioSA.h"
#include "CPlayerInfoSA.h"
#include "CPopulationSA.h"
#include "CSettingsSA.h"
#include "CCarEnterExitSA.h"
#include "COffsets.h"
#include "CControllerConfigManagerSA.h"
#include "CProjectileInfoSA.h"
#include "CEventListSA.h"
#include "CGaragesSA.h"
#include "CTasksSA.h"
#include "CEventDamageSA.h"
#include "CEventGunShotSA.h"
#include "CEventGroupSA.h"
#include "CAnimManagerSA.h"
#include "CStreamingSA.h"
#include "CVisibilityPluginsSA.h"
#include "CKeyGenSA.h"
#include "CRopesSA.h"
#include "CFxSA.h"
#include "HookSystem.h"
#include "CModelInfoSA.h"
#include "CPedModelInfoSA.h"
#include "CColPointSA.h"
#include "CCivilianPedSA.h"
#include "CAnimBlendAssociationSA.h"
#include "CAnimBlendAssocGroupSA.h"
#include "CAnimBlendHierarchySA.h"
#include "CAnimBlendSequenceSA.h"
#include "CAnimBlendStaticAssociationSA.h"
#include "CAnimBlockSA.h"
#include "CAutomobileSA.h"
#include "CBikeSA.h"
#include "CBoatSA.h"
#include "CBmxSA.h"
#include "CQuadBikeSA.h"
#include "CMonsterTruckSA.h"
#include "CPlaneSA.h"
#include "CTrailerSA.h"
#include "CPlayerPedSA.h"
#include "CCivilianPedSA.h"
#include "CObjectSA.h"
#include "CBuildingSA.h"
#include "CRestartSA.h"
#include "CWaterManagerSA.h"
#include "CPedDamageResponseSA.h"
#include "CPedDamageResponseCalculatorSA.h"

// selected MTA class includes
#include "CDirect3DData.h"

// WDL includes
#include "mutex.h"

// RakNet stuff
#include "BitStream.h"
#include "RakClient.h"
#include "HookedRakClient.h"

// normal includes
#include "patcher.h"
#include "CDetour.h"
#include "cheat.h"
#include "ini.h"
#include "keyhook.h"
#include "math_stuff.h"
#include "cheat_patches.h"
#include "cheat_funcs.h"
#include "cheat_generic.h"
#include "cheat_actor.h"
#include "cheat_vehicle.h"
#include "cheat_hookers.h"
#ifdef __CHEAT_VEHRECORDING_H__
#include "sqlite3/sqlite3.h"
#include "cheat_vehRecording.h"
#endif
#include "dumb_menu.h"
#include "samp.h"
#include "cheat_samp.h"
#include "debug_classify.h"
#include "d3drender.h"
#include "GTAfuncs.h"
#include "proxyIDirect3D9.h"
#include "proxyIDirect3DDevice9.h"

// main.cpp functions
void traceLastFunc ( const char *szFunc );
void Log ( const char *fmt, ... );
void LogChatbox ( bool bLast, const char *fmt, ... );
void setDebugPointer ( void *ptr );

// externals
extern HMODULE g_hDllModule;
extern char g_szWorkingDirectory[MAX_PATH];
extern FILE *g_flLog;
extern FILE *g_flLogAll;
extern char g_szLastFunc[256];
extern uint32_t g_dwSAMP_Addr;
extern char g_szSAMPVer[16];
extern CSettingsSAInterface *g_pCSettingsSAInterface;
extern D3DPRESENT_PARAMETERS *g_pGTAPresent;
extern RsGlobalType *g_RsGlobal;
extern CCameraSA g_CCamera;

// new MTA externals
extern CGameSA *pGameInterface;
extern CPools *pPools;
extern CPed *pPedSelf;
extern CPedSAInterface *pPedSelfSA;
extern CDirect3DData *pD3DData;

// store info about Windows OS
extern t_WindowsInfo WindowsInfo;

#include "new_menu.cpp"

// externals
#endif

Calls:
[member=5679]T3K[/member]
[member=111]springfield[/member]
[member=60]Opcode.eXe[/member]
[member=2]0x688[/member]
 

0x_

Wtf I'm not new....
Administrator
Joined
Feb 18, 2013
Messages
1,118
Reaction score
166
First of all, please learn the basics of C++.
Second you don't include source files you include headers files.

And last but not least, these errors you got imply there are multiple definitions of the same thing
 

0x32789

Expert
Joined
May 26, 2014
Messages
849
Reaction score
51
Location
LongForgotten <-> 0x32789
0x688 link said:
First of all, please learn the basics of C++.
Second you don't include source files you include headers files.

And last but not least, these errors you got imply there are multiple definitions of the same thing

First, I'm learning.
Second, I'm not a retard, Sorry for my last post.

Actually I didnt add the new_menu file to the project fuck me. I'm wrong
========== Rebuild All: 1 succeeded, 0 failed, 0 skipped ==========
Sweet, pleasure to make business with you

:sweet_jesus:

EDIT: I go IG, press F2 and BOOM!
gta_sa.exe has stopped working.
 
Top