GithubHelp home page GithubHelp logo

Comments (7)

naelstrof avatar naelstrof commented on May 28, 2024 3

That's right. Then to compile you should do:

export LDFLAGS=-lrt
cmake ./
make && sudo make install

Sorry for the trouble!

from slop.

naelstrof avatar naelstrof commented on May 28, 2024

Try adding #include <time.h> at the top of main.cpp. And probably link to -lrt as well. So define LDFLAGS=-lrt I think before cmaking/making.

I'll make an official commit to fix this if you mind waiting a few minutes.

from slop.

glutanimate avatar glutanimate commented on May 28, 2024

Thanks for the swift response!

I've added the new include line to main.cpp, but I am still getting the same error message.

Just to be sure I didn't do anything wrong, this is what the include segment now looks like:

#include <time.h>
#include <unistd.h>
#include <cstdio>
#include <sstream>

#include "x.hpp"
#include "rectangle.hpp"
#include "cmdline.h"

from slop.

glutanimate avatar glutanimate commented on May 28, 2024

Mmh, I am running into the same error still:

$ cat src/main.cpp | head -27
/* main.cpp
 *
 * Copyright (C) 2014: Dalton Nell, Slop Contributors (https://github.com/naelstrof/slop/graphs/contributors).
 *
 * This file is part of Slop.
 *
 * Slop is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * Slop is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with Slop.  If not, see <http://www.gnu.org/licenses/>.
 */
#include <time.h>
#include <unistd.h>
#include <cstdio>
#include <sstream>

#include "x.hpp"
#include "rectangle.hpp"
#include "cmdline.h"

$ export LDFLAGS=-lrt

$ cmake ./
-- The C compiler identification is GNU 4.6.3
-- The CXX compiler identification is GNU 4.6.3
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/g++
-- Check for working CXX compiler: /usr/bin/g++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
Command gengetopt or sed not found! Won't regenerate command line code.
Replacing version in readme...
-- Looking for XOpenDisplay in /usr/lib/x86_64-linux-gnu/libX11.so;/usr/lib/x86_64-linux-gnu/libXext.so
-- Looking for XOpenDisplay in /usr/lib/x86_64-linux-gnu/libX11.so;/usr/lib/x86_64-linux-gnu/libXext.so - found
-- Looking for gethostbyname
-- Looking for gethostbyname - found
-- Looking for connect
-- Looking for connect - found
-- Looking for remove
-- Looking for remove - found
-- Looking for shmat
-- Looking for shmat - found
-- Looking for IceConnectionNumber in ICE
-- Looking for IceConnectionNumber in ICE - found
-- Found X11: /usr/lib/x86_64-linux-gnu/libX11.so
-- Configuring done
-- Generating done
-- Build files have been written to: /home/glutanimate/slop

$ make
Linking CXX executable slop
CMakeFiles/slop.dir/src/main.cpp.o: In function `app(int, char**)':
main.cpp:(.text+0xe3d): undefined reference to `clock_gettime'
main.cpp:(.text+0xe56): undefined reference to `clock_gettime'
collect2: ld returned 1 exit status
make[2]: *** [slop] Error 1
make[1]: *** [CMakeFiles/slop.dir/all] Error 2
make: *** [all] Error 2

from slop.

naelstrof avatar naelstrof commented on May 28, 2024

Can you run it with make VERBOSE=1?

from slop.

naelstrof avatar naelstrof commented on May 28, 2024

I just pushed a commit which should fix it: 77f5af1

You can try re-cloning/pulling and then attempt compiling again.

from slop.

glutanimate avatar glutanimate commented on May 28, 2024

Yep, that fixed it. Thanks!!

from slop.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.