Compile 1.1.3 Api in Eclipse
Moderators: Lapo, Bax, MBagnati
-
- Posts: 5
- Joined: 31 Aug 2014, 07:34
Compile 1.1.3 Api in Eclipse
Hello!
Has anyone been able to compile the latest Api v1.1.3 on Windows with Eclipse? I have compile the Api library on in Visual Studio 2013 with the help of the given Solution. But I need libraries for Eclipse and Xcode for Mac also.
I have followed the instructions given in documentation to compile with Eclipse on windows. If someone could share a working Eclipse and XCode project that would be really nice.
Has anyone been able to compile the latest Api v1.1.3 on Windows with Eclipse? I have compile the Api library on in Visual Studio 2013 with the help of the given Solution. But I need libraries for Eclipse and Xcode for Mac also.
I have followed the instructions given in documentation to compile with Eclipse on windows. If someone could share a working Eclipse and XCode project that would be really nice.
Re: Compile 1.1.3 Api in Eclipse
Hi,
it's not clear if you have had problems with the compilation in Eclipse, or if it's just a generic question.
If you stumbled on some errors can you please provide the details?
Thanks
it's not clear if you have had problems with the compilation in Eclipse, or if it's just a generic question.
If you stumbled on some errors can you please provide the details?
Thanks
-
- Posts: 5
- Joined: 31 Aug 2014, 07:34
Re: Compile 1.1.3 Api in Eclipse
I got a linker error but it was probably because I was not able to compile zlib with in cugwin64. I am currently setting up a new 32bit environment from scratch to see if changes anything. The instructions given in the Eclipse project setup folder are not in English. Will it be possible for someone to create a working eclipse project and upload it?
Update: Similar situation on 32bit windows machine. Attached Screenshots.
Update: Similar situation on 32bit windows machine. Attached Screenshots.
- Attachments
-
- Zlib-cygwin-z86.png
- Zlib Error
- (26.54 KiB) Not downloaded yet
-
- Eclipse-x86-cygwin.png
- SmartFoxClientApi
- (94.04 KiB) Not downloaded yet
Re: Compile 1.1.3 Api in Eclipse
Thanks for the details, I will ask out C++ expert to take a look.
I am not sure to which instructions you're referring to.
Did you follow the steps in our documentation here?
http://docs2x.smartfoxserver.com/Gettin ... clipse-nix
The instructions given in the Eclipse project setup folder are not in English.
I am not sure to which instructions you're referring to.
Did you follow the steps in our documentation here?
http://docs2x.smartfoxserver.com/Gettin ... clipse-nix
-
- Posts: 5
- Joined: 31 Aug 2014, 07:34
Re: Compile 1.1.3 Api in Eclipse
Yes I have followed the instructions on the site. Situation was the same. There is also a text file inside the folder (api_fol)/SmartfoxClientApi/Eclipse which I believe are in Italian. They are almost identical except there is one more step in the beginning to compile Zlib. Could you upload a working Eclipse Workspace so I can compare with my project settings.
Re: Compile 1.1.3 Api in Eclipse
Hi,
About ZLib, I think that you can ignore the error "Cannot export gzopen_w: symbol not defined"
The main output for ZLib compilation are two files: libz.a and libz.dll.a (files are created in \ZLib folder)
Please check that files are created.
In any case, you can fix the error removing gzopen_w from \ZLib\win32\Zlib.def file
(I suggest you to edit DEF file and add a semi-colon at the begin of gzopen_w line)
For more information about the issue, please take a look at
https://github.com/madler/zlib/issues/45
About ZLib, I think that you can ignore the error "Cannot export gzopen_w: symbol not defined"
The main output for ZLib compilation are two files: libz.a and libz.dll.a (files are created in \ZLib folder)
Please check that files are created.
In any case, you can fix the error removing gzopen_w from \ZLib\win32\Zlib.def file
(I suggest you to edit DEF file and add a semi-colon at the begin of gzopen_w line)
Code: Select all
; gzopen_w
For more information about the issue, please take a look at
https://github.com/madler/zlib/issues/45
Re: Compile 1.1.3 Api in Eclipse
About Eclipse issue, what's the detail of the error ?
What is the problem that Eclipse has detected in XMLNode?
What is the problem that Eclipse has detected in XMLNode?
-
- Posts: 5
- Joined: 31 Aug 2014, 07:34
Re: Compile 1.1.3 Api in Eclipse
In any case, you can fix the error removing gzopen_w from \ZLib\win32\Zlib.def file
(I suggest you to edit DEF file and add a semi-colon at the begin of gzopen_w line)
Thanks for that. Zlib is compiling successfully now. Although you were right. The error is still the same.
Code: Select all
# Each subdirectory must supply rules for building sources it contributes
Util/XMLParser/%.o: ../Util/XMLParser/%.cpp
@echo 'Building file: $<'
@echo 'Invoking: Cygwin C++ Compiler'
g++ -D__USE_W32_SOCKETS -DSMARTFOXCLIENTAPI_EXPORTS -I"C:\Users\Pratik\Desktop\SmartFoxClientApi\Core\BoostAsio\Unix\" -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<"
@echo 'Finished building: $<'
@echo ' '
Here is where the error is. In the above line eclipse shows "-fmessage-length=0" and "$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" highlighted in blue.
Just to confirm as shown on the instructions page says to add
Code: Select all
[api_folder]\Core\BoostAsio\Unix\
[api_folder]\Core\BoostAsio\Unix\stage\lib
once "\" and the other without it.
- Attachments
-
- Untitled.png
- (156.91 KiB) Not downloaded yet
Re: Compile 1.1.3 Api in Eclipse
Hi,
any news about compiling API on Windows with Eclipse?
In these days I have successfuly compiled API on Linux with Eclipse and on Windows with VisualStudio....seems that API source is "compatible" with both Eclipse and VisualStudio.
I have done only a preliminary test to compile API on Windows with Eclipse and I have an error that seems (but at the moment I am not sure) a cygwin problem.
any news about compiling API on Windows with Eclipse?
In these days I have successfuly compiled API on Linux with Eclipse and on Windows with VisualStudio....seems that API source is "compatible" with both Eclipse and VisualStudio.
I have done only a preliminary test to compile API on Windows with Eclipse and I have an error that seems (but at the moment I am not sure) a cygwin problem.
-
- Posts: 5
- Joined: 31 Aug 2014, 07:34
Re: Compile 1.1.3 Api in Eclipse
No changes in the situation. I suppose that its a Cygwin issue. I have not tried on linux but I was able to successfully compile on Windows and Mac. Although I am not sure if I compiled correctly on Mac. But I have given up on the C++ api class and decided to use wrapper classes around platform specific Api.
Because I uses Cocos2d-X v3 which is c++11 library and SFS2X is not, which throws errors in Xcode, but it could be my mistake. And I read that boost doesn't compile for Windows Phone 8/8.1. But may be thats not entirely true.
Because I uses Cocos2d-X v3 which is c++11 library and SFS2X is not, which throws errors in Xcode, but it could be my mistake. And I read that boost doesn't compile for Windows Phone 8/8.1. But may be thats not entirely true.
-
- Posts: 71
- Joined: 30 Oct 2010, 04:35
Re: Compile 1.1.3 Api in Eclipse
MBagnati wrote:Hi,
any news about compiling API on Windows with Eclipse?
In these days I have successfuly compiled API on Linux with Eclipse and on Windows with VisualStudio....seems that API source is "compatible" with both Eclipse and VisualStudio.
I have done only a preliminary test to compile API on Windows with Eclipse and I have an error that seems (but at the moment I am not sure) a cygwin problem.
hi,
I have repeated, on my Ubuntu machine (14.04 LTS/ 64bit) with Eclipse, all steps described in chapter Linux/Unix — Eclipse Cygwin of http://docs2x.smartfoxserver.com/GettingStarted/client-api-cpp, but i get some errors like:
Code: Select all
‘boost::archive::iterators::base64_from_binary<Base, CharType>::base64_from_binary(const boost::archive::iterators::base64_from_binary<Base, CharType>&) [with Base = boost::archive::iterators::transform_width<const unsigned char*, 6, 8>; CharType = unsigned char]’ base64_from_binary.hpp /SmartFoxClient/Core/BoostAsio/Unix/boost/archive/iterators line 103
the API version is 1.1.6.
In the beginning, I thought it was because my machine is not installed the boost library!
The above error is what causes? help me!
- Attachments
-
- step03.png
- (68.12 KiB) Not downloaded yet
-
- step02.png
- (79.47 KiB) Not downloaded yet
-
- step01.png
- (66.4 KiB) Not downloaded yet
-
- Posts: 71
- Joined: 30 Oct 2010, 04:35
Re: Compile 1.1.3 Api in Eclipse
MBagnati wrote:Hi,
any news about compiling API on Windows with Eclipse?
In these days I have successfuly compiled API on Linux with Eclipse and on Windows with VisualStudio....seems that API source is "compatible" with both Eclipse and VisualStudio.
I have done only a preliminary test to compile API on Windows with Eclipse and I have an error that seems (but at the moment I am not sure) a cygwin problem.
- Attachments
-
- step06.png
- (97.85 KiB) Not downloaded yet
-
- step05.png
- (22.42 KiB) Not downloaded yet
-
- step04.png
- (54.44 KiB) Not downloaded yet
-
- Posts: 71
- Joined: 30 Oct 2010, 04:35
Re: Compile 1.1.3 Api in Eclipse
MBagnati wrote:Hi,
any news about compiling API on Windows with Eclipse?
In these days I have successfuly compiled API on Linux with Eclipse and on Windows with VisualStudio....seems that API source is "compatible" with both Eclipse and VisualStudio.
I have done only a preliminary test to compile API on Windows with Eclipse and I have an error that seems (but at the moment I am not sure) a cygwin problem.
- Attachments
-
- step09.png
- (23 KiB) Not downloaded yet
-
- step08.png
- (94.83 KiB) Not downloaded yet
-
- step07.png
- (91.34 KiB) Not downloaded yet
-
- Posts: 71
- Joined: 30 Oct 2010, 04:35
Re: Compile 1.1.3 Api in Eclipse
MBagnati wrote:Hi,
any news about compiling API on Windows with Eclipse?
In these days I have successfuly compiled API on Linux with Eclipse and on Windows with VisualStudio....seems that API source is "compatible" with both Eclipse and VisualStudio.
I have done only a preliminary test to compile API on Windows with Eclipse and I have an error that seems (but at the moment I am not sure) a cygwin problem.
- Attachments
-
- step10.png
- (191.98 KiB) Not downloaded yet
Who is online
Users browsing this forum: No registered users and 41 guests