(C++) 'Hello CLN' using Qt Creator under Ubuntu

February 24, 2017 · View on GitHub

 

 

 

 

 

(C++) 'Hello CLN' using Qt Creator under Ubuntu

 

Hello CLN is an extension of Hello World. Like Hello World, Hello CLN is a simple console application. Hello CLN, however, also requires the CLN library and to link against it.

 

 

Operating system: Ubuntu 10.04 LTS Lucid Lynx

IDE: Qt Creator 2.0.0

Project type: console application

Compiler: G++ 4.4.1

Libraries used:

 

 

 

 

 

Qt project file

 


#------------------------------------------------- # # Project created by QtCreator 2010-09-30T09:29:20 # #------------------------------------------------- QT       += core QT       -= gui TARGET = CppHelloCln unix:LIBS += -L/usr/lib -lcln CONFIG   += console CONFIG   -= app_bundle TEMPLATE = app SOURCES += main.cpp

 

 

 

 

 

main.cpp

 


#include <cln/cln.h> #include <iostream> int main() {   cln::cl_I i = "123456789012345678901234567890";   const cln::cl_I j = i * i;   std::cout << "Hello CLN,\n" << j << " times\n"; }

 

 

 

 

 

Makefile