PDA

View Full Version : Error Compliling


takatok
08-15-2011, 11:32 PM
I have 2 main errors.

I believe the first error is perl related, but while I'm familiar with c++ and visual C, I haven't used perl much at all.

To start with, I followed this guide: http://www.eqemulator.org/forums/showthread.php?t=32980
And got the latest source using SVN just 30 minutes ago.


While compiling 2 of the 5 of the projects fail to the following error:

left operand must be an l-value.

Everyone one of the errors revolves around the following Macro:
GvCV(gp). For example Zone fails in emperl.cpp(150)

GvCV(exitgp) = perl_get_cv("my_exit", TRUE); //dies on error

I was unable to find perl 5.1 rev 1007 without buying the business edition so I"m using the lastest perl. 5.14.1 rev 1401.

I've made sure all the directories in VC++ are pointing to the correct lib and include files for the perl installation. Any help on what might be causing the error would be appreciated. Even knowing if its a version problem or more likely a setup problem would be a big help.



The second error just revolves around linking in zlib. Its looking to link in zlib.lib. I'm not sure if this is a version problem as I'm unfamilir with zlib. But the zlib I downloaded has a zlib1.dll in the main directory(which I copied into my system32 folder) and inside the lib directory has zdll.exp and zdll.lib. So not sure if I should be linking one of thse or not instead?

Tony

lerxst2112
08-16-2011, 12:28 AM
You might try ActiveState 5.12 and see if you have the same issues. I believe 5.14 is the first to make that macro return an r-value. You will also need to search the code for the string #pragma comment(lib, "perl510.lib") and change it to the version you end up using. There are two places that need to be changed.

Some have reported that Strawberry Perl 5.10 worked for them, although I have not used it. You can get it here: http://strawberryperl.com/


I haven't had to compile with the newer version of zlib that renamed the files yet. If I had to I'd probably text replace "zlib.lib" to "zdll.lib" in all the *.vcproj files under the EQEmuServer directory and hope for the best. Kind of a pain though because if someone changes one you'll have a conflict when you refresh from SVN.

Other options include working some Google-Fu to find an older version before the rename, or some people have said that just renaming the new file to zlib.lib worked for them.

takatok
08-16-2011, 03:15 AM
Thanks for the help.

If anyone else encounters these problems -- Switching to 5.12 and changing the pragma worked wonderfully. Changing the files to link to zdll also worked with one slight problem.

I'm currently using mysql server 5.1.58 and zlib version 1.2.3

On both zone and world I get the following linking problems:
3>mysqlclient.lib(inflate.obj) : error LNK2005: _inflateInit2_ already defined in zlib.lib(zlib1.dll)
3>mysqlclient.lib(inflate.obj) : error LNK2005: _inflate already defined in zlib.lib(zlib1.dll)
3>mysqlclient.lib(inflate.obj) : error LNK2005: _inflateEnd already defined in zlib.lib(zlib1.dll)


I'm guessing either both libraries do the same function or somehow they picked the same names for diffrent functions. Obviously a version problem between to the two. If anyone can tell me what versions of mysql and zlib they are using I might be able to hunt down older copies of one or the other. Links to either would be even more excellent.

Down to this final error to get things working

UPDATE ---------- UPDATE
Well after poking around in the mysql dirs. I noticed it used zlib itself. After seeing a million dependency problems fixed by switching order around, I flipped the lib directories in VC++. Worked like a charm. SO MAKE SURE MYSQL IS ABOVE ZLIB in the VC++ directories if you encounter this problem.

Tony

PS thanks again for the help lerxst