Getting some errors when compiling on Ubuntu x64

Added by trendal over 7 years ago

Hey!

I'm getting the following errors when trying to compile:

/home/neil/ryzom/code/ryzom/tools/leveldesign/named_items_2_csv/named_items_2_csv.cpp:29:44: error: ..\nel\include\nel\misc\common.h: No such file or directory
/home/neil/ryzom/code/ryzom/tools/leveldesign/named_items_2_csv/named_items_2_csv.cpp:30:43: error: ..\nel\include\nel\misc\debug.h: No such file or directory
/home/neil/ryzom/code/ryzom/tools/leveldesign/named_items_2_csv/named_items_2_csv.cpp:31:45: error: ..\nel\include\nel\misc\sstring.h: No such file or directory
/home/neil/ryzom/code/ryzom/tools/leveldesign/named_items_2_csv/named_items_2_csv.cpp:32:42: error: ..\nel\include\nel\misc\path.h: No such file or directory
/home/neil/ryzom/code/ryzom/tools/leveldesign/named_items_2_csv/named_items_2_csv.cpp:33:42: error: ..\nel\include\nel\misc\file.h: No such file or directory

There are then a whole whack of errors for the same file, I assume they are due to the compiler not finding the header files. I've checked, and the files are where they are supposed to be.

I also get the following error:

/home/neil/ryzom/code/ryzom/tools/leveldesign/mp_generator/main.cpp:1546: error: ‘::main’ must return ‘int’

Can I just go into 'mp_generator/main.cpp' and fix the return?

Thanks!


Replies (5)

RE: Getting some errors when compiling on Ubuntu x64 - Added by kervala over 7 years ago

Just fixed in Hg :)

Thanks for reporting that :)

First problem was the backslashes as path separator and second only needs to return 0 :s

RE: Getting some errors when compiling on Ubuntu x64 - Added by trendal over 7 years ago

I am still getting the error in mp_generator/main.cpp

Here is the full printout:

In file included from /home/neil/ryzom/code/ryzom/tools/leveldesign/mp_generator/main.cpp:18:
/home/neil/ryzom/code/ryzom/tools/leveldesign/mp_generator/utils.h: In member function ‘void CProducedDocHtml::open(const std::string&, const std::string&, bool)’:
/home/neil/ryzom/code/ryzom/tools/leveldesign/mp_generator/utils.h:283: warning: format not a string literal and no format arguments
/home/neil/ryzom/code/ryzom/tools/leveldesign/mp_generator/utils.h: In member function ‘void CProducedDocHtml::write(const std::string&)’:
/home/neil/ryzom/code/ryzom/tools/leveldesign/mp_generator/utils.h:292: warning: format not a string literal and no format arguments
/home/neil/ryzom/code/ryzom/tools/leveldesign/mp_generator/main.cpp: In function ‘void ItemNamesSave()’:
/home/neil/ryzom/code/ryzom/tools/leveldesign/mp_generator/main.cpp:1295: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’, declared with attribute warn_unused_result
/home/neil/ryzom/code/ryzom/tools/leveldesign/mp_generator/main.cpp:1299: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’, declared with attribute warn_unused_result
/home/neil/ryzom/code/ryzom/tools/leveldesign/mp_generator/main.cpp: At global scope:
/home/neil/ryzom/code/ryzom/tools/leveldesign/mp_generator/main.cpp:1546: error: ‘::main’ must return ‘int’
/home/neil/ryzom/code/ryzom/tools/leveldesign/mp_generator/main.cpp:1546: warning: second argument of ‘int main(int, char*)’ should be ‘char *
In file included from /home/neil/ryzom/code/ryzom/tools/leveldesign/mp_generator/main.cpp:18:
/home/neil/ryzom/code/ryzom/tools/leveldesign/mp_generator/utils.h: In member function ‘std::string CSortableData<NC>::TSortableItem::toHTMLRow(uint32, const std::string&, const std::string&, uint32, const std::string&) const [with unsigned int NC = 16u]’:
/home/neil/ryzom/code/ryzom/tools/leveldesign/mp_generator/main.cpp:1440: instantiated from here
/home/neil/ryzom/code/ryzom/tools/leveldesign/mp_generator/utils.h:68: warning: comparison between signed and unsigned integer expressions
make2:
[ryzom/tools/leveldesign/mp_generator/CMakeFiles/mp_generator.dir/main.cpp.o] Error 1
make1:
[ryzom/tools/leveldesign/mp_generator/CMakeFiles/mp_generator.dir/all] Error 2
make1: *
* Waiting for unfinished jobs....

I think the error is saying that the main() function has to be set up as 'int main(...)' instead of 'void main(...)'. You have the return value in there, but the error still shows up.

I wish I had done some coding recently. As is, it is nearly 15 years since I've touched C/C++!

RE: Getting some errors when compiling on Ubuntu x64 - Added by kervala over 7 years ago

Sorry, I'm not under Linux now and I didn't check the return type :(

It should be fixed now.

RE: Getting some errors when compiling on Ubuntu x64 - Added by trendal over 7 years ago

I changed it to 'int main()', works fine now!

Thanks again, eh! I "may" have some more questions, as I get into this ;-)

(1-5/5)