Horde3D

Next-Generation Graphics Engine
It is currently 11.05.2024, 18:02

All times are UTC + 1 hour




Post new topic Reply to topic  [ 8 posts ] 
Author Message
PostPosted: 04.09.2012, 23:11 
Offline

Joined: 04.09.2012, 19:27
Posts: 3
First, hello everyone! :D
Second, I'm a n00b at deploying software on linux and I could use some clarifications on the building process.
I find that the instructions here (Building on Linux with gcc) are great and easy to follow and I think I compiled Horde3D successfully
But now.. now what?
How do I have to arrange everything to make the "minimal app" at the bottom to work?
The Horde3D.h file is in the Bindings/C++ folder, but I'm using C..
libHorde3D.so is created but there's no libHorde3D.a, will this have any consequence when I deploy my app?
Thank you for your time! :mrgreen:


Top
 Profile  
Reply with quote  
PostPosted: 06.09.2012, 02:35 
Offline

Joined: 19.01.2012, 21:01
Posts: 55
Depending on how you want to build things, you may want to do a make install as well to put the horde header file and library in your /usr/local directories.

The .so is the shared library, .a is the static library. You shouldn't need the .a.


Top
 Profile  
Reply with quote  
PostPosted: 09.09.2012, 20:32 
Offline

Joined: 04.09.2012, 19:27
Posts: 3
If I want to compile everything at the same time to make a standalone executable what steps do I need to follow?


Top
 Profile  
Reply with quote  
PostPosted: 10.09.2012, 03:38 
Offline

Joined: 15.09.2010, 18:31
Posts: 53
Inuart wrote:
If I want to compile everything at the same time to make a standalone executable what steps do I need to follow?


I assume you've already compiled Horde3D with:
Code:
$ cd $HORDE3D_DIR && cmake .. && make && sudo make install


Just in case, make sure that ldconfig detects your Horde3D library:
Code:
# sudo ldconfig -p | grep Horde3D
   libHorde3DUtils.so (libc6,x86-64) => /usr/local/lib/libHorde3DUtils.so
   libHorde3D.so (libc6,x86-64) => /usr/local/lib/libHorde3D.so


The procedure is simple, just create your test program:
Code:
$ echo '
#include <cstdio>
#include "horde3d/Horde3D.h"

int main()
{
  printf("%s", h3dGetVersionString());
  return 0;
}
' > main.cpp


and compile it
Code:
$ gcc main.cpp -lHorde3D -o test


If it fails, that probably means you haven't added /usr/local/include to search path.
Code:
export CXX_FLAGS="$CXX_FLAGS -I/usr/local/include"


and run the test
Code:
$ ./test


You should see a string like `Horde3D 1.0.0 Beta5`.


Top
 Profile  
Reply with quote  
PostPosted: 10.09.2012, 16:16 
Offline

Joined: 19.01.2012, 21:01
Posts: 55
Shd, that's actually a really nice and easy starting point for someone just making sure their build environment is correct.

You should consider adding that to the Wiki.


Top
 Profile  
Reply with quote  
PostPosted: 12.09.2012, 14:00 
Offline

Joined: 04.09.2012, 19:27
Posts: 3
Thank you very much for this info!
I suspect my problem was that my source file was named main.c. Renaming it to main.cpp did the trick.
I'll try to use these headers and see if I can use C instead of C++.
Thank you for your help


Top
 Profile  
Reply with quote  
PostPosted: 12.09.2012, 16:25 
Offline

Joined: 19.01.2012, 21:01
Posts: 55
Yeah, the horde headers are actually c++, which is why I rewrote them for the Go interface. I wouldn't use them as a header file for a c compiler though. I ripped out several things, and moved them into Go code. Specifically all the constants, which you'll need to do anything with the Horde API.

If you're interested in Go code though I encourage you to look at it. You don't have to mess with a lot of the stuff you usually have to with C / C++. A compile is simply "go build". It feels more like a scripting or dynamic language, except you get the speed of a statically compiled one.

http://tour.golang.org will walk you through the whole lanuage if you're interested.


Top
 Profile  
Reply with quote  
PostPosted: 12.09.2012, 19:04 
Offline

Joined: 15.09.2010, 18:31
Posts: 53
tshannon wrote:
Shd, that's actually a really nice and easy starting point for someone just making sure their build environment is correct.

You should consider adding that to the Wiki.

I'm glad you like my explanation.
Anyway i can see a similar one on http://www.horde3d.org/wiki/index.php5?title=Building_Horde3D, so i don't really feel comfortable with modifying it.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 9 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:  
Powered by phpBB® Forum Software © phpBB Group