EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Support::Windows Servers (https://www.eqemulator.org/forums/forumdisplay.php?f=587)
-   -   Compiling help ...yes another one of THOSE threads :) (https://www.eqemulator.org/forums/showthread.php?t=23575)

sonicintuition 09-01-2007 04:05 PM

Compiling help ...yes another one of THOSE threads :)
 
Hey all,

I have a quick question regarding compiling the emu with VC++ 2005 express - I got it to build, yay for me, however ...it also compiled with 40 some warnings ...does this happen to everyone or am I doing something wrong? Will this affect the compiled executables?

Sonic

John Adams 09-02-2007 01:23 AM

Warnings do not matter much. There are lots of 'you shouldn't compare this value with that value' warnings that are just that; warnings. Errors are the only show stoppers. Worst thing that could happen with a warning is the code is not as optimized as it could be, but for Emu, it's negligible.

WildcardX 09-02-2007 02:02 AM

Actually..

I remember in my first CSCI courses with C++ my instructor putting it like this.. "in systems development, treat warnings like errors and errors as worst errors.".

Warnings really shouldnt be ignored, but yes they are normal for the eqemu code atm. Most of those warnings are flagging things like deprecated functions and such, which are serious in their own right, but are not preventing a compiling of the binaries from succeeding.

My point is this. if you or anyone else here would like to clean these up, which is rather simple really just time consuming, go ahead and do so and just post a diff of the changes to remedy the warnings and we'll happily incorporate them into the eqemu repository.

Otherwise, enjoy the game!

sonicintuition 09-02-2007 07:28 AM

Thanks guys. That helps clear that up. I do have a question though - I did notice the deprecated warnings and all that ..so I looked into it a bit on my own and saw that deprecation can be disabled by adding some line to the top of certain files that call for the deprecated functions - I don't remember the exact wording, but anyway if I went through and did that, would it affect the functions? I'm no C++ coder (but I am trying to learn) yet, and therefore I don't feel like I should be tinkering unless I know I'm not going to royally fuck something up heh...


Thanks again,
Sonic

froglok23 09-02-2007 07:54 AM

HI sonicintuition,

We are aware of these warnings, for not, its best to ignore them. People are working on a fix for them, please see thread: http://www.eqemulator.net/forums/sho...d=1#post137876

However, this is more of a statement aid at the dev team and that is... warnings should not be ignored, just as wild said. As i stated in the above thread, these warnings are possible vectors to be explioted by a naughty users.

But all in all, steps are in place to correct them.

- froglok

froglok23 09-02-2007 07:57 AM

Quote:

Originally Posted by John Adams (Post 137839)
Warnings do not matter much. There are lots of 'you shouldn't compare this value with that value' warnings that are just that; warnings. Errors are the only show stoppers. Worst thing that could happen with a warning is the code is not as optimized as it could be, but for Emu, it's negligible.

Or as i discovered, points where a user can use a bufferover and inject shellcode.... remote code execution :(

But yeah, see my previous post, I just felt the need to demonstraight why warnings are there for a reason :) Nothing against you of course :)

- froglok

John Adams 09-02-2007 02:01 PM

Oh I definitely agree warnings should be fixed (and I like the annecdote "warnings are errors, errors are worse errors" hehe - I think I'll start using that at work. :/ )

All I was suggesting is that you can still compile and execute with them, just not as fully optimized as one would hope (including haXxoR hoLeZ). I get ya. Frooooaaaak!

sonicintuition 09-05-2007 05:07 PM

Alright ..now I'm TOTALLY confused on this. Sometimes when I compile zone, I get these 32 deprecation warnings, and then sometimes when I compile it, I get no warnings at all... This is the same build too, I haven't switched source code. *confused*


Regards,
Sonic

John Adams 09-05-2007 05:12 PM

Are you performing a Clean then Compile each time? If you are only changing 1 file, that's all it's going to compile. :)
(usually)
Unless it's something that is used across many files - like a header.

Or, maybe it assumes you know about the earlier warnings and doesn't want to be insulting.

sonicintuition 09-05-2007 08:07 PM

Heh ...doesn't want to be insulting ..you crack me up :) Anyway, no I wasn't cleaning first ...I suppose that's why.

Sonic

froglok23 09-05-2007 08:49 PM

Theres 2 types of compiling.

1 is a "Rebuild" or a "Clean Compile" which will compile every source file and create its object file, then link them all together to make a .exe

Then there is a "Batch" Build, which, only compiles the file you have changed, then uses the new object file, it links it all the existing ones to give you your exe.

It just saves you recompiling the entire project every time you make a change.

Warnings / Errors / etc are only shown on compile.

-froglok


All times are GMT -4. The time now is 11:27 AM.

Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.