[Resolved]can't compile with accountserver.cbp (ubuntu OS)

Ask for help regarding any technical issue or report any bug or OS independent issues.
Post Reply
dlqingxi
Newly Registered User
Posts: 7
Joined: 04 Jan 2013, 08:44

[Resolved]can't compile with accountserver.cbp (ubuntu OS)

Post by dlqingxi »

Yesteday I download the manaserv's source code from github.
And follow the wiki told I compiled it success.(cmake. && make)(ubuntu OS)

I want to build and run the project in code::blocks so that I can debug it high-efficency.
So I open the accountserver.cbp file and choose the Build target as "Unix/Linux(MySQL support)",
but some error occured like below:

Code: Select all

/home/fengyan/projects/manaserv/libs/enet/unix.c|34|error: conflicting types for ‘socklen_t’|
/usr/include/i386-linux-gnu/bits/socket.h|35|note: previous declaration of ‘socklen_t’ was here|
/home/fengyan/projects/manaserv/libs/enet/unix.c||In function ‘enet_socket_accept’:|
/home/fengyan/projects/manaserv/libs/enet/unix.c|251|warning: pointer targets in passing argument 3 of ‘accept’ differ in signedness [-Wpointer-sign]|
/usr/include/i386-linux-gnu/sys/socket.h|214|note: expected ‘socklen_t * __restrict__’ but argument is of type ‘socklen_t *’|
||=== Build finished: 3 errors, 1 warnings ===|
Image
I think it was because the duplicate define the socklen_t, then I comment line 34 in libs/enet/unix.c and rebuild it.,
This time it throw another error like below :

Code: Select all

src/utils/xml.h|26|fatal error: libxml/tree.h: No such file or directory|
||=== Build finished: 1 errors, 0 warnings ===|

Image
It seems that I lost any head file, but when I compile it in cmake, it was ok.
How do you avoid those problems ? Maybe I need some other setting in the code::blocks ?
Any suggestions will be much appreciated. Thanks
Last edited by dlqingxi on 07 Jan 2013, 04:48, edited 1 time in total.
Ablu
Manasource
Manasource
Posts: 288
Joined: 23 Jul 2011, 08:31
Location: Germany

Re: compile problem when used accountserver.cbp ( on ubuntu

Post by Ablu »

Hi,

If i understood it right you want to use codeblocks on linux?

I think we only use codeblocks for windows support at the moment. For linux I would suggest you using the qtcreator. You can generate a .pro file using the ./setup-creator.sh in the manaserv repository. And open that file with the qtcreator and easily debug stuff. If you really want to use codeblocks on linux you probably need to reconfigure all the paths correctly which might be a bit work but in theory this should work as well.

Regards
Ablu
Ablu
Manasource
Manasource
Posts: 288
Joined: 23 Jul 2011, 08:31
Location: Germany

Re: compile problem when used accountserver.cbp ( on ubuntu

Post by Ablu »

I managed to get it compile via codeblocks. I will push a fix to the manaserv repository.

EDIT: Pushed now
dlqingxi
Newly Registered User
Posts: 7
Joined: 04 Jan 2013, 08:44

Re: [Resolved]can't compile with accountserver.cbp (ubuntu O

Post by dlqingxi »

Thank you, Ablu.

It‘s really I had some include path and lib path setting wrong.
But with the latest cbp files your provided, and I do something minor setting, it works well now.
Very ashamed This is a very elementary question.

Thanks.
Post Reply