Page 1 of 2

Linux (not really a) Compile Error

Posted: Sun Feb 22, 2009 11:26 am
by John Adams
I see this kind of odd thing show up once in a while in the sources, and it ends up generating an error during compile:

WorldDatabase.cpp, line 3092

Code: Select all

<<<<<<< .mine
}
=======
}

string WorldDatabase::GetColumnNames(char* name){
        Query query;
        MYSQL_ROW row;
        string columns = "";
        MYSQL_RES* result = query.RunQuery2(Q_SELECT, "show columns from %s", name);
        if(result && mysql_num_rows(result) > 0){
                int16 i = 0;
                while((row = mysql_fetch_row(result))){
                        if(strcmp(row[0], "table_data_version") != 0){
                                if(i>0)
                                        columns.append(",");
                                columns.append(row[0]);
                                i++;
                        }
                }
        }
        columns.append("");
        return columns;
}>>>>>>> .r622
~
The resulting compile error is:

Code: Select all

WorldDatabase.cpp:3092: error: expected primary-expression before â<<â token
WorldDatabase.cpp:3092: error: expected primary-expression before â<<â token
WorldDatabase.cpp:3092: error: expected primary-expression before â<<â token
WorldDatabase.cpp:3092: error: expected primary-expression before â<â token
WorldDatabase.cpp:3092: error: expected primary-expression before â.â token
WorldDatabase.cpp:3093: error: expected `;' before â}â token
WorldDatabase.cpp: At global scope:
WorldDatabase.cpp:3094: error: expected unqualified-id before â==â token
WorldDatabase.cpp:3095: error: expected declaration before â}â token
I usually resolve it by svn revert {module.cpp}

Is this caused because the working code has a modification in it that is not on SVN, and "svn" is trying to preserve it? If so, this is a terrible NIX crap concept of Merge :D But I can live with it. Just trying to understand.

Re: Dev 622 Linux Compile Error

Posted: Sun Feb 22, 2009 11:35 am
by LethalEncounter
Yup, that error occurs whenever you make a change locally that svn is not able to merge correctly. If you dont want to save your changes you can either revert it or delete it and do a svn update.

Re: Linux (not really a) Compile Error

Posted: Sun Feb 22, 2009 11:36 am
by John Adams
Yeah I changed the post title, since it's not a valid compile error, in case anyone else ever gets the same thing. Thanks!

Revert is simple enough.

Re: Linux (not really a) Compile Error

Posted: Sun Feb 22, 2009 11:38 am
by Zcoretri
I got compile errors this morning that had to do with the loginserver code.
I uhhh hacked the code to get it to compile for me :oops:

Re: Linux (not really a) Compile Error

Posted: Sun Feb 22, 2009 11:42 am
by John Adams
hackar!

You remember what they were? I didn't get any except for this above. I know I didn't change my local linux code, so maybe when LE was in there playing around last night that was some of the changes it tried to preserve - but it was only in WorldDatabase.cpp.

Re: Linux (not really a) Compile Error

Posted: Sun Feb 22, 2009 11:49 am
by Zcoretri
I use windblows with visual studio express 2008

there was no define for CURRENT_DATABASE_TABLE_VERSION among other things
CURRENT_DATABASE_DATA_VERSION
table version struct missing column_names?

Re: Linux (not really a) Compile Error

Posted: Sun Feb 22, 2009 11:56 am
by John Adams
Ah, I am sure that has something to do with the mysteries and mayhem LE is performing behind the curtain today. You do know the entire database update service is getting a face-lift today? :D

BACKUP YOUR DATAZ!

Re: Linux (not really a) Compile Error

Posted: Sun Feb 22, 2009 12:02 pm
by LethalEncounter
Those defines were in version.h, but I have since renamed them.

Re: Linux (not really a) Compile Error

Posted: Sun Feb 22, 2009 12:04 pm
by Zcoretri
Oh yeah...kinda forgots about that LOL...I stayed up this morning after feeding dog (6am PST) and I might have pulled down code not fully finished?

EDIT: JA, you have a quick and dirty way to save my character data? I don't have much of anything else that I can't redo, just want to save my toons :)

Re: Linux (not really a) Compile Error

Posted: Sun Feb 22, 2009 12:08 pm
by LethalEncounter
Go ahead and grab it now, it is good to go as far as I know.

Re: Linux (not really a) Compile Error

Posted: Sun Feb 22, 2009 12:11 pm
by John Adams
Use the EQ2DBTool.bat in the repack I gave you guys, edit it to point to your server and use Backup Character Data.

Re: Linux (not really a) Compile Error

Posted: Sun Feb 22, 2009 12:15 pm
by Zcoretri
LethalEncounter wrote:Go ahead and grab it now, it is good to go as far as I know.
Yep...good to go. Compiled no prob. Thanks LE :mrgreen:

Re: Linux (not really a) Compile Error

Posted: Sun Feb 22, 2009 1:05 pm
by Zcoretri
John Adams wrote:Use the EQ2DBTool.bat in the repack I gave you guys, edit it to point to your server and use Backup Character Data.
You have to run it in a specific place? Get error saying it can't find 'paths'

What are the development and release directories?

Re: Linux (not really a) Compile Error

Posted: Sun Feb 22, 2009 1:06 pm
by John Adams
Yeah, you run it where it was extracted. :D

Or, you can change those paths in the batch file to anything you want really. The repack has directories built into it for DB backup and restore.

Re: Linux (not really a) Compile Error

Posted: Sun Feb 22, 2009 1:09 pm
by Zcoretri
Ah, ok....i didn't extract the whole damn zip file just the batch file. I'll fuss with it :)