The open-source game engine and graphics engine for multiplayer, cross-platform, real-time 3D action

It is currently 2014-10-23, 00:20

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 12 posts ] 
Author Message
PostPosted: 2010-08-17, 04:44 
Offline
User avatar

Joined: 2010-08-16, 19:26
Posts: 28
Location: Moscow, Russia
Hi, I've just downloaded the Cafu source and built it, everything was ok; but where are the VC++ .vcproj and .sln files? Or is there a way to use SCons to generate them? Apart from using the VC++ (2008) compiler I would like to use the IDE too, and the debugger (even more important). Thanks for your support.


Top
 Profile  
 
PostPosted: 2010-08-17, 14:53 
Offline
Site Admin
User avatar

Joined: 2004-08-19, 13:46
Posts: 1982
Location: Germany
Hi BRabbit,
welcome to the Cafu forums! :welcome:

BRabbit wrote:
Hi, I've just downloaded the Cafu source and built it, everything was ok; but where are the VC++ .vcproj and .sln files? Or is there a way to use SCons to generate them?

Unfortunately I don't know of a way to create .vcproj and .sln files from SCons (although that would certainly be very helpful).

The big advantage of SCons is that it allows us to build Cafu on all supported platforms with all supported compilers, without us having to address all those (very many, very different, and sometimes very weird) platform-specific build tools.

I've been considering switching to other build tools though in order to make building Cafu even simpler, such as Waf, Premake, CMake, etc., but so far I've never found the time to dig into them.

Quote:
Apart from using the VC++ (2008) compiler I would like to use the IDE too, and the debugger (even more important).

I think you can do all that even without the .vcproj and .sln files - just open the related files in the IDE.

Especially the debugger can be used stand-alone with just the executable files; when it breaks, it will automatically show you the proper place in the code.

If you use the Express Edition of VC++, you may want to install WinDbg as a port-mortem (or "just-in-time") debugger, please see viewtopic.php?p=3765#p3765 for more details.

_________________
Best regards,
Carsten


Top
 Profile  
 
PostPosted: 2010-08-19, 17:01 
Offline
Site Admin
User avatar

Joined: 2004-08-19, 13:46
Posts: 1982
Location: Germany
Just for completeness to the above post, and for future references:

Another build system candidate is gyp (and, less so, bakefile and qmake).

The most attractive ones seem to be waf, cmake and gyp, and there is a very insteresting thread about them at https://lists.webkit.org/pipermail/webk ... .html#8881

In essence, I think we should look into these and just try them out.

_________________
Best regards,
Carsten


Top
 Profile  
 
PostPosted: 2010-11-07, 17:57 
Offline
User avatar

Joined: 2010-08-16, 19:26
Posts: 28
Location: Moscow, Russia
Well, i know it's against cross-platform code, but I managed to make a VC++ solution with all the Cafu code, and it was pretty straight, tough. I have built all the code with no problems, but when it comes to the linking...mm..well, i found the library dependencies looking at the SConscript file, which says -in a rather complicated manner- what libraries are used by each of Cafu program (let's say, CaWE, the Cafu executable itself, the DLLs). So i compiled, linked and ran CaWE using my Visual Studio solution.
Anyway, there are some parts, specifically right now the OpenGL12 Renderer library that I couldn't link and I receive those 'unresolved externals' and 'conflicts with other libraries' nasty errors. I know that it must be some missing libraries, but i'm pretty sure I'm using all the libraries at least defined in the SConscript file.
So, Carsten, I would like to know:
-Are every program and library in Cafu Unicode? (Maybe this is a problem with the character set)
-Could you post what are the libraries needed?

I'm gonna put here a zipped complete solution (with no source code, so you can add the lastest code from the tracker), because i know some people including me are really conformed with MSW-only builds and used to some VC (the IDE part) features, like find and replace, debugging breakpoints (you are right when you say I can debug my program by waiting for the error to appear, but sometimes that's not the case), etc.


Top
 Profile  
 
PostPosted: 2010-11-07, 20:39 
Offline
Site Admin
User avatar

Joined: 2004-08-19, 13:46
Posts: 1982
Location: Germany
BRabbit wrote:
Well, i know it's against cross-platform code, but I managed to make a VC++ solution with all the Cafu code, and it was pretty straight, tough.

That's great to hear.
I've been investigating the above mentioned SCons alternatives, especially CMake, Premake and waf, but the big problem with all of them is that I have not yet found a way to make them build wxWidgets (as a part of the Cafu build process).

Nonetheless, if you'd manage to create e.g. a Premake4 (or CMake) script for Cafu, I'd be very interested in hearing about it!

Quote:
Anyway, there are some parts, specifically right now the OpenGL12 Renderer library that I couldn't link and I receive those 'unresolved externals' and 'conflicts with other libraries' nasty errors. I know that it must be some missing libraries, but i'm pretty sure I'm using all the libraries at least defined in the SConscript file.

Note that neither Cafu nor CaWE directly link to the Renderer or Sound DLLs. These DLLs are linked dynamically at run-time: there is no need to account for them at link time.

You essentially need the libraries mentioned at
http://trac.cafu.de/browser/cafu/trunk/ ... ev=174#L87

and for Cafu:
http://trac.cafu.de/browser/cafu/trunk/ ... v=174#L100
http://trac.cafu.de/browser/cafu/trunk/ ... v=174#L101

and for CaWE:
http://trac.cafu.de/browser/cafu/trunk/ ... v=174#L158
http://trac.cafu.de/browser/cafu/trunk/ ... v=174#L162

Quote:
So, Carsten, I would like to know:
-Are every program and library in Cafu Unicode? (Maybe this is a problem with the character set)

The source code files only use the lower 128 ASCII values, so they should be encoding agnostic. Cafu and CaWE both use some Unicode features, but that should not be a problem (especially not at the linking stage).

Quote:
-Could you post what are the libraries needed?

Well, you're on the right track, and the most complete and accurate description is in the two files that you already considered:
http://trac.cafu.de/browser/cafu/trunk/SConstruct
http://trac.cafu.de/browser/cafu/trunk/SConscript
(also mind the code beginning at http://trac.cafu.de/browser/cafu/trunk/ ... v=174#L305)

Quote:
I'm gonna put here a zipped complete solution (with no source code, so you can add the lastest code from the tracker),

Yes, I'd be happy about that! :-) (but a PreMake or CMake file would be even better ;-) ).

_________________
Best regards,
Carsten


Top
 Profile  
 
PostPosted: 2010-11-07, 22:30 
Offline
User avatar

Joined: 2010-08-16, 19:26
Posts: 28
Location: Moscow, Russia
Carsten wrote:
Note that neither Cafu nor CaWE directly link to the Renderer or Sound DLLs. These DLLs are linked dynamically at run-time: there is no need to account for them at link time.

Yes, that's true. The thing is that i was actually linking the DLL itself. :P
Carsten wrote:

Yes, I'd be happy about that! :-) (but a PreMake or CMake file would be even better ;-) ).

OMG!! :shock: :shock:
By Wikipedia:
"CMake takes script files named "CMakeLists.txt" as input. It can generate makefiles and projects for many platforms and IDEs including Unix, Windows, Mac OS X, MSVC, Cygwin, MinGW and XCode. The platform's native build tools are used for the actual building."
This is what we need! A cross-platform build system but using the platform's ide (Visual Studio, XCode).
So you are right, I better make the CMakeList than a VC solution. Posting it soon!


Top
 Profile  
 
PostPosted: 2010-11-08, 22:16 
Offline
Site Admin
User avatar

Joined: 2004-08-19, 13:46
Posts: 1982
Location: Germany
BRabbit wrote:
This is what we need! A cross-platform build system but using the platform's ide (Visual Studio, XCode).

:cheesy:
Note that there is also Premake: http://industriousone.com/premake

My preliminary and certainly incomplete check left me with the impression that CMake is more mature, has more features, larger user base, and probably is able to deal also with corner cases.
However, it is also poorly documented (I got the book!), and the custom macro language is somewhat unfortunate as well.

Premake4, in contrast, uses (just like Cafu) the very elegant Lua programming language for its input description, and the documentation is straightforward. I'm not sure though if it can examine the target system in Autotools-style, which seems to be required for building wxWidgets.

Probably the only definitive way to learn which one is better (for our purposes) is to try them both. I've not yet had the time to do so, but if you made a start, it would certainly be a huge help.

(And note that initially, it would be enough to build the applications, e.g. CaWE and Cafu. This would still depend on having the libs build in a prior step (using SCons), but it would be a good beginning nevertheless.)

_________________
Best regards,
Carsten


Top
 Profile  
 
PostPosted: 2010-11-09, 16:26 
Offline
User avatar

Joined: 2010-08-16, 19:26
Posts: 28
Location: Moscow, Russia
Premake seems to be even easier than CMake. Here's information about building wxWidgets with premake: http://wiki.wxwidgets.org/Premake4


Top
 Profile  
 
PostPosted: 2010-11-10, 12:41 
Offline
Site Admin
User avatar

Joined: 2004-08-19, 13:46
Posts: 1982
Location: Germany
BRabbit wrote:
Here's information about building wxWidgets with premake: http://wiki.wxwidgets.org/Premake4

Unfortunately, this is a Premake example for building an application that uses wxWidgets.
It does not deal with building wxWidgets itself.
(The example is a good start, but ideally and eventually, we must be able to build wxWidgets itself with CMake or Premake as well. ;-) )

_________________
Best regards,
Carsten


Top
 Profile  
 
PostPosted: 2011-02-01, 15:19 
Offline

Joined: 2011-02-01, 14:53
Posts: 1
I'm a little new to this engine, and appear to be right for my purpose =).

I searched in forum and found this topic perfect for my question...

In a solution are needed: entry point (main, winmain, and so on...), files cpp and h (#include), libraries (link).
If i build a myself solution (with a standard entry point where attach all next, libraries and inclusions), where can i found all these needed?

Have BRabbit make that solution for Visual Studio? I hope XD

(I'm not so advanced in C++ programming XD)


Top
 Profile  
 
PostPosted: 2011-02-01, 19:21 
Offline
Site Admin
User avatar

Joined: 2004-08-19, 13:46
Posts: 1982
Location: Germany
Hi Master Kira,
welcome to the Cafu forums! :welcome:

Master Kira wrote:
In a solution are needed: entry point (main, winmain, and so on...), files cpp and h (#include), libraries (link).
If i build a myself solution (with a standard entry point where attach all next, libraries and inclusions), where can i found all these needed?

The problem is that Cafu consists of many libraries (just look in subdirectories Libs/ and ExtLibs/), and many executables -- making a VS proj or sln file had to cover them all.

As outlined above, I'm still open to it, but is there any problem with using SCons?
I know it feels foreign at first, but it's simple and convenient, and solves the problem well (you can still use the VS IDE for editing the files etc.; optionally also see this post: viewtopic.php?p=4271#p4271)

Quote:
Have BRabbit make that solution for Visual Studio? I hope XD
(I'm not so advanced in C++ programming XD)

Sorry, I don't know how far he got.

_________________
Best regards,
Carsten


Top
 Profile  
 
PostPosted: 2011-05-21, 00:41 
Offline

Joined: 2011-05-20, 20:49
Posts: 1
I created an Visual Studio Soloution for myself now.
It still uses scons to build but atleast it enables you to use Intellisense and you can use the Debugger more comfortably and ofc you can build directly from VC ;)

I made it for win32 and VC9 (2008) so if you use a different version you need to update the debug paths for all projects and build options (Project->Settings->Configuration->Debugging->Command).

The archive needs to be unpacked to your Cafu root folder!

If you want you can add it to the SVN repository.


Attachments:
Cafu Engine VC9.rar [12.08 KiB]
Downloaded 153 times
Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 12 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group