Page 1 of 2

Getting a compile error on MQ2Main in EQClasses.cpp

Posted: Wed Feb 15, 2006 1:32 am
by spat
http://www.macroquest2.com/wiki/index.p ... leshooting


when i try and complile MQ2Mail i get this error

Code: Select all

1>.\EQClasses.cpp(128) : error C3068: 'EQClasses::CStmlWnd::AppendSTML' : a 'naked' function cannot contain objects that would require unwinding if a C++ exception occurred
Im trying to figure out how to either 1) make Visual studio express ignore this or fix this error...

I get this in about 7 different places in EQClasses.cpp

one Example is:

Code: Select all

FUNCTION_AT_ADDRESS(class CXSize& CStmlWnd::AppendSTML(class CXSize*,class CXStr),CStmlWnd__AppendSTML);
Thanks for those who can spend the time and help me with this,

Posted: Wed Feb 15, 2006 2:47 am
by dont_know_at_all
A/S/L?

Posted: Wed Feb 15, 2006 3:14 pm
by spat
lol,

I think its just the visual studio express compiler beeing too strict.

Im 22, I usedto study computer science in college, but now im in the military studying russian, so i preaty much forgot all of my coding =/ Tried to figure out what the hell the compiler was bitching about in that line. Searched the vs help database and it gave a couple of solutions, none of wich i could implement on my own....

I am using the microsoft PSDK-x86 api and the Visual C++ Express edition that was linked to from wiki...

Posted: Wed Feb 15, 2006 4:32 pm
by dont_know_at_all
That error is caused by you either changing something that should not be changed or making your own project file with incorrect options. You need to turn off exception handling...

Posted: Wed Feb 15, 2006 4:45 pm
by spat
This is what i have done thus far:

I unziped the zip file from the site into its on directory, retaining the directory structure etc.

Then I double click the macroquest.dsw and it loads visual c++ express and asks me to convert the project, i click yes and atempt to compile and bam get that error. I have been searching in Visual C++ express where i can turn off exceptions etc and just make it build it regardless of what it thinks is incorrect.

I will atempt to load up the .dsw, when i get off of work, w/o converting it to the Visual c++ express format and see if it lets me compile, and continue to search for where i can turn off exception handeling. The only thing i have found thus far is where i can tell the compiler to ignore warnings, not errors =/

Posted: Wed Feb 15, 2006 4:57 pm
by fearless
I am fairly sure that the dsw file is for VC6. You should be using the sln for VC2005. Though, that may not make a difference on any of your problems.

Posted: Wed Feb 15, 2006 7:08 pm
by spat
loading the solution file rather than the workspace fixed that problem. now i am hung up on:

Code: Select all

1>   Creating library ..\Release/MQ2Main.lib and object ..\Release/MQ2Main.exp
1>MQ2Auth.obj : error LNK2019: unresolved external symbol __imp__CallNextHookEx@16 referenced in function "long __stdcall proc(int,unsigned int,long)" (?proc@@YGJHIJ@Z)
1>MQ2Main.obj : error LNK2001: unresolved external symbol __imp__CallNextHookEx@16
1>MQ2Commands.obj : error LNK2019: unresolved external symbol __imp__ShellExecuteA@24 referenced in function _Exec
1>MQ2DetourAPI.obj : error LNK2019: unresolved external symbol __imp__MessageBoxA@16 referenced in function "void __cdecl CrashDetected_Detour(unsigned long,unsigned long,unsigned long,unsigned long,unsigned long)" (?CrashDetected_Detour@@YAXKKKKK@Z)
1>MQ2Main.obj : error LNK2001: unresolved external symbol __imp__MessageBoxA@16
1>MQ2Utilities.obj : error LNK2001: unresolved external symbol __imp__MessageBoxA@16
1>MQ2Main.obj : error LNK2019: unresolved external symbol __imp__SetWindowsHookExA@16 referenced in function "void __cdecl InjectEnable(void)" (?InjectEnable@@YAXXZ)
1>MQ2Main.obj : error LNK2019: unresolved external symbol __imp__UnhookWindowsHookEx@4 referenced in function "void __cdecl InjectDisable(void)" (?InjectDisable@@YAXXZ)
1>..\Release/MQ2Main.dll : fatal error LNK1120: 5 unresolved externals
http://www.macroquest2.com/wiki/index.p ... leshooting

According to Wiki its probably that my windows.h lacks some lines, so i am in the process of re downloading the PSDK (using the direct links to the cabs from wiki) hopefully i can have that all downloaded by tonight, and have another run at the compile. (I tried re-dling the .zip and using winzip to unzip rather than windows, still get the same error. Guessing i have an old version of windows.h or something)

Posted: Wed Feb 15, 2006 8:21 pm
by fearless
yes, those are usually tied to the sdk's being installed incorrectly or are too old.

Posted: Wed Feb 15, 2006 8:24 pm
by bardomatic
Follow the instructions here:
http://msdn.microsoft.com/vstudio/expre ... usingpsdk/

Take special note of step 4.

Posted: Wed Feb 15, 2006 9:59 pm
by spat
Hot!

Thank you much. =)

Posted: Mon Feb 20, 2006 7:28 pm
by bwishardcore
I got this error and I did the things that bardomatic did. I also tried loading what I thought was the solution file (ISXEQ.sln) but that was only after trieng macroquest2.sln and macroquest2.dsw.

I'm also continueing to find where to turn off exception handling but any help would be appreciated.


Im using the Visual C++ Express with the SDKs.

Thanks guys

Posted: Mon Feb 20, 2006 8:34 pm
by bardomatic
if what I suggested doesn't work then all you need to do is delete your macroquest folder. Macroquest compiles fine right from the zip with properly installed software.

Posted: Mon Feb 20, 2006 9:00 pm
by bwishardcore
Ok one quick question - I downloaded the Visual Studio express 2005 off of microsoft.com. Is that compiler capable of Compiling MQ2?

I am currently working on setting up the free enviroment for compiling as explained on Wiki. I am decently computer literate but this is proving a challenge to me but Im starting from scratch and am determined to figure this out.

However, if the express version will work then I will continue to try and figure it out using that.

f

Posted: Mon Feb 20, 2006 9:09 pm
by rapierguy
If I remembert correctly there is a link somewhere on the boards about being able to compile with VS2005 Express. I forget where but I do remember seeing it. Don't have time to check for it since I'm late for a guild raid

Posted: Mon Feb 20, 2006 9:10 pm
by bwishardcore
I figured it out!

Even though it is cake for you guys I feel a sense of accomplishment lol!

Next step learning C++ and writing macros :D