Netbeans C/C++ generic project
This commit is contained in:
commit
42815c0bab
14 changed files with 694 additions and 0 deletions
134
Makefile
Executable file
134
Makefile
Executable file
|
|
@ -0,0 +1,134 @@
|
||||||
|
# Generic Makefile for NetBeans for C/C++ projects
|
||||||
|
# Copyright (C) 2025 Benny Lyons
|
||||||
|
#
|
||||||
|
# This program 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 2
|
||||||
|
# of the License, or (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program 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 this program; if not, write to the Free Software
|
||||||
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
|
# Uses the variable NETBEANSBUILD which is added to _both_ the compile flags
|
||||||
|
# and the link process. Without this option Netbeans will not recognise the
|
||||||
|
# binary, so it is not possible to debug the binary in NetBeans.
|
||||||
|
# If you obtain the NetBeans error 'Not an ELF Binary', or something similar,
|
||||||
|
# then using $(NETBEANSBUILD) will most likely fix this.
|
||||||
|
#
|
||||||
|
|
||||||
|
|
||||||
|
# Change this to the name of your application, programme
|
||||||
|
# or the name of the binary this makefile produces
|
||||||
|
APP = myapp
|
||||||
|
|
||||||
|
# C++ compiler
|
||||||
|
#CXX:=clang++
|
||||||
|
CXX := g++
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
|
# NETBEANSBUILD
|
||||||
|
#
|
||||||
|
# Netbeans does not recognise an executable to debug out of the box.
|
||||||
|
# You must instruct the compiler to produce Platform Independent Code by
|
||||||
|
# using -no-pie. PIE is required to use Address Space Layout Randomization
|
||||||
|
# (ASLR), which is a security feature, which Netbeans cannot currently use.
|
||||||
|
#
|
||||||
|
# To fix, add the following option to CFLAGS and LDFLAGS
|
||||||
|
# -no-pie
|
||||||
|
NETBEANSBUILD := -no-pie
|
||||||
|
|
||||||
|
ifeq ($(MAKECMDGOALS),debug)
|
||||||
|
DBG_REL :=-ggdb3
|
||||||
|
else
|
||||||
|
DBG_REL :=
|
||||||
|
endif
|
||||||
|
|
||||||
|
#
|
||||||
|
# OS dependent flags
|
||||||
|
#
|
||||||
|
OS := $(shell uname -s)
|
||||||
|
ifeq ($(UNAME_S),Linux)
|
||||||
|
DBG_REL +=
|
||||||
|
endif
|
||||||
|
# OpenIndiana and flavours
|
||||||
|
ifeq ($(UNAME_S),SunOS)
|
||||||
|
DBG_REL +=
|
||||||
|
endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# CPPCHECK = $(HOME)/devl/cppcheck/bin/cppcheck
|
||||||
|
CPPCHECK := cppcheck
|
||||||
|
|
||||||
|
SRC_DIR := src
|
||||||
|
OBJ_DIR := obj
|
||||||
|
SRC := $(wildcard $(SRC_DIR)/*.cpp)
|
||||||
|
|
||||||
|
OBJS := $(patsubst $(SRC_DIR)/%.cpp,$(OBJ_DIR)/%.o,$(SRC))
|
||||||
|
|
||||||
|
##
|
||||||
|
## Add checks and issue warnings
|
||||||
|
##
|
||||||
|
# -Wall -Wextra # turn on all warnings.
|
||||||
|
# -Wconversion -Wsign-conversio # warn on unsign/sign conversions.
|
||||||
|
# -Wformat-security # warn onformat functions that might be a security issue
|
||||||
|
# -Werror # deactivate this initially? convert all warnings into errors.
|
||||||
|
# -march=x86-64 # take max advantage of address space (important for ASLR;
|
||||||
|
# # more virtual address space to chose from when randomising layout).
|
||||||
|
# -fstack-protector-all #
|
||||||
|
# -Wstack-protector #
|
||||||
|
# --param ssp-buffer-size=4 #
|
||||||
|
# -ftrapv # generate traps for signed overflow (currently bugged in gcc)
|
||||||
|
# -D_FORTIFY_SOURCE=2 -O2 # buffer overflow check. -D_FORTIFY_SOURCE=1 also possible
|
||||||
|
# -Wfloat-equal # testing floating-point numbers for equality is usually bad
|
||||||
|
# -Wpointer-arith # warn if anything depends upon the size of a function or of void
|
||||||
|
_CXXFLAGS=-Wall -Wextra \
|
||||||
|
-Wconversion -Wsign-conversion \
|
||||||
|
-march=x86-64 \
|
||||||
|
-Wformat-security \
|
||||||
|
-fstack-protector-all -Wstack-protector --param ssp-buffer-size=4 \
|
||||||
|
-ftrapv \
|
||||||
|
-D_FORTIFY_SOURCE=2 -O2 \
|
||||||
|
-Wfloat-equal \
|
||||||
|
-Wpointer-arith
|
||||||
|
|
||||||
|
|
||||||
|
CXXFLAGS = $(NETBEANSBUILD) $(DBG_REL) $(_CXXFLAGS)
|
||||||
|
LIBS = $(NETBEANSBUILD)
|
||||||
|
|
||||||
|
# Uncomment one of the following to select an output format
|
||||||
|
#CHECKFLAGS = --template="{file},{line},{severity},{id},{message}"
|
||||||
|
CHECKFLAGS = --quiet --enable=all --error-exitcode=1
|
||||||
|
#CHECKFLAGS = --enable=all --error-exitcode=1
|
||||||
|
|
||||||
|
debug release: DIRS $(APP)
|
||||||
|
check: cppcheck.out
|
||||||
|
|
||||||
|
|
||||||
|
$(APP): $(OBJS)
|
||||||
|
$(CXX) -o bin/$@ $^ $(LIBS)
|
||||||
|
$(OBJ_DIR)/%.o: $(SRC_DIR)/%.cpp
|
||||||
|
$(CXX) $(CXXFLAGS) -o $@ -c $<
|
||||||
|
|
||||||
|
DIRS:
|
||||||
|
mkdir -p ./obj ./bin
|
||||||
|
|
||||||
|
cppcheck.out: $(SRC)
|
||||||
|
$(info output to cppcheck.out)
|
||||||
|
$(CPPCHECK) $(CHECKFLAGS) $^ > $@ 2>&1
|
||||||
|
|
||||||
|
.PHONY: clean
|
||||||
|
clean:
|
||||||
|
$(info cleaning up)
|
||||||
|
@rm -f $(APP) $(OBJ_DIR)/* ./bin/$(APP) cppcheck.out
|
||||||
|
@if [ -d "./bin" ]; then rmdir ./bin ; fi
|
||||||
|
@if [ -d "./obj" ]; then rmdir ./obj ; fi
|
||||||
96
nbproject/configurations.xml
Normal file
96
nbproject/configurations.xml
Normal file
|
|
@ -0,0 +1,96 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<configurationDescriptor version="100">
|
||||||
|
<logicalFolder name="root" displayName="root" projectFiles="true" kind="ROOT">
|
||||||
|
<df root="." name="0">
|
||||||
|
<df name="src">
|
||||||
|
<in>testptr.cpp</in>
|
||||||
|
</df>
|
||||||
|
</df>
|
||||||
|
<logicalFolder name="ExternalFiles"
|
||||||
|
displayName="Important Files"
|
||||||
|
projectFiles="false"
|
||||||
|
kind="IMPORTANT_FILES_FOLDER">
|
||||||
|
<itemPath>Makefile</itemPath>
|
||||||
|
<itemPath>nbproject/private/launcher.properties</itemPath>
|
||||||
|
</logicalFolder>
|
||||||
|
</logicalFolder>
|
||||||
|
<sourceFolderFilter>^(nbproject)$</sourceFolderFilter>
|
||||||
|
<sourceRootList>
|
||||||
|
<Elem>.</Elem>
|
||||||
|
</sourceRootList>
|
||||||
|
<projectmakefile>Makefile</projectmakefile>
|
||||||
|
<confs>
|
||||||
|
<conf name="debug" type="0">
|
||||||
|
<toolsSet>
|
||||||
|
<compilerSet>default</compilerSet>
|
||||||
|
<dependencyChecking>false</dependencyChecking>
|
||||||
|
<rebuildPropChanged>false</rebuildPropChanged>
|
||||||
|
</toolsSet>
|
||||||
|
<flagsDictionary>
|
||||||
|
<element flagsID="0" commonFlags="-march=x86-64 -fstack-protector-all -O2"/>
|
||||||
|
</flagsDictionary>
|
||||||
|
<codeAssistance>
|
||||||
|
</codeAssistance>
|
||||||
|
<makefileType>
|
||||||
|
<makeTool>
|
||||||
|
<buildCommandWorkingDir>.</buildCommandWorkingDir>
|
||||||
|
<buildCommand>${MAKE} debug</buildCommand>
|
||||||
|
<cleanCommand>${MAKE} clean</cleanCommand>
|
||||||
|
<executablePath>bin/testptr</executablePath>
|
||||||
|
<ccTool>
|
||||||
|
<incDir>
|
||||||
|
<pElem>.</pElem>
|
||||||
|
</incDir>
|
||||||
|
<preprocessorList>
|
||||||
|
<Elem>_FORTIFY_SOURCE=2</Elem>
|
||||||
|
</preprocessorList>
|
||||||
|
</ccTool>
|
||||||
|
</makeTool>
|
||||||
|
<preBuild>
|
||||||
|
<preBuildCommandWorkingDir>.</preBuildCommandWorkingDir>
|
||||||
|
<preBuildCommand></preBuildCommand>
|
||||||
|
</preBuild>
|
||||||
|
</makefileType>
|
||||||
|
<item path="src/testptr.cpp" ex="false" tool="1" flavor2="0">
|
||||||
|
<ccTool flags="0">
|
||||||
|
</ccTool>
|
||||||
|
</item>
|
||||||
|
</conf>
|
||||||
|
<conf name="Default" type="0">
|
||||||
|
<toolsSet>
|
||||||
|
<compilerSet>default</compilerSet>
|
||||||
|
<dependencyChecking>false</dependencyChecking>
|
||||||
|
<rebuildPropChanged>false</rebuildPropChanged>
|
||||||
|
</toolsSet>
|
||||||
|
<flagsDictionary>
|
||||||
|
<element flagsID="0" commonFlags="-march=x86-64 -fstack-protector-all -O2"/>
|
||||||
|
</flagsDictionary>
|
||||||
|
<codeAssistance>
|
||||||
|
</codeAssistance>
|
||||||
|
<makefileType>
|
||||||
|
<makeTool>
|
||||||
|
<buildCommandWorkingDir>.</buildCommandWorkingDir>
|
||||||
|
<buildCommand>${MAKE} -f Makefile</buildCommand>
|
||||||
|
<cleanCommand>${MAKE} -f Makefile clean</cleanCommand>
|
||||||
|
<executablePath>bin/testptr</executablePath>
|
||||||
|
<ccTool>
|
||||||
|
<incDir>
|
||||||
|
<pElem>.</pElem>
|
||||||
|
</incDir>
|
||||||
|
<preprocessorList>
|
||||||
|
<Elem>_FORTIFY_SOURCE=2</Elem>
|
||||||
|
</preprocessorList>
|
||||||
|
</ccTool>
|
||||||
|
</makeTool>
|
||||||
|
<preBuild>
|
||||||
|
<preBuildCommandWorkingDir>.</preBuildCommandWorkingDir>
|
||||||
|
<preBuildCommand></preBuildCommand>
|
||||||
|
</preBuild>
|
||||||
|
</makefileType>
|
||||||
|
<item path="src/testptr.cpp" ex="false" tool="1" flavor2="0">
|
||||||
|
<ccTool flags="0">
|
||||||
|
</ccTool>
|
||||||
|
</item>
|
||||||
|
</conf>
|
||||||
|
</confs>
|
||||||
|
</configurationDescriptor>
|
||||||
1
nbproject/private/CodeAssistancePathMapper.properties
Normal file
1
nbproject/private/CodeAssistancePathMapper.properties
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
# Automatic path mapper. CRC = 1
|
||||||
10
nbproject/private/Default-build.log
Normal file
10
nbproject/private/Default-build.log
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
gcc -std=gnu11 -o testptr `pkg-config --libs dbus-1 json-c gtk+-3.0`
|
||||||
|
Package dbus-1 was not found in the pkg-config search path.
|
||||||
|
Perhaps you should add the directory containing `dbus-1.pc'
|
||||||
|
to the PKG_CONFIG_PATH environment variable
|
||||||
|
Package 'dbus-1', required by 'virtual:world', not found
|
||||||
|
Package 'json-c', required by 'virtual:world', not found
|
||||||
|
Package 'gtk+-3.0', required by 'virtual:world', not found
|
||||||
|
gcc: fatal error: no input files
|
||||||
|
compilation terminated.
|
||||||
|
make: *** [Makefile:69: testptr] Error 1
|
||||||
7
nbproject/private/Default-exec.log
Normal file
7
nbproject/private/Default-exec.log
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
called: /usr/bin/gcc
|
||||||
|
/home/benn/devl/cpp/nbprojects/tests/test_ptr2
|
||||||
|
gcc
|
||||||
|
-std=gnu11
|
||||||
|
-o
|
||||||
|
testptr
|
||||||
|
|
||||||
1
nbproject/private/Default.properties
Normal file
1
nbproject/private/Default.properties
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
/home/benn/devl/cpp/nbprojects/tests/test_ptr2/src/testptr.cpp=/home/benn/devl/cpp/nbprojects/tests/test_ptr2#-c src/testptr.cpp -Wall -Wextra -Wconversion -Wsign-conversion -march=x86-64 -Wformat-security -fstack-protector-all -Wstack-protector --param ssp-buffer-size=4 -ftrapv -D_FORTIFY_SOURCE=2 -O2 -Wfloat-equal -Wpointer-arith
|
||||||
75
nbproject/private/c_standard_headers_indexer.c
Normal file
75
nbproject/private/c_standard_headers_indexer.c
Normal file
|
|
@ -0,0 +1,75 @@
|
||||||
|
/*
|
||||||
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
|
||||||
|
*
|
||||||
|
* Copyright (c) 2016 Oracle and/or its affiliates. All rights reserved.
|
||||||
|
*
|
||||||
|
* Oracle and Java are registered trademarks of Oracle and/or its affiliates.
|
||||||
|
* Other names may be trademarks of their respective owners.
|
||||||
|
*
|
||||||
|
* The contents of this file are subject to the terms of either the GNU
|
||||||
|
* General Public License Version 2 only ("GPL") or the Common
|
||||||
|
* Development and Distribution License("CDDL") (collectively, the
|
||||||
|
* "License"). You may not use this file except in compliance with the
|
||||||
|
* License. You can obtain a copy of the License at
|
||||||
|
* http://www.netbeans.org/cddl-gplv2.html
|
||||||
|
* or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
|
||||||
|
* specific language governing permissions and limitations under the
|
||||||
|
* License. When distributing the software, include this License Header
|
||||||
|
* Notice in each file and include the License file at
|
||||||
|
* nbbuild/licenses/CDDL-GPL-2-CP. Oracle designates this
|
||||||
|
* particular file as subject to the "Classpath" exception as provided
|
||||||
|
* by Oracle in the GPL Version 2 section of the License file that
|
||||||
|
* accompanied this code. If applicable, add the following below the
|
||||||
|
* License Header, with the fields enclosed by brackets [] replaced by
|
||||||
|
* your own identifying information:
|
||||||
|
* "Portions Copyrighted [year] [name of copyright owner]"
|
||||||
|
*
|
||||||
|
* If you wish your version of this file to be governed by only the CDDL
|
||||||
|
* or only the GPL Version 2, indicate your decision by adding
|
||||||
|
* "[Contributor] elects to include this software in this distribution
|
||||||
|
* under the [CDDL or GPL Version 2] license." If you do not indicate a
|
||||||
|
* single choice of license, a recipient has the option to distribute
|
||||||
|
* your version of this file under either the CDDL, the GPL Version 2 or
|
||||||
|
* to extend the choice of license to its licensees as provided above.
|
||||||
|
* However, if you add GPL Version 2 code and therefore, elected the GPL
|
||||||
|
* Version 2 license, then the option applies only if the new code is
|
||||||
|
* made subject to such option by the copyright holder.
|
||||||
|
*
|
||||||
|
* Contributor(s):
|
||||||
|
*/
|
||||||
|
|
||||||
|
// List of standard headers was taken in http://en.cppreference.com/w/c/header
|
||||||
|
|
||||||
|
#include <assert.h> // Conditionally compiled macro that compares its argument to zero
|
||||||
|
#include <ctype.h> // Functions to determine the type contained in character data
|
||||||
|
#include <errno.h> // Macros reporting error conditions
|
||||||
|
#include <float.h> // Limits of float types
|
||||||
|
#include <limits.h> // Sizes of basic types
|
||||||
|
#include <locale.h> // Localization utilities
|
||||||
|
#include <math.h> // Common mathematics functions
|
||||||
|
#include <setjmp.h> // Nonlocal jumps
|
||||||
|
#include <signal.h> // Signal handling
|
||||||
|
#include <stdarg.h> // Variable arguments
|
||||||
|
#include <stddef.h> // Common macro definitions
|
||||||
|
#include <stdio.h> // Input/output
|
||||||
|
#include <string.h> // String handling
|
||||||
|
#include <stdlib.h> // General utilities: memory management, program utilities, string conversions, random numbers
|
||||||
|
#include <time.h> // Time/date utilities
|
||||||
|
#include <iso646.h> // (since C95) Alternative operator spellings
|
||||||
|
#include <wchar.h> // (since C95) Extended multibyte and wide character utilities
|
||||||
|
#include <wctype.h> // (since C95) Wide character classification and mapping utilities
|
||||||
|
#ifdef _STDC_C99
|
||||||
|
#include <complex.h> // (since C99) Complex number arithmetic
|
||||||
|
#include <fenv.h> // (since C99) Floating-point environment
|
||||||
|
#include <inttypes.h> // (since C99) Format conversion of integer types
|
||||||
|
#include <stdbool.h> // (since C99) Boolean type
|
||||||
|
#include <stdint.h> // (since C99) Fixed-width integer types
|
||||||
|
#include <tgmath.h> // (since C99) Type-generic math (macros wrapping math.h and complex.h)
|
||||||
|
#endif
|
||||||
|
#ifdef _STDC_C11
|
||||||
|
#include <stdalign.h> // (since C11) alignas and alignof convenience macros
|
||||||
|
#include <stdatomic.h> // (since C11) Atomic types
|
||||||
|
#include <stdnoreturn.h> // (since C11) noreturn convenience macros
|
||||||
|
#include <threads.h> // (since C11) Thread library
|
||||||
|
#include <uchar.h> // (since C11) UTF-16 and UTF-32 character utilities
|
||||||
|
#endif
|
||||||
115
nbproject/private/configurations.xml
Normal file
115
nbproject/private/configurations.xml
Normal file
|
|
@ -0,0 +1,115 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<configurationDescriptor version="100">
|
||||||
|
<logicalFolder name="root" displayName="root" projectFiles="true" kind="ROOT">
|
||||||
|
<df root="." name="0">
|
||||||
|
<df name="bin">
|
||||||
|
</df>
|
||||||
|
<df name="obj">
|
||||||
|
</df>
|
||||||
|
<df name="src">
|
||||||
|
<in>testptr.cpp</in>
|
||||||
|
</df>
|
||||||
|
</df>
|
||||||
|
</logicalFolder>
|
||||||
|
<projectmakefile>Makefile</projectmakefile>
|
||||||
|
<confs>
|
||||||
|
<conf name="debug" type="0">
|
||||||
|
<toolsSet>
|
||||||
|
<developmentServer>localhost</developmentServer>
|
||||||
|
<platform>2</platform>
|
||||||
|
</toolsSet>
|
||||||
|
<compile>
|
||||||
|
<compiledirpicklist>
|
||||||
|
<compiledirpicklistitem>${AUTO_FOLDER}</compiledirpicklistitem>
|
||||||
|
<compiledirpicklistitem>.</compiledirpicklistitem>
|
||||||
|
</compiledirpicklist>
|
||||||
|
<compiledir>${AUTO_FOLDER}</compiledir>
|
||||||
|
<compilecommandpicklist>
|
||||||
|
<compilecommandpicklistitem>${MAKE} ${ITEM_NAME}.o</compilecommandpicklistitem>
|
||||||
|
<compilecommandpicklistitem>make -f Makefile debug</compilecommandpicklistitem>
|
||||||
|
<compilecommandpicklistitem>make debug</compilecommandpicklistitem>
|
||||||
|
<compilecommandpicklistitem>make -f Makefile</compilecommandpicklistitem>
|
||||||
|
<compilecommandpicklistitem>${MAKE} -f Makefile</compilecommandpicklistitem>
|
||||||
|
<compilecommandpicklistitem>${AUTO_COMPILE}</compilecommandpicklistitem>
|
||||||
|
</compilecommandpicklist>
|
||||||
|
<compilecommand>${AUTO_COMPILE}</compilecommand>
|
||||||
|
</compile>
|
||||||
|
<dbx_gdbdebugger version="1">
|
||||||
|
<gdb_pathmaps>
|
||||||
|
</gdb_pathmaps>
|
||||||
|
<gdb_interceptlist>
|
||||||
|
<gdbinterceptoptions gdb_all="false" gdb_unhandled="true" gdb_unexpected="true"/>
|
||||||
|
</gdb_interceptlist>
|
||||||
|
<gdb_signals>
|
||||||
|
</gdb_signals>
|
||||||
|
<gdb_options>
|
||||||
|
<DebugOptions>
|
||||||
|
</DebugOptions>
|
||||||
|
</gdb_options>
|
||||||
|
<gdb_buildfirst gdb_buildfirst_overriden="false" gdb_buildfirst_old="false"/>
|
||||||
|
</dbx_gdbdebugger>
|
||||||
|
<nativedebugger version="1">
|
||||||
|
<engine>gdb</engine>
|
||||||
|
</nativedebugger>
|
||||||
|
<runprofile version="9">
|
||||||
|
<runcommandpicklist>
|
||||||
|
<runcommandpicklistitem>"${OUTPUT_PATH}"</runcommandpicklistitem>
|
||||||
|
</runcommandpicklist>
|
||||||
|
<runcommand>"${OUTPUT_PATH}"</runcommand>
|
||||||
|
<rundir></rundir>
|
||||||
|
<buildfirst>false</buildfirst>
|
||||||
|
<terminal-type>0</terminal-type>
|
||||||
|
<remove-instrumentation>0</remove-instrumentation>
|
||||||
|
<environment>
|
||||||
|
</environment>
|
||||||
|
</runprofile>
|
||||||
|
</conf>
|
||||||
|
<conf name="Default" type="0">
|
||||||
|
<toolsSet>
|
||||||
|
<developmentServer>localhost</developmentServer>
|
||||||
|
<platform>2</platform>
|
||||||
|
</toolsSet>
|
||||||
|
<compile>
|
||||||
|
<compiledirpicklist>
|
||||||
|
<compiledirpicklistitem>.</compiledirpicklistitem>
|
||||||
|
<compiledirpicklistitem>${AUTO_FOLDER}</compiledirpicklistitem>
|
||||||
|
</compiledirpicklist>
|
||||||
|
<compiledir>${AUTO_FOLDER}</compiledir>
|
||||||
|
<compilecommandpicklist>
|
||||||
|
<compilecommandpicklistitem>${MAKE} ${ITEM_NAME}.o</compilecommandpicklistitem>
|
||||||
|
<compilecommandpicklistitem>${AUTO_COMPILE}</compilecommandpicklistitem>
|
||||||
|
</compilecommandpicklist>
|
||||||
|
<compilecommand>${AUTO_COMPILE}</compilecommand>
|
||||||
|
</compile>
|
||||||
|
<dbx_gdbdebugger version="1">
|
||||||
|
<gdb_pathmaps>
|
||||||
|
</gdb_pathmaps>
|
||||||
|
<gdb_interceptlist>
|
||||||
|
<gdbinterceptoptions gdb_all="false" gdb_unhandled="true" gdb_unexpected="true"/>
|
||||||
|
</gdb_interceptlist>
|
||||||
|
<gdb_signals>
|
||||||
|
</gdb_signals>
|
||||||
|
<gdb_options>
|
||||||
|
<DebugOptions>
|
||||||
|
</DebugOptions>
|
||||||
|
</gdb_options>
|
||||||
|
<gdb_buildfirst gdb_buildfirst_overriden="false" gdb_buildfirst_old="false"/>
|
||||||
|
</dbx_gdbdebugger>
|
||||||
|
<nativedebugger version="1">
|
||||||
|
<engine>gdb</engine>
|
||||||
|
</nativedebugger>
|
||||||
|
<runprofile version="9">
|
||||||
|
<runcommandpicklist>
|
||||||
|
<runcommandpicklistitem>"${OUTPUT_PATH}"</runcommandpicklistitem>
|
||||||
|
</runcommandpicklist>
|
||||||
|
<runcommand>"${OUTPUT_PATH}"</runcommand>
|
||||||
|
<rundir>.</rundir>
|
||||||
|
<buildfirst>false</buildfirst>
|
||||||
|
<terminal-type>0</terminal-type>
|
||||||
|
<remove-instrumentation>0</remove-instrumentation>
|
||||||
|
<environment>
|
||||||
|
</environment>
|
||||||
|
</runprofile>
|
||||||
|
</conf>
|
||||||
|
</confs>
|
||||||
|
</configurationDescriptor>
|
||||||
135
nbproject/private/cpp_standard_headers_indexer.cpp
Normal file
135
nbproject/private/cpp_standard_headers_indexer.cpp
Normal file
|
|
@ -0,0 +1,135 @@
|
||||||
|
/*
|
||||||
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
|
||||||
|
*
|
||||||
|
* Copyright (c) 2016 Oracle and/or its affiliates. All rights reserved.
|
||||||
|
*
|
||||||
|
* Oracle and Java are registered trademarks of Oracle and/or its affiliates.
|
||||||
|
* Other names may be trademarks of their respective owners.
|
||||||
|
*
|
||||||
|
* The contents of this file are subject to the terms of either the GNU
|
||||||
|
* General Public License Version 2 only ("GPL") or the Common
|
||||||
|
* Development and Distribution License("CDDL") (collectively, the
|
||||||
|
* "License"). You may not use this file except in compliance with the
|
||||||
|
* License. You can obtain a copy of the License at
|
||||||
|
* http://www.netbeans.org/cddl-gplv2.html
|
||||||
|
* or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
|
||||||
|
* specific language governing permissions and limitations under the
|
||||||
|
* License. When distributing the software, include this License Header
|
||||||
|
* Notice in each file and include the License file at
|
||||||
|
* nbbuild/licenses/CDDL-GPL-2-CP. Oracle designates this
|
||||||
|
* particular file as subject to the "Classpath" exception as provided
|
||||||
|
* by Oracle in the GPL Version 2 section of the License file that
|
||||||
|
* accompanied this code. If applicable, add the following below the
|
||||||
|
* License Header, with the fields enclosed by brackets [] replaced by
|
||||||
|
* your own identifying information:
|
||||||
|
* "Portions Copyrighted [year] [name of copyright owner]"
|
||||||
|
*
|
||||||
|
* If you wish your version of this file to be governed by only the CDDL
|
||||||
|
* or only the GPL Version 2, indicate your decision by adding
|
||||||
|
* "[Contributor] elects to include this software in this distribution
|
||||||
|
* under the [CDDL or GPL Version 2] license." If you do not indicate a
|
||||||
|
* single choice of license, a recipient has the option to distribute
|
||||||
|
* your version of this file under either the CDDL, the GPL Version 2 or
|
||||||
|
* to extend the choice of license to its licensees as provided above.
|
||||||
|
* However, if you add GPL Version 2 code and therefore, elected the GPL
|
||||||
|
* Version 2 license, then the option applies only if the new code is
|
||||||
|
* made subject to such option by the copyright holder.
|
||||||
|
*
|
||||||
|
* Contributor(s):
|
||||||
|
*/
|
||||||
|
|
||||||
|
// List of standard headers was taken in http://en.cppreference.com/w/cpp/header
|
||||||
|
|
||||||
|
#include <cstdlib> // General purpose utilities: program control, dynamic memory allocation, random numbers, sort and search
|
||||||
|
#include <csignal> // Functions and macro constants for signal management
|
||||||
|
#include <csetjmp> // Macro (and function) that saves (and jumps) to an execution context
|
||||||
|
#include <cstdarg> // Handling of variable length argument lists
|
||||||
|
#include <typeinfo> // Runtime type information utilities
|
||||||
|
#include <bitset> // std::bitset class template
|
||||||
|
#include <functional> // Function objects, designed for use with the standard algorithms
|
||||||
|
#include <utility> // Various utility components
|
||||||
|
#include <ctime> // C-style time/date utilites
|
||||||
|
#include <cstddef> // typedefs for types such as size_t, NULL and others
|
||||||
|
#include <new> // Low-level memory management utilities
|
||||||
|
#include <memory> // Higher level memory management utilities
|
||||||
|
#include <climits> // limits of integral types
|
||||||
|
#include <cfloat> // limits of float types
|
||||||
|
#include <limits> // standardized way to query properties of arithmetic types
|
||||||
|
#include <exception> // Exception handling utilities
|
||||||
|
#include <stdexcept> // Standard exception objects
|
||||||
|
#include <cassert> // Conditionally compiled macro that compares its argument to zero
|
||||||
|
#include <cerrno> // Macro containing the last error number
|
||||||
|
#include <cctype> // functions to determine the type contained in character data
|
||||||
|
#include <cwctype> // functions for determining the type of wide character data
|
||||||
|
#include <cstring> // various narrow character string handling functions
|
||||||
|
#include <cwchar> // various wide and multibyte string handling functions
|
||||||
|
#include <string> // std::basic_string class template
|
||||||
|
#include <vector> // std::vector container
|
||||||
|
#include <deque> // std::deque container
|
||||||
|
#include <list> // std::list container
|
||||||
|
#include <set> // std::set and std::multiset associative containers
|
||||||
|
#include <map> // std::map and std::multimap associative containers
|
||||||
|
#include <stack> // std::stack container adaptor
|
||||||
|
#include <queue> // std::queue and std::priority_queue container adaptors
|
||||||
|
#include <algorithm> // Algorithms that operate on containers
|
||||||
|
#include <iterator> // Container iterators
|
||||||
|
#include <cmath> // Common mathematics functions
|
||||||
|
#include <complex> // Complex number type
|
||||||
|
#include <valarray> // Class for representing and manipulating arrays of values
|
||||||
|
#include <numeric> // Numeric operations on values in containers
|
||||||
|
#include <iosfwd> // forward declarations of all classes in the input/output library
|
||||||
|
#include <ios> // std::ios_base class, std::basic_ios class template and several typedefs
|
||||||
|
#include <istream> // std::basic_istream class template and several typedefs
|
||||||
|
#include <ostream> // std::basic_ostream, std::basic_iostream class templates and several typedefs
|
||||||
|
#include <iostream> // several standard stream objects
|
||||||
|
#include <fstream> // std::basic_fstream, std::basic_ifstream, std::basic_ofstream class templates and several typedefs
|
||||||
|
#include <sstream> // std::basic_stringstream, std::basic_istringstream, std::basic_ostringstream class templates and several typedefs
|
||||||
|
#include <strstream> // std::strstream, std::istrstream, std::ostrstream(deprecated)
|
||||||
|
#include <iomanip> // Helper functions to control the format or input and output
|
||||||
|
#include <streambuf> // std::basic_streambuf class template
|
||||||
|
#include <cstdio> // C-style input-output functions
|
||||||
|
#include <locale> // Localization utilities
|
||||||
|
#include <clocale> // C localization utilities
|
||||||
|
#include <ciso646> // empty header. The macros that appear in iso646.h in C are keywords in C++
|
||||||
|
#if __cplusplus >= 201103L
|
||||||
|
#include <typeindex> // (since C++11) std::type_index
|
||||||
|
#include <type_traits> // (since C++11) Compile-time type information
|
||||||
|
#include <chrono> // (since C++11) C++ time utilites
|
||||||
|
#include <initializer_list> // (since C++11) std::initializer_list class template
|
||||||
|
#include <tuple> // (since C++11) std::tuple class template
|
||||||
|
#include <scoped_allocator> // (since C++11) Nested allocator class
|
||||||
|
#include <cstdint> // (since C++11) fixed-size types and limits of other types
|
||||||
|
#include <cinttypes> // (since C++11) formatting macros , intmax_t and uintmax_t math and conversions
|
||||||
|
#include <system_error> // (since C++11) defines std::error_code, a platform-dependent error code
|
||||||
|
#include <cuchar> // (since C++11) C-style Unicode character conversion functions
|
||||||
|
#include <array> // (since C++11) std::array container
|
||||||
|
#include <forward_list> // (since C++11) std::forward_list container
|
||||||
|
#include <unordered_set> // (since C++11) std::unordered_set and std::unordered_multiset unordered associative containers
|
||||||
|
#include <unordered_map> // (since C++11) std::unordered_map and std::unordered_multimap unordered associative containers
|
||||||
|
#include <random> // (since C++11) Random number generators and distributions
|
||||||
|
#include <ratio> // (since C++11) Compile-time rational arithmetic
|
||||||
|
#include <cfenv> // (since C++11) Floating-point environment access functions
|
||||||
|
#include <codecvt> // (since C++11) Unicode conversion facilities
|
||||||
|
#include <regex> // (since C++11) Classes, algorithms and iterators to support regular expression processing
|
||||||
|
#include <atomic> // (since C++11) Atomic operations library
|
||||||
|
#include <ccomplex> // (since C++11)(deprecated in C++17) simply includes the header <complex>
|
||||||
|
#include <ctgmath> // (since C++11)(deprecated in C++17) simply includes the headers <ccomplex> (until C++17)<complex> (since C++17) and <cmath>: the overloads equivalent to the contents of the C header tgmath.h are already provided by those headers
|
||||||
|
#include <cstdalign> // (since C++11)(deprecated in C++17) defines one compatibility macro constant
|
||||||
|
#include <cstdbool> // (since C++11)(deprecated in C++17) defines one compatibility macro constant
|
||||||
|
#include <thread> // (since C++11) std::thread class and supporting functions
|
||||||
|
#include <mutex> // (since C++11) mutual exclusion primitives
|
||||||
|
#include <future> // (since C++11) primitives for asynchronous computations
|
||||||
|
#include <condition_variable> // (since C++11) thread waiting conditions
|
||||||
|
#endif
|
||||||
|
#if __cplusplus >= 201300L
|
||||||
|
#include <shared_mutex> // (since C++14) shared mutual exclusion primitives
|
||||||
|
#endif
|
||||||
|
#if __cplusplus >= 201500L
|
||||||
|
#include <any> // (since C++17) std::any class template
|
||||||
|
#include <optional> // (since C++17) std::optional class template
|
||||||
|
#include <variant> // (since C++17) std::variant class template
|
||||||
|
#include <memory_resource> // (since C++17) Polymorphic allocators and memory resources
|
||||||
|
#include <string_view> // (since C++17) std::basic_string_view class template
|
||||||
|
#include <execution> // (since C++17) Predefined execution policies for parallel versions of the algorithms
|
||||||
|
#include <filesystem> // (since C++17) std::path class and supporting functions
|
||||||
|
#endif
|
||||||
1
nbproject/private/debug.properties
Normal file
1
nbproject/private/debug.properties
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
/home/benn/devl/cpp/nbprojects/tests/test_ptr2/src/testptr.cpp=/home/benn/devl/cpp/nbprojects/tests/test_ptr2#-Wall -Wextra -Wconversion -Wsign-conversion -march=x86-64 -Wformat-security -fstack-protector-all -Wstack-protector --param ssp-buffer-size=4 -ftrapv -D_FORTIFY_SOURCE=2 -O2 -Wfloat-equal -Wpointer-arith -o obj/testptr.o -c src/testptr.cpp
|
||||||
42
nbproject/private/launcher.properties
Normal file
42
nbproject/private/launcher.properties
Normal file
|
|
@ -0,0 +1,42 @@
|
||||||
|
# Launchers File syntax:
|
||||||
|
#
|
||||||
|
# [Must-have property line]
|
||||||
|
# launcher1.runCommand=<Run Command>
|
||||||
|
# [Optional extra properties]
|
||||||
|
# launcher1.displayName=<Display Name, runCommand by default>
|
||||||
|
# launcher1.hide=<true if lancher is not visible in menu, false by default>
|
||||||
|
# launcher1.buildCommand=<Build Command, Build Command specified in project properties by default>
|
||||||
|
# launcher1.runDir=<Run Directory, ${PROJECT_DIR} by default>
|
||||||
|
# launcher1.runInOwnTab=<false if launcher reuse common "Run" output tab, true by default>
|
||||||
|
# launcher1.symbolFiles=<Symbol Files loaded by debugger, ${OUTPUT_PATH} by default>
|
||||||
|
# launcher1.env.<Environment variable KEY>=<Environment variable VALUE>
|
||||||
|
# (If this value is quoted with ` it is handled as a native command which execution result will become the value)
|
||||||
|
# [Common launcher properties]
|
||||||
|
# common.runDir=<Run Directory>
|
||||||
|
# (This value is overwritten by a launcher specific runDir value if the latter exists)
|
||||||
|
# common.env.<Environment variable KEY>=<Environment variable VALUE>
|
||||||
|
# (Environment variables from common launcher are merged with launcher specific variables)
|
||||||
|
# common.symbolFiles=<Symbol Files loaded by debugger>
|
||||||
|
# (This value is overwritten by a launcher specific symbolFiles value if the latter exists)
|
||||||
|
#
|
||||||
|
# In runDir, symbolFiles and env fields you can use these macroses:
|
||||||
|
# ${PROJECT_DIR} - project directory absolute path
|
||||||
|
# ${OUTPUT_PATH} - linker output path (relative to project directory path)
|
||||||
|
# ${OUTPUT_BASENAME}- linker output filename
|
||||||
|
# ${TESTDIR} - test files directory (relative to project directory path)
|
||||||
|
# ${OBJECTDIR} - object files directory (relative to project directory path)
|
||||||
|
# ${CND_DISTDIR} - distribution directory (relative to project directory path)
|
||||||
|
# ${CND_BUILDDIR} - build directory (relative to project directory path)
|
||||||
|
# ${CND_PLATFORM} - platform name
|
||||||
|
# ${CND_CONF} - configuration name
|
||||||
|
# ${CND_DLIB_EXT} - dynamic library extension
|
||||||
|
#
|
||||||
|
# All the project launchers must be listed in the file!
|
||||||
|
#
|
||||||
|
# launcher1.runCommand=...
|
||||||
|
# launcher2.runCommand=...
|
||||||
|
# ...
|
||||||
|
# common.runDir=...
|
||||||
|
# common.env.KEY=VALUE
|
||||||
|
|
||||||
|
# launcher1.runCommand=<type your run command here>
|
||||||
17
nbproject/private/private.xml
Normal file
17
nbproject/private/private.xml
Normal file
|
|
@ -0,0 +1,17 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project-private xmlns="http://www.netbeans.org/ns/project-private/1">
|
||||||
|
<code-assistance-data xmlns="http://www.netbeans.org/ns/make-project-private/1">
|
||||||
|
<code-model-enabled>true</code-model-enabled>
|
||||||
|
</code-assistance-data>
|
||||||
|
<data xmlns="http://www.netbeans.org/ns/make-project-private/1">
|
||||||
|
<activeConfTypeElem>0</activeConfTypeElem>
|
||||||
|
<activeConfIndexElem>0</activeConfIndexElem>
|
||||||
|
</data>
|
||||||
|
<editor-bookmarks xmlns="http://www.netbeans.org/ns/editor-bookmarks/2" lastBookmarkId="0"/>
|
||||||
|
<open-files xmlns="http://www.netbeans.org/ns/projectui-open-files/2">
|
||||||
|
<group>
|
||||||
|
<file>file:/home/benn/devl/cpp/nbprojects/tests/test_ptr2/Makefile</file>
|
||||||
|
<file>file:/home/benn/devl/cpp/nbprojects/tests/test_ptr2/src/testptr.cpp</file>
|
||||||
|
</group>
|
||||||
|
</open-files>
|
||||||
|
</project-private>
|
||||||
30
nbproject/project.xml
Normal file
30
nbproject/project.xml
Normal file
|
|
@ -0,0 +1,30 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project xmlns="http://www.netbeans.org/ns/project/1">
|
||||||
|
<type>org.netbeans.modules.cnd.makeproject</type>
|
||||||
|
<configuration>
|
||||||
|
<data xmlns="http://www.netbeans.org/ns/make-project/1">
|
||||||
|
<name>test_ptr2</name>
|
||||||
|
<c-extensions/>
|
||||||
|
<cpp-extensions>cpp</cpp-extensions>
|
||||||
|
<header-extensions/>
|
||||||
|
<sourceEncoding>UTF-8</sourceEncoding>
|
||||||
|
<make-dep-projects/>
|
||||||
|
<sourceRootList>
|
||||||
|
<sourceRootElem>.</sourceRootElem>
|
||||||
|
</sourceRootList>
|
||||||
|
<confList>
|
||||||
|
<confElem>
|
||||||
|
<name>debug</name>
|
||||||
|
<type>0</type>
|
||||||
|
</confElem>
|
||||||
|
<confElem>
|
||||||
|
<name>Default</name>
|
||||||
|
<type>0</type>
|
||||||
|
</confElem>
|
||||||
|
</confList>
|
||||||
|
<formatting>
|
||||||
|
<project-formatting-style>false</project-formatting-style>
|
||||||
|
</formatting>
|
||||||
|
</data>
|
||||||
|
</configuration>
|
||||||
|
</project>
|
||||||
30
src/myapp.cpp
Normal file
30
src/myapp.cpp
Normal file
|
|
@ -0,0 +1,30 @@
|
||||||
|
//
|
||||||
|
// Sample source file for NetBeans for C/C++ projects
|
||||||
|
// Copyright (C) 2025 Benny Lyons
|
||||||
|
//
|
||||||
|
// This program 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 2
|
||||||
|
// of the License, or (at your option) any later version.
|
||||||
|
//
|
||||||
|
// This program 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 this program; if not, write to the Free Software
|
||||||
|
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
//
|
||||||
|
|
||||||
|
#include <iostream>
|
||||||
|
|
||||||
|
|
||||||
|
int main ()
|
||||||
|
{
|
||||||
|
std::cout << "Hi" << '\n';
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
Loading…
Reference in a new issue