mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 03:17:06 +02:00
This fixes the linker problem: /usr/bin/ld: error: ../../libraries/shared/libshared.a(StreamUtils.cpp.o): multiple definition of 'operator<<(std::ostream&, glm::detail::tvec3<float, (glm::precision)0> const&)' /usr/bin/ld: CMakeFiles/physics-tests.dir/src/PhysicsTestUtil.cpp.o: previous definition here /usr/bin/ld: error: ../../libraries/shared/libshared.a(StreamUtils.cpp.o): multiple definition of 'operator<<(std::ostream&, glm::detail::tquat<float, (glm::precision)0> const&)' /usr/bin/ld: CMakeFiles/physics-tests.dir/src/PhysicsTestUtil.cpp.o: previous definition here /usr/bin/ld: error: ../../libraries/shared/libshared.a(StreamUtils.cpp.o): multiple definition of 'operator<<(std::ostream&, glm::detail::tmat4x4<float, (glm::precision)0> const&)' /usr/bin/ld: CMakeFiles/physics-tests.dir/src/PhysicsTestUtil.cpp.o: previous definition here collect2: error: ld returned 1 exit status Note these are the serializers to std::ostream that were already there, not the ones that I added (which are to QDebug). This bug was already there, I only got these errors now after adding some debug code. The reason is obvious: they are already defined in libshared.a (through StreamUtils.cpp). No need to define them again in ./tests/physics/src/PhysicsTestUtil.cpp
26 lines
650 B
C++
26 lines
650 B
C++
//
|
|
// PhysicsTestUtil.h
|
|
// tests/physics/src
|
|
//
|
|
// Created by Andrew Meadows on 02/21/2014.
|
|
// Copyright 2014 High Fidelity, Inc.
|
|
//
|
|
// Distributed under the Apache License, Version 2.0.
|
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
|
//
|
|
|
|
#ifndef hifi_PhysicsTestUtil_h
|
|
#define hifi_PhysicsTestUtil_h
|
|
|
|
#include <glm/glm.hpp>
|
|
#include <glm/gtx/quaternion.hpp>
|
|
|
|
#include <CollisionInfo.h>
|
|
|
|
const glm::vec3 xAxis(1.f, 0.f, 0.f);
|
|
const glm::vec3 yAxis(0.f, 1.f, 0.f);
|
|
const glm::vec3 zAxis(0.f, 0.f, 1.f);
|
|
|
|
std::ostream& operator<<(std::ostream& s, const CollisionInfo& c);
|
|
|
|
#endif // hifi_PhysicsTestUtil_h
|