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 


linking error
Goto page 1, 2  Next
 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
oib111
I post too much
Reputation: 0

Joined: 02 Apr 2007
Posts: 2947
Location: you wanna know why?

PostPosted: Tue Jun 10, 2008 5:36 pm    Post subject: linking error Reply with quote

I'm trying to compile a hooking dll, that I've already made. But I was editing somethings, compiled and I got a linking error. I then replaced the code with the original code and I still got the error. I even made a new project and got the error. Anyway here it is, two warnings, one error.

Quote:

------ Build started: Project: apihook, Configuration: Debug Win32 ------
Compiling...
cl : Command line warning D4002 : ignoring unknown option '/errorReport:prompt'
cl : Command line warning D4024 : unrecognized source file type 'ÿ_/', object file assumed
LINK : fatal error LNK1181: cannot open input file ' ■/.obj'
Build log was saved at "file://c:\Documents and Settings\OIB\My Documents\Visual Studio 2008\Projects\apihook\apihook\Debug\BuildLog.htm"
apihook - 1 error(s), 2 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

_________________


8D wrote:

cigs dont make people high, which weed does, which causes them to do bad stuff. like killing
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
Noz3001
I'm a spammer
Reputation: 26

Joined: 29 May 2006
Posts: 6220
Location: /dev/null

PostPosted: Tue Jun 10, 2008 5:39 pm    Post subject: Reply with quote

Unicode file names?
Back to top
View user's profile Send private message MSN Messenger
oib111
I post too much
Reputation: 0

Joined: 02 Apr 2007
Posts: 2947
Location: you wanna know why?

PostPosted: Tue Jun 10, 2008 5:55 pm    Post subject: Reply with quote

noz3001 wrote:
Unicode file names?


What?

_________________


8D wrote:

cigs dont make people high, which weed does, which causes them to do bad stuff. like killing
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
lurc
Grandmaster Cheater Supreme
Reputation: 2

Joined: 13 Nov 2006
Posts: 1900

PostPosted: Tue Jun 10, 2008 6:51 pm    Post subject: Reply with quote

He's talking about the

' ■/.obj'

the little black block is a UNICODE character.

_________________
Back to top
View user's profile Send private message
oib111
I post too much
Reputation: 0

Joined: 02 Apr 2007
Posts: 2947
Location: you wanna know why?

PostPosted: Tue Jun 10, 2008 6:53 pm    Post subject: Reply with quote

lurc wrote:
He's talking about the

' ■/.obj'

the little black block is a UNICODE character.


Ok. But I'm not doing anything in UNICODE, at all.

_________________


8D wrote:

cigs dont make people high, which weed does, which causes them to do bad stuff. like killing
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
lurc
Grandmaster Cheater Supreme
Reputation: 2

Joined: 13 Nov 2006
Posts: 1900

PostPosted: Tue Jun 10, 2008 6:56 pm    Post subject: Reply with quote

Post Source ??
_________________
Back to top
View user's profile Send private message
oib111
I post too much
Reputation: 0

Joined: 02 Apr 2007
Posts: 2947
Location: you wanna know why?

PostPosted: Tue Jun 10, 2008 7:15 pm    Post subject: Reply with quote

Code:

BOOL APIHOOK(LPCSTR DllName, LPCSTR API, DWORD Replace) {
   DWORD AddressToHook = (DWORD)GetProcAddress(LoadLibrary(DllName), API);
   BYTE *ATH = (BYTE*)AddressToHook;
   Byte *ATU = (BYTE*)Replace;
   
   VirtualProtect((LPVOID)AddressToHook, 5, PAGE_EXECUTE_READWRITE, NULL);
   *ATH++ = 0xE9;
   *(signed int*)ATH = ATU-(ATH+4);
   VirtualProtect((LPVOID)AddressToHook, 5, PAGE_EXECUTE, NULL);
   FlushInstructionCache(GetCurrentProcess(), NULL, NULL);
   return TRUE;
}

_________________


8D wrote:

cigs dont make people high, which weed does, which causes them to do bad stuff. like killing
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
kitterz
Grandmaster Cheater Supreme
Reputation: 0

Joined: 24 Dec 2007
Posts: 1268

PostPosted: Tue Jun 10, 2008 7:26 pm    Post subject: Reply with quote

If you keep on getting the error even with reverting to the old source....Then it must be something with the program, correct?

I dunno, im still in the process of learning C++ but....

im sure you tried this already......

1. Clean it?
2. Rebuild it?
Back to top
View user's profile Send private message Send e-mail
HalfPrime
Grandmaster Cheater
Reputation: 0

Joined: 12 Mar 2008
Posts: 532
Location: Right there...On your monitor

PostPosted: Tue Jun 10, 2008 7:33 pm    Post subject: Reply with quote

You made a brand-new project and it wouldn't compile? Sounds like you messed something up int he options.
_________________
Back to top
View user's profile Send private message
oib111
I post too much
Reputation: 0

Joined: 02 Apr 2007
Posts: 2947
Location: you wanna know why?

PostPosted: Tue Jun 10, 2008 8:00 pm    Post subject: Reply with quote

I'll check.
_________________


8D wrote:

cigs dont make people high, which weed does, which causes them to do bad stuff. like killing
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
Flyte
Peanuts!!!!
Reputation: 6

Joined: 19 Apr 2006
Posts: 1887
Location: Canada

PostPosted: Tue Jun 10, 2008 11:07 pm    Post subject: Reply with quote

This doesn't actually have anything to do with the error you are talking about, but GetProcAddress() doesn't have a Unicode variant, and therefore you should always pass an ASCII string to it in the second parameter.

Also, clean up that code; there are useless variables floating around everywhere in it.
Back to top
View user's profile Send private message
atom0s
Moderator
Reputation: 205

Joined: 25 Jan 2006
Posts: 8587
Location: 127.0.0.1

PostPosted: Wed Jun 11, 2008 12:23 am    Post subject: Reply with quote

According to the MSDN this is due to invalid directory settings in your IDE. Various users mentioned having previous versions of other compilers installed and Visual Studio 2008 was using an incorrect linker.exe when compiling.

Adjust your directories to be sure to include the proper location for the new linker to be used with 2008.

_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
oib111
I post too much
Reputation: 0

Joined: 02 Apr 2007
Posts: 2947
Location: you wanna know why?

PostPosted: Wed Jun 11, 2008 9:02 am    Post subject: Reply with quote

Flyte wrote:

Also, clean up that code; there are useless variables floating around everywhere in it.


Such as?

_________________


8D wrote:

cigs dont make people high, which weed does, which causes them to do bad stuff. like killing
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
Ferocious
Advanced Cheater
Reputation: 0

Joined: 06 Feb 2008
Posts: 54

PostPosted: Wed Jun 11, 2008 9:05 am    Post subject: Reply with quote

i dont think it has to do anything with the source, because i could compile that without any problem.
_________________
I wanna hack, but I don't know how...


Last edited by Ferocious on Wed Jun 11, 2008 9:14 am; edited 1 time in total
Back to top
View user's profile Send private message
oib111
I post too much
Reputation: 0

Joined: 02 Apr 2007
Posts: 2947
Location: you wanna know why?

PostPosted: Wed Jun 11, 2008 9:14 am    Post subject: Reply with quote

Lol, yeah it is Ferocious. I had to take out so many useless things in there, and I wondered, why are these even here, you're not doing anything xD

@Wiccaan

Thanks, its working now. I removed my DDK directories.

_________________


8D wrote:

cigs dont make people high, which weed does, which causes them to do bad stuff. like killing
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Goto page 1, 2  Next
Page 1 of 2

 
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