Compiler Problems

A forum for feature requests/discussions and user submitted patches that improve MQ2

Moderator: MacroQuest Developers

User avatar
driftinsupra
Official loudmouth
Official loudmouth
Posts: 212
Joined: Tue Jan 28, 2003 9:25 pm

Post by driftinsupra » Mon Mar 10, 2003 11:06 pm

BOOOYAAA! Valerian sent me the file anmd now it works perfectly. I was wondering though, what is still broken on this ver, all I used was /whotarget and it worked fine. Also is it safe or not? I know it will never be "safe" but will it be as safe as the older ver was before the big break. I just dont want to be using it if it is going to set off alot of alarms.

Mckorr
Developer
Developer
Posts: 2326
Joined: Fri Oct 18, 2002 1:16 pm
Location: Texas

Post by Mckorr » Tue Mar 11, 2003 6:27 am

Now you're asking a question no one can answer. Beyond the 5 minute disconnect I doubt anyone here has any idea of what other checks were implemented. And anyone who CAN answer that question is probably an SOE spy....

BTW... most people using 3rd party software or hacks are caught, not by GMs or the server, but by other players. They do something stupid, or run their mouths, and a petition gets filed. Next thing you know you are being tracked by invisible Guides who are just waiting for you to make a mistake.

jninja
decaying skeleton
decaying skeleton
Posts: 5
Joined: Sun Mar 09, 2003 12:33 pm

Post by jninja » Tue Mar 11, 2003 5:30 pm

For the VC60 compiler, you must:
1. Compile the detours source and move lib and pdb file into appropriate directory
2. Create a blank win32 application project pointing at the MQ directory.
3. Add a win32 dll project to the project in step 2. Call it eqlib
4. Add all the sources in the eqlib directory to the eqlib project.
5. Add the CINTERFACE definition to the Preprocess definitions.
did this, it works fine, but i get 26 errors (i'll post them if needed), they are all from ""inconsistent dll linkage. dllexport assumed.""
6. Add the DX8.1 include path to the Additional include directories.
7. Add ws2_32.lib to the Object/library modules.
8. Add ..\Detours\lib (where you put the objects from 1.) to Additional library path
9. Press F7 and cross your fingers.
10. Switch back to the main project.
11. Add the sources in the MacroQuest directory to this project.
12. Press F7 and pray.
can you explain this further?

Mckorr
Developer
Developer
Posts: 2326
Joined: Fri Oct 18, 2002 1:16 pm
Location: Texas

Post by Mckorr » Tue Mar 11, 2003 5:40 pm

My guess, if you are getting errors after step 5, is that you are trying to compile before step 9....

jninja
decaying skeleton
decaying skeleton
Posts: 5
Joined: Sun Mar 09, 2003 12:33 pm

Post by jninja » Tue Mar 11, 2003 7:06 pm

any way someone could explain 6, 7, and 8 in more detail?

Dirtface
a lesser mummy
a lesser mummy
Posts: 39
Joined: Tue Nov 12, 2002 2:43 am

Post by Dirtface » Wed Mar 12, 2003 4:54 am

I will say this. The rebuilding of MQ certainly seems to have eliminated most of the elitist attitude that was overflowing previously.

And on the other end, it also seems to have revitalized the use of the SEARCH button. ; P

just some guy
decaying skeleton
decaying skeleton
Posts: 1
Joined: Thu Mar 13, 2003 3:43 am

Post by just some guy » Thu Mar 13, 2003 3:49 am

after doing all the steps i get an error and i have absolutely no idea how to remedy it. i use vc6. here is the error.

Compiling...
EQLib.cpp
c:\src-20030308\eqlib\eqlib.cpp(21) : fatal error C1189: #error : /DCINTERFACE
Error executing cl.exe.

EQLib.obj - 1 error(s), 0 warning(s)

any help is appreciated

User avatar
Kint
a hill giant
a hill giant
Posts: 208
Joined: Thu Mar 13, 2003 3:36 am

6, 7, 8...

Post by Kint » Thu Mar 13, 2003 4:01 am

I'll try my best and try to help some people out with these.
6. Add the DX8.1 include path to the Additional include directories.
7. Add ws2_32.lib to the Object/library modules.
8. Add ..\Detours\lib (where you put the objects from 1.) to Additional library path
6 is more than is needed. Just goto microsoft and download the 8.1 SDK. You do not have to install it, just unzip it and goto the include file and grab the file dinput.h. Find the path to the dinput file. It should look something like

Code: Select all

C:\dxsdk\include
. Once you've found the path, go into the compiler. On the left side you should see your workspace. Makesure the FileView tab (on the bottom of worspace) is selected. Then right click on your eqlib project and goto Settings.... A box should pop up, on the upper left, make sure that "All Configurations" is selected in the drop down box.
On the right side (more or less), click on the C/C++ tab. More or less below that tab there should be a drop down menue labeled "Category". scroll down to the last one, Preprocessor. There should be a place to type in "Additional Include Directories". Put in the dxsdk/inclue directory in there (C:\dxsdk\include, etc) in there.
BTW, if dinput isn't in the include directory, then I messed up the name of the file, just find it in there and use the correct path(it's late =\)

As for #7, simply stay in the same box as for #6, and then click on the "Link" tab. Stay in the General Category. Look for the the Object/library modules section and just type in: :ws2_32.lib" using spaces, not commas.

for #8... take the files from #1, it should be under the lib file. Get the file path to that (C:\tmp\lib, ..\Detours\lib , etc) and then stay in the same box as previous steps. Stay in the "Link" tab and scroll down to the "Input" drop down in the "Category" menue. There should be a section named Additional library path:, put in the path the the Detours/lib file.

That's as simple as I can make it. I hope you guys can make it from here.

User avatar
Kint
a hill giant
a hill giant
Posts: 208
Joined: Thu Mar 13, 2003 3:36 am

Just some guy...

Post by Kint » Thu Mar 13, 2003 4:03 am

see step 5
5. Add the CINTERFACE definition to the Preprocess definitions.
see my previous post and feel around from there for the place to put it in.

User avatar
Kint
a hill giant
a hill giant
Posts: 208
Joined: Thu Mar 13, 2003 3:36 am

Some basic troubleshooting tips.

Post by Kint » Thu Mar 13, 2003 4:19 am

if you get

Code: Select all

Compiling... 
EQLib.cpp 
c:\src-20030308\eqlib\eqlib.cpp(21) : fatal error C1189: #error : /DCINTERFACE 
Error executing cl.exe. 

EQLib.obj - 1 error(s), 0 warning(s) 
or

Code: Select all

--------------------Configuration: macroquest - Win32 Release-------------------- 
Linking... 
LIBC.lib(crt0.obj) : error LNK2001: unresolved external symbol _main 
Release/macroquest.exe : fatal error LNK1120: 1 unresolved externals 
Error executing link.exe. 

macroquest.exe - 2 error(s), 0 warning(s) 
then you need to see step #5 and add CINTERFACE definition to the Preprocess definitions. (program settings>C/C++>preproccessor)



If you get 26 errors and quite a few warnings, then you don't have the correct vesion of dinput.h

solution: goto microsoft.com and download the directx8 SDK, do not install it, just unzip it and find the dinput.h file under the include file. get the path to that and then put it in the Additional include directories. See my previous replies for detailed information on that one. (I believe you can just move that file into your compilers include directory.



If you can compile MQ, but when you run it, it has no icons, then you need to include the *.rc file in the project. Just click on the respective project, in the worspace rightclick on the respective "Resource File" right click on it and click on "add files to folders". Add the respective *.rc file to the right project (i.e. eqlib.rc to the eqlib project).


If you can compile MQ, but when the icon appears on the taskbar, it crashes right away, I'm pretty sure that it means that you don't have the .dll file in the right directory, or the .dll file isn't compiled correctly.


Solution: I'll go back a bit, so people will be sure they did this right. Make sure you've done step 3-9 to the .dll file, or the eqlib.dll. click F7 and that's it. Do not try and compile the file before you do steps 1-9 succesfully though. anyways, make sure you've done them all correctly (1-9) that is. Then do step 10-12. Now you want the following files in one directory:


eqgame.ini(came with source, make sure it's got the proper offsets!)
eqlib.dll(you compiled this one, grab it from the projects debug file)
MacroQuest.ini(came with source)
MacroQuest.exe(you compiled this, grab it from the projects debug file)
and
perl56.dll


These are the only essential files that are needed.

hope this helps. And feel free to delete it if I'm defeating the purpose of having it source only =p.

fan
decaying skeleton
decaying skeleton
Posts: 8
Joined: Sun Feb 02, 2003 4:39 am

Post by fan » Fri Mar 14, 2003 8:46 pm

C:\Temp\src>nmake

Microsoft (R) Program Maintenance Utility Version 7.00.9466
Copyright (C) Microsoft Corporation. All rights reserved.

if not exist "..\include" mkdir "..\include"
if not exist "..\lib" mkdir "..\lib"
detours.cpp
C:\Temp\src\detours.cpp(11) : fatal error C1083: Cannot open include file: 'ole2
.h': No such file or directory
NMAKE : fatal error U1077: 'cl' : return code '0x2'
Stop.

User avatar
dont_know_at_all
Developer
Developer
Posts: 5450
Joined: Sun Dec 01, 2002 4:15 am
Location: Florida, USA
Contact:

Post by dont_know_at_all » Fri Mar 14, 2003 9:15 pm

run vcvars32.bat first

Gengis
a ghoul
a ghoul
Posts: 116
Joined: Wed Aug 14, 2002 7:46 pm

Post by Gengis » Sat Mar 15, 2003 1:11 am

Thanks for the useful posts, I've finally got it to compile under VS Pro 6 and it WORKS.

P.S. Don't ask me for the files.

Iceman2k12
orc pawn
orc pawn
Posts: 24
Joined: Thu Jul 11, 2002 2:04 am

Post by Iceman2k12 » Sat Mar 15, 2003 1:24 pm

where do i get v6++ or whatever its called? :)

Mckorr
Developer
Developer
Posts: 2326
Joined: Fri Oct 18, 2002 1:16 pm
Location: Texas

Post by Mckorr » Sat Mar 15, 2003 1:58 pm

If you are going to buy Visual C++, you want to get the .Net edition (VC7), unless you can get a great deal on used software.

If you don't want to buy it... well, that is left as an exercise to the end user. In other words, you can't download it legally, and we won't help you by providing locations for illegal versions.

Violating the EULA is one thing, drawing the attention of the Feds is another 8)