MinimalOgreNewt for Linux

SFCBias

06-07-2010 18:19:23

I've quickly compiled the MinimalOgreNewt (by kallaspriit) sample for Linux.First you can try to run the version already compiled in the Folder. If that does not work(it is x64 binary) You simply need to fire up a terminal, navigate to the Debug folder and run
make clean
make all


Then copy the binary up one directory (from MinimalOgreNewt/Debug --> MinimalOgreNewt/)

And here you are. And if its ok i'd like for this to be added to the samples. http://www.4shared.com/file/uj70z_TX/Mi ... wttar.html

kallaspriit

06-07-2010 18:50:53

Which files are updated that I should add to SVN?

SFCBias

06-07-2010 19:13:54

Main.cpp and Application.cpp
added some #if's for windows and linux

and PrimitiveFactory.cpp
removed occurrences of std::max and just wrote out the statement
float radius = ((size.x > size.z) ? size.x : size.z) / 2.0f

And also included the makefile from my build along with shared library files of OgreNewt_d and OgreMain 1.7.1 also a static library for OIS

The prebuilt binary is Debug so if you need me to recompile in Release thats fine.

kallaspriit

07-07-2010 17:56:06

Added the changes to the files, try it. What build-files should I add/change? I would like both debug and release versions, the prebuilt is probably not necessary as everyone should be able to compile it themselves?

SFCBias

12-07-2010 02:59:46

Sorry I'm quite busy for the next while, but i need a link to the repository.

Also the build files needed are the Debug/source folder along with all the .mk files and the makefile. To make the release version simple copy all the debug files into a folder called 'Release' and replace the source/subdir.mk with this:
################################################################################
# Automatically-generated file. Do not edit!
################################################################################

# Add inputs and outputs from these tool invocations to the build variables
CPP_SRCS += \
../source/Application.cpp \
../source/FirstPersonCameraController.cpp \
../source/MouseCursor.cpp \
../source/Picker.cpp \
../source/PrimitiveFactory.cpp \
../source/ScreenWriter.cpp \
../source/main.cpp

OBJS += \
./source/Application.o \
./source/FirstPersonCameraController.o \
./source/MouseCursor.o \
./source/Picker.o \
./source/PrimitiveFactory.o \
./source/ScreenWriter.o \
./source/main.o

CPP_DEPS += \
./source/Application.d \
./source/FirstPersonCameraController.d \
./source/MouseCursor.d \
./source/Picker.d \
./source/PrimitiveFactory.d \
./source/ScreenWriter.d \
./source/main.d


# Each subdirectory must supply rules for building sources it contributes
source/%.o: ../source/%.cpp
@echo 'Building file: $<'
@echo 'Invoking: GCC C++ Compiler'
g++ -I/usr/local/include/OGRE -I/usr/local/include/PagedGeometry -I/usr/local/include/Hydrax -I/usr/local/include/OgreNewt -I/home/sfcbias/workspace/MinimalOgreNewt/include -I/home/sfcbias/newtonSDK/sdk/dCustomJoints -I/home/sfcbias/newtonSDK/sdk/dAnimation -I/home/sfcbias/newtonSDK/sdk/dContainers -I/home/sfcbias/newtonSDK/sdk/dMath -I/home/sfcbias/newtonSDK/sdk -I/usr/local/include/Caelum -O3 -Wall -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o"$@" "$<"
@echo 'Finished building: $<'
@echo ' '



Ofcourse to build on another system, the directories need to be changed, if you're familiar with cmake or autoconf or anything like that you're welcome to add it but otherwise they will need to change it themselves.