I can compile all examples of boost:stacktrace. Here is my bash script:
#!/bin/bash
export CXX=~/x-tools/x86_64-unknown-linux-gnu/bin/x86_64-unknown-linux-gnu-g++
export BOOST_INCLUDE=$HOME/x-libs/$($CXX -dumpmachine)/include
export BOOST_LIB=$HOME/x-libs/$($CXX -dumpmachine)/lib
export BOOST_SUFFIX="mt-d"
(ls $BOOST_LIB/*$BOOST_SUFFIX.a | tr "\n" "\0" | xargs -0 -n 1 basename | while read A; do B=-l$(echo $A | sed -e 's/^lib//' | sed -e 's/\.a//'); echo $B; done;) | tr "\n" " " > $BOOST_LIB/list_boost.txt
export BOOST_LIBS="cat $BOOST_LIB/list_boost.txt"
export EXECUTABLE_SUFFIX=""
$CXX -w -g3 -o assert_handler-$($CXX -dumpmachine)$EXECUTABLE_SUFFIX assert_handler.cpp -std=c++11 -static -I$BOOST_INCLUDE -L$BOOST_LIB $(eval $BOOST_LIBS) -ldl
$CXX -w -g3 -o debug_function-$($CXX -dumpmachine)$EXECUTABLE_SUFFIX debug_function.cpp -std=c++11 -static -I$BOOST_INCLUDE -L$BOOST_LIB $(eval $BOOST_LIBS) -ldl
$CXX -w -g3 -o terminate_handler-$($CXX -dumpmachine)$EXECUTABLE_SUFFIX terminate_handler.cpp -std=c++11 -static -I$BOOST_INCLUDE -L$BOOST_LIB $(eval $BOOST_LIBS) -ldl -lrt -lpthread
$CXX -w -g3 -o throwing_st-$($CXX -dumpmachine)$EXECUTABLE_SUFFIX throwing_st.cpp -std=c++11 -static -I$BOOST_INCLUDE -L$BOOST_LIB $(eval $BOOST_LIBS) -ldl
$CXX -w -g3 -o trace_addresses-$($CXX -dumpmachine)$EXECUTABLE_SUFFIX trace_addresses.cpp -std=c++11 -static -I$BOOST_INCLUDE -L$BOOST_LIB $(eval $BOOST_LIBS)
$CXX -w -g3 -o user_config-$($CXX -dumpmachine)$EXECUTABLE_SUFFIX user_config.cpp -std=c++11 -static -I$BOOST_INCLUDE -L$BOOST_LIB $(eval $BOOST_LIBS) -ldl
The generated boost list looks like this:
-lboost_atomic-mt-d -lboost_chrono-mt-d -lboost_container-mt-d -lboost_context-mt-d -lboost_coroutine-mt-d -lboost_date_time-mt-d -lboost_exception-mt-d -lboost_fiber-mt-d -lboost_filesystem-mt-d -lboost_graph-mt-d -lboost_iostreams-mt-d -lboost_locale-mt-d -lboost_log-mt-d -lboost_log_setup-mt-d -lboost_math_c99f-mt-d -lboost_math_c99l-mt-d -lboost_math_c99-mt-d -lboost_math_tr1f-mt-d -lboost_math_tr1l-mt-d -lboost_math_tr1-mt-d -lboost_prg_exec_monitor-mt-d -lboost_program_options-mt-d -lboost_random-mt-d -lboost_regex-mt-d -lboost_serialization-mt-d -lboost_signals-mt-d -lboost_stacktrace_addr2line-mt-d -lboost_stacktrace_basic-mt-d -lboost_stacktrace_noop-mt-d -lboost_system-mt-d -lboost_test_exec_monitor-mt-d -lboost_thread-mt-d -lboost_timer-mt-d -lboost_type_erasure-mt-d -lboost_unit_test_framework-mt-d -lboost_wave-mt-d -lboost_wserialization-mt-d
If I run an example it prints pointers:
./assert_handler-x86_64-unknown-linux-gnu
Expression 'i < N' is false in function 'T& boost::array<T, N>::operator[](boost::array<T, N>::size_type) [with T = int; long unsigned int N = 5ul; boost::array<T, N>::reference = int&; boost::array<T, N>::size_type = long unsigned int]': out of range.
Backtrace:
0# 0x00000000004019B2
1# 0x0000000000401B39
2# 0x0000000000400E3B
3# 0x0000000000400E6B
4# 0x0000000000400E44
5# 0x0000000000400E6B
6# 0x0000000000400E7C
7# 0x000000000045BF2B
8# 0x000000000045C1D1
9# 0x0000000000400CEA
Have I miss something?
Works for me now.
boost::stacktrace needs libbacktrace to print more than pointers
the compiler needs -lbacktrace -DBOOST_STACKTRACE_USE_BACKTRACE
The full line for compilation in the upper bash script example is then:
$CXX -w -g3 -o assert_handler-$($CXX -dumpmachine)$EXECUTABLE_SUFFIX assert_handler.cpp -std=c++11 -static -I$BOOST_INCLUDE -L$BOOST_LIB $(eval $BOOST_LIBS) -ldl -lbacktrace -DBOOST_STACKTRACE_USE_BACKTRACE
boost::stacktrace is new in the current Boost v1.65.1 and Debian Stretch that I use has only v1.62.0 and doesn't provide libbacktrace. So I had to download/compile these two on my own.
I cross compile for x86_64-unknown-linux-gnu and i686-w64-mingw32. It works for Linux but the mingw executables print almost nothing. I will investigate that and maybe post my results later here.
Related
There are quite some posts about this error, but I was not able to solve it, I hope you can come up with the solution. I am on a Ubuntu machine.
~/graphmap2$
In this folder, I downloaded zlib. You can see the picture
After some Googling, I also noticed that there is no -lz parameter, so I also added that manually as you can see below
However, I still get the same error as when none of the above were done.
Might it be that the path to zlib is not clear for the compiler? However, I installed it in this same folder.
The make file looks like the below:
BIN = ./bin/graphmap2
BIN_DEBUG = ./bin/graphmap-debug
BIN_LINUX = ./bin/Linux-x64/graphmap2
BIN_MAC = ./bin/Mac/graphmap
OBJ_TESTING = ./obj_test
OBJ_TESTING_EXT = ./obj_testext
OBJ_DEBUG = ./obj_debug
OBJ_LINUX = ./obj_linux
OBJ_EXTCIGAR = ./obj_extcigar
OBJ_MAC = ./obj_mac
SOURCE = src
CODEBASE = codebase
# This finds all 'src' folders at maximum depth 2 (level one inside each submodule's folder).
CODEBASE_SRC_FOLDERS = $(shell find $(CODEBASE) -maxdepth 2 -type d -name "src" -exec echo "-I"{} \;)
# $(shell find $(CODEBASE) -maxdepth 3 -type d -name "libs" -exec echo "-I"{} \;)
# $(shell find $(CODEBASE) -maxdepth 2 -type d -name "src" -exec echo "-I"{}"/*/" \;)
# ? allows override by user using env var
GCC ?= g++
# define variables for GCC version check here
GCC_MAJOR_VERSION_GE_4 := $(shell expr `$(GCC) -dumpversion | cut -f1 -d.` \>= 4)
GCC_MINOR_VERSION_GE_7 := $(shell expr `$(GCC) -dumpversion | cut -f2 -d.` \>= 7)
GCC_MAC ?= g++
# CPP_FILES := $(wildcard $(SOURCE)/*/*.cpp) $(wildcard $(SOURCE)/*.cpp) $(wildcard $(SOURCE)/libs/*/*.cpp)
# CC_FILES := $(wildcard $(SOURCE)/*/*.cc) $(wildcard $(SOURCE)/*.cc) $(wildcard $(SOURCE)/libs/*/*.cc)
# H_FILES := $(wildcard $(SOURCE)/*/*.h) $(wildcard $(SOURCE)/*.h) $(wildcard $(SOURCE)/libs/*/*.h)
CPP_FILES := $(wildcard $(CODEBASE)/*/src/*.cpp) $(wildcard $(CODEBASE)/*/src/libs/*/*.cpp) $(wildcard $(CODEBASE)/*/src/*/*.cpp) $(wildcard $(SOURCE)/*/*.cpp) $(wildcard $(SOURCE)/*.cpp) $(wildcard $(SOURCE)/libs/*/*.cpp)
CC_FILES := $(wildcard $(CODEBASE)/*/src/*.cc) $(wildcard $(CODEBASE)/*/src/libs/*/*.cc) $(wildcard $(CODEBASE)/*/src/*/*.cc) $(wildcard $(SOURCE)/*/*.cc) $(wildcard $(SOURCE)/*.cc) $(wildcard $(SOURCE)/libs/*/*.cc)
H_FILES := $(wildcard $(CODEBASE)/*/src/*.h) $(wildcard $(CODEBASE)/*/src/libs/*/*.h) $(wildcard $(CODEBASE)/*/src/*/*.h) $(wildcard $(SOURCE)/*/*.h) $(wildcard $(SOURCE)/*.h) $(wildcard $(CODEBASE)/*/src/*.hpp) $(wildcard $(CODEBASE)/*$
OBJ_FILES := $(CPP_FILES:.cpp=.o) $(CC_FILES:.cc=.o)
OBJ_FILES_FOLDER_TESTING := $(addprefix $(OBJ_TESTING)/,$(OBJ_FILES))
OBJ_FILES_FOLDER_TESTING_EXT := $(addprefix $(OBJ_TESTING_EXT)/,$(OBJ_FILES))
OBJ_FILES_FOLDER_DEBUG := $(addprefix $(OBJ_DEBUG)/,$(OBJ_FILES))
OBJ_FILES_FOLDER_LINUX := $(addprefix $(OBJ_LINUX)/,$(OBJ_FILES))
OBJ_FILES_FOLDER_EXTCIGAR := $(addprefix $(OBJ_EXTCIGAR)/,$(OBJ_FILES))
OBJ_FILES_FOLDER_MAC := $(addprefix $(OBJ_MAC)/,$(OBJ_FILES))
LIB_DIRS = -L"/usr/local/lib"
CC_LIBS = -static-libgcc -static-libstdc++ -D__cplusplus=201103L
# INCLUDE = -I"./src/" -I"/usr/include/" -I"libs/libdivsufsort-2.0.1/build/include" -I"libs/seqan-library-1.4.2/include"
# INCLUDE = -I"./src/" -I"/usr/include/" -I"src/libs/seqan-library-1.4.2/include"
INCLUDE = -I"./src/" -I"/usr/include/" -I"$(CODEBASE)/seqlib/src/libs/seqan-library-2.0.1/include" -I"$(CODEBASE)/seqlib/src/libs/libdivsufsort-2.0.1-64bit/" $(CODEBASE_SRC_FOLDERS)
CC_FLAGS_DEBUG = -O3 -g -rdynamic -c -fmessage-length=0 -ffreestanding -fopenmp -m64 -std=c++11 -Werror=return-type -pthread -march=native -lz
CC_FLAGS_RELEASE = -DRELEASE_VERSION -g -O3 -fdata-sections -ffunction-sections -c -fmessage-length=0 -ffreestanding -fopenmp -m64 -std=c++11 -Werror=return-type -pthread -lz # -march=native
CC_FLAGS_EXTCIGAR = -DRELEASE_VERSION -DUSE_EXTENDED_CIGAR_FORMAT -g -O3 -fdata-sections -ffunction-sections -c -fmessage-length=0 -ffreestanding -fopenmp -m64 -std=c++11 -Werror=return-type -pthread -march=native -lz
CC_FLAGS_NOT_RELEASE = -g -O3 -fdata-sections -ffunction-sections -c -fmessage-length=0 -ffreestanding -fopenmp -m64 -std=c++11 -Werror=return-type -Wuninitialized -pthread -march=native -lz
CC_FLAGS_NOT_RELEASE_EXT = -g -O3 -DUSE_EXTENDED_CIGAR_FORMAT -fdata-sections -ffunction-sections -c -fmessage-length=0 -ffreestanding -fopenmp -m64 -std=c++11 -Werror=return-type -Wuninitialized -pthread -march=native -lz LD_FLAGS = -static-libgcc -static-libstdc++ -m64 -ffreestanding -lz
# LD_LIBS = -lpthread -lgomp -lm -lz -ldivsufsort64
LD_LIBS = -lpthread -lgomp -lm -lz
all: gcc_version_check linux
install: /usr/bin/graphmap
/usr/bin/graphmap: bin/Linux-x64/graphmap
cp bin/Linux-x64/graphmap /usr/bin/graphmap
modules:
git submodule update --init --recursive
# git submodule foreach git pull origin master
testing: $(OBJ_FILES_FOLDER_TESTING)
mkdir -p $(dir $(BIN))
$(GCC) $(LD_FLAGS) $(LIB_DIRS) -o $(BIN) $(OBJ_FILES_FOLDER_TESTING) $(LD_LIBS)
obj_test/%.o: %.cc $(H_FILES)
mkdir -p $(dir $#)
$(GCC) $(CC_LIBS) $(INCLUDE) $(CC_FLAGS_NOT_RELEASE) -o $# $<
obj_test/%.o: %.cpp $(H_FILES)
mkdir -p $(dir $#)
$(GCC) $(CC_LIBS) $(INCLUDE) $(CC_FLAGS_NOT_RELEASE) -o $# $<
testingext: $(OBJ_FILES_FOLDER_TESTING_EXT)
mkdir -p $(dir $(BIN)) $(GCC) $(LD_FLAGS) $(LIB_DIRS) -o $(BIN) $(OBJ_FILES_FOLDER_TESTING_EXT) $(LD_LIBS)
obj_testext/%.o: %.cc $(H_FILES)
mkdir -p $(dir $#)
$(GCC) $(CC_LIBS) $(INCLUDE) $(CC_FLAGS_NOT_RELEASE_EXT) -o $# $<
obj_testext/%.o: %.cpp $(H_FILES)
mkdir -p $(dir $#)
$(GCC) $(CC_LIBS) $(INCLUDE) $(CC_FLAGS_NOT_RELEASE_EXT) -o $# $<
gcc_version_check:
ifneq ($(GCC_MAJOR_VERSION_GE_4), 1)
$(warning "*** WARNING $(GCC) major version <4 ***")
endif
ifneq ($(GCC_MINOR_VERSION_GE_7), 1)
$(warning "*** WARNING $(GCC) minor version <7 ***")
endif
Any ideas?
Seems compiler is not able to find the file in the includes path you mentioned.
First check if zconf.h file is available on your machine and get that location. If the file is available then just give the path of the file to the compiler using -I option.
INCLUDE = -I"<YourPath>" -I"./src/" -I"/usr/include/" -I"$(CODEBASE)/seqlib/src/libs/seqan-library-2.0.1/include" -I"$(CODEBASE)/seqlib/src/libs/libdivsufsort-2.0.1-64bit/" $(CODEBASE_SRC_FOLDERS)
If the file itself is missing, then you would need to install it
sudo apt-get install libz-dev
Based on information shared by #Knud Larsen :
The Ubuntu package name is zlib1g-dev from where you can get the missing file. /usr/include/zconf.h
https://packages.ubuntu.com/focal-updates/amd64/zlib1g-dev/filelist
Just for future reference, what Altaf mentioned is correct. More than that, you can continue adding things that are not in the appropriate place exactly like this. Locate them and then add them manually.
If the makefile is not very big this will eventually be ok. It doesn't scale on the general case however, and maybe changing the makefile in a more radical way should be done.
I'm trying to compile a basic Qt program:
#include <iostream>
#include <QApplication>
int main(int argc, char** argv) {
QApplication app(argc, argv);
std::cout << "test" << std::endl;
}
To start a Qt-project I did the following:
Make a project.pro file:
TEMPLATE += app
QT += widgets gui
SOURCES += main.cpp
Run the qmake command.
Edit the following in the generated Makefile:
-mmacosx-version-min=10.15.3 in CXXFLAGS
remove the -c argument from the compiler
Than I ran make and got the following error output:
/Library/Developer/CommandLineTools/usr/bin/clang++ -pipe -stdlib=libc++ -O2 -std=gnu++11 -arch x86_64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -mmacosx-version-min=10.15.3 -Wall -Wextra -fPIC -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I. -I/usr/local/Cellar/qt/5.14.1/lib/QtWidgets.framework/Headers -I/usr/local/Cellar/qt/5.14.1/lib/QtGui.framework/Headers -I/usr/local/Cellar/qt/5.14.1/lib/QtCore.framework/Headers -I. -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/OpenGL.framework/Headers -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/AGL.framework/Headers -I/usr/local/Cellar/qt/5.14.1/mkspecs/macx-clang -F/usr/local/Cellar/qt/5.14.1/lib -o main.o main.cpp
Undefined symbols for architecture x86_64:
"QApplication::QApplication(int&, char**, int)", referenced from:
_main in main-96fd09.o
"QApplication::~QApplication()", referenced from:
_main in main-96fd09.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [main.o] Error 1
I might have an idea what is causing this, when running make -v I get this output:
This program built for i386-apple-darwin11.3.0
clang++ --version generates this output:
Apple clang version 11.0.0 (clang-1100.0.33.16)
Target: x86_64-apple-darwin19.3.0
Thread model: posix
I think the Makefile is trying to compile my code for an older architecture and that's generating a conflict but I'm not sure. My system is a Macbook Pro running MacOS Catalina 10.15.3. Qt is version 15.4.1. Qmake is version 3.1.
Full Makefile:
#############################################################################
# Makefile for building: test.app/Contents/MacOS/test
# Generated by qmake (3.1) (Qt 5.14.1)
# Project: test.pro
# Template: app
# Command: /usr/local/Cellar/qt/5.14.1/bin/qmake -o Makefile test.pro
#############################################################################
MAKEFILE = Makefile
EQ = =
####### Compiler, tools and options
CC = /Library/Developer/CommandLineTools/usr/bin/clang
CXX = /Library/Developer/CommandLineTools/usr/bin/clang++
DEFINES = -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB
CFLAGS = -pipe -O2 $(EXPORT_ARCH_ARGS) -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -mmacosx-version-min=10.13 -Wall -Wextra -fPIC $(DEFINES)
CXXFLAGS = -pipe -stdlib=libc++ -O2 -std=gnu++11 $(EXPORT_ARCH_ARGS) -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -mmacosx-version-min=10.15.3 -Wall -Wextra -fPIC $(DEFINES)
INCPATH = -I. -I/usr/local/Cellar/qt/5.14.1/lib/QtWidgets.framework/Headers -I/usr/local/Cellar/qt/5.14.1/lib/QtGui.framework/Headers -I/usr/local/Cellar/qt/5.14.1/lib/QtCore.framework/Headers -I. -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/OpenGL.framework/Headers -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/AGL.framework/Headers -I/usr/local/Cellar/qt/5.14.1/mkspecs/macx-clang -F/usr/local/Cellar/qt/5.14.1/lib
QMAKE = /usr/local/Cellar/qt/5.14.1/bin/qmake
DEL_FILE = rm -f
CHK_DIR_EXISTS= test -d
MKDIR = mkdir -p
COPY = cp -f
COPY_FILE = cp -f
COPY_DIR = cp -f -R
INSTALL_FILE = install -m 644 -p
INSTALL_PROGRAM = install -m 755 -p
INSTALL_DIR = cp -f -R
QINSTALL = /usr/local/Cellar/qt/5.14.1/bin/qmake -install qinstall
QINSTALL_PROGRAM = /usr/local/Cellar/qt/5.14.1/bin/qmake -install qinstall -exe
DEL_FILE = rm -f
SYMLINK = ln -f -s
DEL_DIR = rmdir
MOVE = mv -f
TAR = tar -cf
COMPRESS = gzip -9f
DISTNAME = test1.0.0
DISTDIR = /Users/myName/School/C++/QtTest/.tmp/test1.0.0
LINK = /Library/Developer/CommandLineTools/usr/bin/clang++
LFLAGS = -stdlib=libc++ -headerpad_max_install_names $(EXPORT_ARCH_ARGS) -Wl,-syslibroot,/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -mmacosx-version-min=10.13 -Wl,-rpath,#executable_path/../Frameworks
LIBS = $(SUBLIBS) -F/usr/local/Cellar/qt/5.14.1/lib -framework QtWidgets -framework QtGui -framework AppKit -framework Metal -framework QtCore -framework DiskArbitration -framework IOKit -framework OpenGL -framework AGL
AR = /Library/Developer/CommandLineTools/usr/bin/ar cq
RANLIB = /Library/Developer/CommandLineTools/usr/bin/ranlib -s
SED = sed
STRIP = strip
####### Output directory
OBJECTS_DIR = ./
####### Files
SOURCES = main.cpp
OBJECTS = main.o
DIST = /usr/local/Cellar/qt/5.14.1/mkspecs/features/spec_pre.prf \
/usr/local/Cellar/qt/5.14.1/mkspecs/qdevice.pri \
/usr/local/Cellar/qt/5.14.1/mkspecs/features/device_config.prf \
/usr/local/Cellar/qt/5.14.1/mkspecs/common/unix.conf \
/usr/local/Cellar/qt/5.14.1/mkspecs/common/mac.conf \
/usr/local/Cellar/qt/5.14.1/mkspecs/features/mac/rez.prf \
/usr/local/Cellar/qt/5.14.1/mkspecs/features/mac/asset_catalogs.prf \
/usr/local/Cellar/qt/5.14.1/mkspecs/features/testcase_targets.prf \
/usr/local/Cellar/qt/5.14.1/mkspecs/features/exceptions.prf \
/usr/local/Cellar/qt/5.14.1/mkspecs/features/yacc.prf \
/usr/local/Cellar/qt/5.14.1/mkspecs/features/lex.prf \
MORE FILES HERE
test.pro main.cpp
QMAKE_TARGET = test
DESTDIR =
TARGET = test.app/Contents/MacOS/test
####### Custom Variables
EXPORT_QMAKE_MAC_SDK = macosx
EXPORT_QMAKE_MAC_SDK_VERSION = 10.15.1
EXPORT_QMAKE_XCODE_DEVELOPER_PATH = /Library/Developer/CommandLineTools
EXPORT_VALID_ARCHS = x86_64
EXPORT_ACTIVE_ARCHS = $(filter $(EXPORT_VALID_ARCHS), $(ARCHS))
EXPORT_ARCH_ARGS = $(foreach arch, $(if $(EXPORT_ACTIVE_ARCHS), $(EXPORT_ACTIVE_ARCHS), $(EXPORT_VALID_ARCHS)), -arch $(arch))
EXPORT__PRO_FILE_ = /Users/myName/School/C++/QtTest/test.pro
include /usr/local/Cellar/qt/5.14.1/mkspecs/features/mac/sdk.mk
first: all
####### Build rules
test.app/Contents/MacOS/test: $(OBJECTS)
#test -d test.app/Contents/MacOS/ || mkdir -p test.app/Contents/MacOS/
$(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJCOMP) $(LIBS)
Makefile: test.pro /usr/local/Cellar/qt/5.14.1/mkspecs/macx-clang/qmake.conf /usr/local/Cellar/qt/5.14.1/mkspecs/features/spec_pre.prf \
/usr/local/Cellar/qt/5.14.1/mkspecs/qdevice.pri \
/usr/local/Cellar/qt/5.14.1/mkspecs/features/device_config.prf \
/usr/local/Cellar/qt/5.14.1/mkspecs/common/unix.conf \
/usr/local/Cellar/qt/5.14.1/mkspecs/features/exceptions.prf \
/usr/local/Cellar/qt/5.14.1/mkspecs/features/yacc.prf \
/usr/local/Cellar/qt/5.14.1/mkspecs/features/lex.prf \
test.pro \
/usr/local/Cellar/qt/5.14.1/lib/QtWidgets.framework/Resources/QtWidgets.prl \
/usr/local/Cellar/qt/5.14.1/lib/QtGui.framework/Resources/QtGui.prl \
/usr/local/Cellar/qt/5.14.1/lib/QtCore.framework/Resources/QtCore.prl
MORE FILES HERE
$(QMAKE) -o Makefile test.pro
/usr/local/Cellar/qt/5.14.1/mkspecs/features/spec_pre.prf:
/usr/local/Cellar/qt/5.14.1/mkspecs/qdevice.pri:
/usr/local/Cellar/qt/5.14.1/mkspecs/features/device_config.prf:
/usr/local/Cellar/qt/5.14.1/mkspecs/common/unix.conf:
/usr/local/Cellar/qt/5.14.1/mkspecs/common/mac.conf:
/usr/local/Cellar/qt/5.14.1/mkspecs/features/lex.prf:
test.pro:
/usr/local/Cellar/qt/5.14.1/lib/QtWidgets.framework/Resources/QtWidgets.prl:
/usr/local/Cellar/qt/5.14.1/lib/QtGui.framework/Resources/QtGui.prl:
/usr/local/Cellar/qt/5.14.1/lib/QtCore.framework/Resources/QtCore.prl:
MORE FILES HERE
qmake: FORCE
#$(QMAKE) -o Makefile test.pro
qmake_all: FORCE
test.app/Contents/PkgInfo:
#test -d test.app/Contents || mkdir -p test.app/Contents
#$(DEL_FILE) test.app/Contents/PkgInfo
#echo "APPL????" > test.app/Contents/PkgInfo
test.app/Contents/Resources/empty.lproj:
#test -d test.app/Contents/Resources || mkdir -p test.app/Contents/Resources
#touch test.app/Contents/Resources/empty.lproj
test.app/Contents/Info.plist:
#test -d test.app/Contents || mkdir -p test.app/Contents
#$(DEL_FILE) test.app/Contents/Info.plist
#sed -e "s,#SHORT_VERSION#,1.0,g" -e "s,\$${QMAKE_SHORT_VERSION},1.0,g" -e "s,#FULL_VERSION#,1.0.0,g" -e "s,\$${QMAKE_FULL_VERSION},1.0.0,g" -e "s,#TYPEINFO#,????,g" -e "s,\$${QMAKE_PKGINFO_TYPEINFO},????,g" -e "s,#BUNDLEIDENTIFIER#,com.yourcompany.test,g" -e "s,\$${PRODUCT_BUNDLE_IDENTIFIER},com.yourcompany.test,g" -e "s,\$${MACOSX_DEPLOYMENT_TARGET},10.13,g" -e "s,\$${IPHONEOS_DEPLOYMENT_TARGET},,g" -e "s,\$${TVOS_DEPLOYMENT_TARGET},,g" -e "s,\$${WATCHOS_DEPLOYMENT_TARGET},,g" -e "s,#ICON#,,g" -e "s,\$${ASSETCATALOG_COMPILER_APPICON_NAME},,g" -e "s,#EXECUTABLE#,test,g" -e "s,#LIBRARY#,test,g" -e "s,\$${EXECUTABLE_NAME},test,g" -e "s,#TYPEINFO#,????,g" -e "s,\$${QMAKE_PKGINFO_TYPEINFO},????,g" /usr/local/Cellar/qt/5.14.1/mkspecs/macx-clang/Info.plist.app >test.app/Contents/Info.plist
all: Makefile \
test.app/Contents/PkgInfo \
test.app/Contents/Resources/empty.lproj \
test.app/Contents/Info.plist test.app/Contents/MacOS/test
dist: distdir FORCE
(cd `dirname $(DISTDIR)` && $(TAR) $(DISTNAME).tar $(DISTNAME) && $(COMPRESS) $(DISTNAME).tar) && $(MOVE) `dirname $(DISTDIR)`/$(DISTNAME).tar.gz . && $(DEL_FILE) -r $(DISTDIR)
distdir: FORCE
#test -d $(DISTDIR) || mkdir -p $(DISTDIR)
$(COPY_FILE) --parents $(DIST) $(DISTDIR)/
$(COPY_FILE) --parents /usr/local/Cellar/qt/5.14.1/mkspecs/features/data/dummy.cpp $(DISTDIR)/
$(COPY_FILE) --parents main.cpp $(DISTDIR)/
clean: compiler_clean
-$(DEL_FILE) $(OBJECTS)
-$(DEL_FILE) *~ core *.core
distclean: clean
-$(DEL_FILE) -r test.app
-$(DEL_FILE) .qmake.stash
-$(DEL_FILE) Makefile
####### Sub-libraries
xcodeproj:
#$(QMAKE) -spec macx-xcode "$(EXPORT__PRO_FILE_)"
mocclean: compiler_moc_header_clean compiler_moc_objc_header_clean compiler_moc_source_clean
mocables: compiler_moc_header_make_all compiler_moc_objc_header_make_all compiler_moc_source_make_all
check: first
benchmark: first
compiler_rcc_make_all:
compiler_rcc_clean:
compiler_moc_predefs_make_all: moc_predefs.h
compiler_moc_predefs_clean:
-$(DEL_FILE) moc_predefs.h
moc_predefs.h: /usr/local/Cellar/qt/5.14.1/mkspecs/features/data/dummy.cpp
/Library/Developer/CommandLineTools/usr/bin/clang++ -pipe -stdlib=libc++ -O2 -std=gnu++11 $(EXPORT_ARCH_ARGS) -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -mmacosx-version-min=10.13 -Wall -Wextra -dM -E -o moc_predefs.h /usr/local/Cellar/qt/5.14.1/mkspecs/features/data/dummy.cpp
compiler_moc_header_make_all:
compiler_moc_header_clean:
compiler_moc_objc_header_make_all:
compiler_moc_objc_header_clean:
compiler_moc_source_make_all:
compiler_moc_source_clean:
compiler_uic_make_all:
compiler_uic_clean:
compiler_rez_source_make_all:
compiler_rez_source_clean:
compiler_yacc_decl_make_all:
compiler_yacc_decl_clean:
compiler_yacc_impl_make_all:
compiler_yacc_impl_clean:
compiler_lex_make_all:
compiler_lex_clean:
compiler_clean: compiler_moc_predefs_clean
####### Compile
main.o: main.cpp /usr/local/Cellar/qt/5.14.1/lib/QtWidgets.framework/Headers/QApplication \
/usr/local/Cellar/qt/5.14.1/lib/QtWidgets.framework/Headers/qapplication.h
$(CXX) $(CXXFLAGS) $(INCPATH) -o main.o main.cpp
####### Install
install: FORCE
uninstall: FORCE
FORCE:
Thanks!
I made a very basic mistake. Everything was working, but the Makefile outputted a main.o file. I tried to execute my application by using ./main.o. This is not possible.
The correct way to execute a Qt application is by using open main.app.
No need to alter the makefile.
Create a myApp.pro file
Example:
TEMPLATE += app
QT += widgets gui
SOURCES += myApp.cpp
Execute qmake
Execute make
Execute open myApp.app
When linking some object files together I get a bunch of errors like:
obj-ia32/ShadowRoutine.o: In function `InitializeMap(unsigned int*)':
ShadowRoutine.cpp:(.text+0x0): multiple definition of `InitializeMap(unsigned int*)'
obj-ia32/ShadowRoutine.o:ShadowRoutine.cpp:(.text+0x0): first defined here
with compilation and linking commands of:
g++ -DBIGARRAY_MULTIPLIER=1 -Wall -Wno-unknown-pragmas -fno-stack-protector \
-DTARGET_IA32 -DHOST_IA32 -DTARGET_LINUX -I../../../source/include/pin \
-I../../../source/include/pin/gen -I../../../extras/components/include \
-I../../../extras/xed-ia32/include -I../../../source/tools/InstLib -O3 \
-fomit-frame-pointer -fno-strict-aliasing -Wno-unused-variable \
-Wno-unused-function -I. -Ishadow-memory -m32 -c \
-o obj-ia32/ShadowRoutine.o ShadowRoutine.cpp
g++ -DBIGARRAY_MULTIPLIER=1 -Wall -Wno-unknown-pragmas -fno-stack-protector \
-DTARGET_IA32 -DHOST_IA32 -DTARGET_LINUX -I../../../source/include/pin \
-I../../../source/include/pin/gen -I../../../extras/components/include \
-I../../../extras/xed-ia32/include -I../../../source/tools/InstLib -O3 \
-fomit-frame-pointer -fno-strict-aliasing -Wno-unused-variable \
-Wno-unused-function -I. -Ishadow-memory -m32 -c \
-o obj-ia32/Jikes.o Jikes.cpp
g++ -shared -Wl,--hash-style=sysv -Wl,-Bsymbolic \
-Wl,--version-script=../../../source/include/pin/pintool.ver \
-m32 -o obj-ia32/Jikes.so obj-ia32/ClientReq.o obj-ia32/Server.o \
obj-ia32/ShadowRoutine.o obj-ia32/FncnMap.o obj-ia32/Trace.o \
obj-ia32/Jikes.o obj-ia32/ClientReq.o obj-ia32/Server.o \
obj-ia32/ShadowRoutine.o obj-ia32/FncnMap.o obj-ia32/Trace.o \
-L../../../ia32/lib -L../../../ia32/lib-ext -L../../../ia32/runtime/glibc \
-L../../../extras/xed-ia32/lib \
-L/home/karl/r/git/pin/source/tools/Jikes/zmq/inst/lib \
-lpin -lxed -lpindwarf -ldl -lzmq
The only two object files with InitializeMap are Jikes.o and ShadowRoutine.o:
$ nm obj-ia32/Jikes.o | grep InitializeMap
U _Z13InitializeMapPj
$ nm obj-ia32/ShadowRoutine.o | grep InitializeMap
00000000 T _Z13InitializeMapPj
$ nm obj-ia32/* | grep InitializeMap
U _Z13InitializeMapPj
00000000 T _Z13InitializeMapPj
So why am I getting "multiple definitions of InitializeMap" if it's only "defined" in one object file and "undefined" in the only other object file that required it using extern?
This is what the declarations, definitions, and uses look like:
$ grep -r InitializeMap *
Jikes.cpp: if (rtn_name == "sysInitializeMap") { RTN_INSERT_1(InitializeMap);
Binary file obj-ia32/Jikes.o matches
Binary file obj-ia32/ShadowRoutine.o matches
ShadowRoutine.cpp:VOID InitializeMap(ADDRINT *smID) { init_map(*(int*)smID); }
ShadowRoutine.hpp:VOID InitializeMap(ADDRINT *smID);
where both the cpp files #include "ShadowRoutine.hpp".
EDIT: My question is why does the linker command (the third g++ command in the second code snippet above) not work even though nm says that the function is only defined in the text of ShadowRoutine.o and undefined in Jikes.o?
You have the file obj-ia32/ShadowRoutine.o listed twice in your link command.
What I have done so far is create two makefiles: a project makefile and a package makefile.The project makefile was,however, created using qmake. When I compile the package, I get an x86-64 binary which means the makefile is not cross compiling. How can I fix this?
Here's a the part where I believe the source of the problem:
CC = gcc
CXX = g++
DEFINES = -DQT_NO_DEBUG -DQT_CORE_LIB -DQT_SHARED
CFLAGS = -m64 -pipe -O2 -Wall -W -D_REENTRANT $(DEFINES)
CXXFLAGS = -m64 -pipe -O2 -Wall -W -D_REENTRANT $(DEFINES)
INCPATH = -I/usr/share/qt4/mkspecs/linux-g++-64 -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4 -I.
LINK = g++
LFLAGS = -m64 -Wl,-O1
LIBS = $(SUBLIBS) -L/usr/lib/x86_64-linux-gnu -lcrypto -lssl -lQtCore -lpthread
AR = ar cqs
RANLIB =
QMAKE = /usr/lib/x86_64-linux-gnu/qt4/bin/qmake
TAR = tar -cf
COMPRESS = gzip -9f
COPY = cp -f
SED = sed
COPY_FILE = $(COPY)
COPY_DIR = $(COPY) -r
STRIP = strip
INSTALL_FILE = install -m 644 -p
INSTALL_DIR = $(COPY_DIR)
INSTALL_PROGRAM = install -m 755 -p
DEL_FILE = rm -f
SYMLINK = ln -f -s
DEL_DIR = rmdir
MOVE = mv -f
CHK_DIR_EXISTS= test -d
MKDIR = mkdir -p
I changed the first line "CC = gcc" to "CC ?=gcc" but it didn't fix the problem.
I am trying to create a system of makefiles to build my whole project. I am using cygwin and gcc compiler. I am running into a linking error on shared libraries that I cannot figure out.
I am concerned with ld: cannot find -lbase and ld: cannot find -lsimsimA429.
These files were clearly built. I even did a directory listing as part of the build command to show that they exist.
-rwxr-xr-x+ 1 user group 116832 Mar 25 10:09 /cygdrive/d/myProj/lib/libbase.so
-rwxr-xr-x+ 1 user group 75972 Mar 25 10:09 /cygdrive/d/myProj/lib/libsimsima429.so
and the link command also shows that I am including the correct link directory
g++ -shared -L/cygdrive/d/myProj/lib -lpthread -lrt -lbase -lsimsimA429 ...
What am I doing wrong to incur this error?
Also, I am relatively new to writing makefiles. If you have any comments about how I could improve them, I would kindly appreciate a few comments.
Full makefiles and output are listed below...
/cygdrive/d/myProj/src/sfi/base/makefile
#------------------------------------------------------------------------------
#-- BASE
#------------------------------------------------------------------------------
#--
# Make does not offer a recursive wildcard function, so here's one:
rwildcard=$(wildcard $1$2) $(foreach d,$(wildcard $1*),$(call rwildcard,$d/,$2))
MKDIR=mkdir
ROOTDIR=$(realpath ../../..)
PROJDIR=$(notdir $(CURDIR))
LIBDIR=$(ROOTDIR)/lib
OBJDIR=$(ROOTDIR)/obj/$(PROJDIR)
SRCDIR=$(ROOTDIR)/src
#OUTPUT FILE lib file or executable
TARGET=$(LIBDIR)/lib$(PROJDIR).so
INCLUDES=
#INCLUDES+=
LIBS=
#LIBS+=
LDFLAGS=
LDFLAGS+= -shared
LDFLAGS+= -L$(LIBDIR)
#LDFLAGS+= -Wl,-rpath
CCFLAGS=
#CCFLAGS+= -fPIC
#CCFLAGS+= -ansi
#CCFLAGS+= -pedantic
CCFLAGS+= -g
CCFLAGS+= -Wall
#CCFLAGS+= -std=c++11
CCC=g++
SRC= $(call rwildcard,./,*.cpp)
OBJECTS=$(patsubst %.cpp,$(OBJDIR)/%.o,$(SRC))
# Set our own Goal.
.DEFAULT_GOAL := all
.PHONY: all
all: $(TARGET)
$(OBJDIR)/%.o: %.cpp
#$(MKDIR) -p $(abspath $(dir $#))
$(CCC) -c $(CCFLAGS) $(INCLUDES) $< -o $#
$(TARGET): $(OBJECTS)
$(CCC) $(LDFLAGS) $(LIBS) -o $(TARGET) $(OBJECTS)
ls -l $(TARGET)
.PHONY: clean
clean:
rm -f $(OBJECTS) $(TARGET)
test:
#echo $(OBJECTS) | tr " " "\n"
/cygdrive/d/myProj/src/sfi/drivers/a429/simsimA429/makefile
#------------------------------------------------------------------------------
#-- SIMSIMA429
#------------------------------------------------------------------------------
#--
# Make does not offer a recursive wildcard function, so here's one:
rwildcard=$(wildcard $1$2) $(foreach d,$(wildcard $1*),$(call rwildcard,$d/,$2))
MKDIR=mkdir
ROOTDIR=$(realpath ../../../../..)
PROJDIR=$(notdir $(CURDIR))
LIBDIR=$(ROOTDIR)/lib
OBJDIR=$(ROOTDIR)/obj/$(PROJDIR)
SRCDIR=$(ROOTDIR)/src
#OUTPUT FILE lib file or executable
TARGET=$(LIBDIR)/lib$(PROJDIR).so
INCLUDES=
INCLUDES+= -I$(SRCDIR)/face
INCLUDES+= -I$(SRCDIR)/sfi/base
INCLUDES+= -I$(SRCDIR)/sfi/drivers/a429/include
LIBS=
LIBS+= -L$(LIBDIR)
#LIBS+= -lbase
LDFLAGS=
LDFLAGS+= -shared
#LDFLAGS+= -Wl,-rpath
CCFLAGS=
#CCFLAGS+= -fPIC
#CCFLAGS+= -ansi
#CCFLAGS+= -pedantic
CCFLAGS+= -g
CCFLAGS+= -Wall
#CCFLAGS+= -std=c++11
CCC=g++
SRC= $(call rwildcard,./,*.cpp)
OBJECTS=$(patsubst %.cpp,$(OBJDIR)/%.o,$(SRC))
# Set our own Goal.
.DEFAULT_GOAL := all
.PHONY: all
all: $(TARGET)
$(OBJDIR)/%.o: %.cpp
#$(MKDIR) -p $(abspath $(dir $#))
$(CCC) -c $(CCFLAGS) $(INCLUDES) $< -o $#
$(TARGET): $(OBJECTS)
$(CCC) $(LDFLAGS) $(LIBS) -o $(TARGET) $(OBJECTS)
ls -l $(TARGET)
.PHONY: clean
clean:
rm -f $(OBJECTS) $(TARGET)
test:
#echo $(OBJECTS) | tr " " "\n"
/cygdrive/d/myProj/src/sfi/ioss/makefile
#------------------------------------------------------------------------------
#-- IOSS
#------------------------------------------------------------------------------
#--
# Make does not offer a recursive wildcard function, so here's one:
rwildcard=$(wildcard $1$2) $(foreach d,$(wildcard $1*),$(call rwildcard,$d/,$2))
MKDIR=mkdir
ROOTDIR=$(realpath ../../..)
PROJDIR=$(notdir $(CURDIR))
LIBDIR=$(ROOTDIR)/lib
OBJDIR=$(ROOTDIR)/obj/$(PROJDIR)
SRCDIR=$(ROOTDIR)/src
#OUTPUT FILE lib file or executable
TARGET=$(LIBDIR)/lib$(PROJDIR).so
INCLUDES=
INCLUDES+= -I$(SRCDIR)/face
INCLUDES+= -I$(SRCDIR)/sfi
INCLUDES+= -I$(SRCDIR)/sfi/base
INCLUDES+= -I$(SRCDIR)/sfi/drivers/a429/include
INCLUDES+= -I$(SRCDIR)/sfi/ioss
LIBS=
LIBS+= -L$(LIBDIR)
LIBS+= -lpthread
LIBS+= -lrt
LIBS+= -lbase
LIBS+= -lsimsima429
LDFLAGS=
LDFLAGS+= -shared
#LDFLAGS+= -Wl,-rpath
CCFLAGS=
#CCFLAGS+= -fPIC
#CCFLAGS+= -ansi
#CCFLAGS+= -pedantic
CCFLAGS+= -g
CCFLAGS+= -Wall
#CCFLAGS+= -std=c++11
CCC=g++
SRC= $(call rwildcard,./,*.cpp)
OBJECTS=$(patsubst %.cpp,$(OBJDIR)/%.o,$(SRC))
# Set our own Goal.
.DEFAULT_GOAL := all
.PHONY: all
all: $(TARGET)
$(OBJDIR)/%.o: %.cpp
#$(MKDIR) -p $(abspath $(dir $#))
$(CCC) -c $(CCFLAGS) $(INCLUDES) $< -o $#
$(TARGET): $(OBJECTS)
$(CCC) $(LDFLAGS) $(LIBS) -o $(TARGET) $(OBJECTS)
ls -l $(TARGET)
.PHONY: clean
clean:
rm -f $(OBJECTS) $(TARGET)
test:
#echo $(OBJECTS) | tr " " "\n"
Full Output:
10:09:19 **** Build of configuration Default for project base ****
make -j all
g++ -c -g -Wall udpserver.cpp -o /cygdrive/d/myProj/obj/base/./udpserver.o
g++ -c -g -Wall udpclient.cpp -o /cygdrive/d/myProj/obj/base/./udpclient.o
g++ -c -g -Wall impl/clock.cpp -o /cygdrive/d/myProj/obj/base/./impl/clock.o
g++ -c -g -Wall impl/deque.cpp -o /cygdrive/d/myProj/obj/base/./impl/deque.o
g++ -c -g -Wall impl/thread.cpp -o /cygdrive/d/myProj/obj/base/./impl/thread.o
g++ -shared -L/cygdrive/d/myProj/lib -o /cygdrive/d/myProj/lib/libbase.so /cygdrive/d/myProj/obj/base/./udpserver.o /cygdrive/d/myProj/obj/base/./udpclient.o /cygdrive/d/myProj/obj/base/./impl/clock.o /cygdrive/d/myProj/obj/base/./impl/Stdafx.o /cygdrive/d/myProj/obj/base/./impl/deque.o /cygdrive/d/myProj/obj/base/./impl/thread.o
ls -l /cygdrive/d/myProj/lib/libbase.so
-rwxr-xr-x+ 1 user group 116832 Mar 25 10:09 /cygdrive/d/myProj/lib/libbase.so
10:09:25 Build Finished (took 5s.994ms)
10:09:25 **** Build of configuration Default for project simsimA429 ****
make all
g++ -c -g -Wall -I/cygdrive/d/myProj/src/face -I/cygdrive/d/myProj/src/sfi/base -I/cygdrive/d/myProj/src/sfi/drivers/a429/include A429HwCtrlTx.cpp -o /cygdrive/d/myProj/obj/simsima429/./A429HwCtrlTx.o
g++ -c -g -Wall -I/cygdrive/d/myProj/src/face -I/cygdrive/d/myProj/src/sfi/base -I/cygdrive/d/myProj/src/sfi/drivers/a429/include A429HwCtrlRx.cpp -o /cygdrive/d/myProj/obj/simsima429/./A429HwCtrlRx.o
g++ -shared -L/cygdrive/d/myProj/lib -o /cygdrive/d/myProj/lib/libsimsima429.so /cygdrive/d/myProj/obj/simsima429/./A429HwCtrlTx.o /cygdrive/d/myProj/obj/simsima429/./A429HwCtrlRx.o
ls -l /cygdrive/d/myProj/lib/libsimsima429.so
-rwxr-xr-x+ 1 user group 75972 Mar 25 10:09 /cygdrive/d/myProj/lib/libsimsima429.so
10:09:29 Build Finished (took 4s.339ms)
10:09:29 **** Build of configuration Default for project ioss ****
make -j all
g++ -c -g -Wall -I/cygdrive/d/myProj/src/face -I/cygdrive/d/myProj/src/sfi -I/cygdrive/d/myProj/src/sfi/base -I/cygdrive/d/myProj/src/sfi/drivers/a429/include -I/cygdrive/d/myProj/src/sfi/ioss IOS.cpp -o /cygdrive/d/myProj/obj/ioss/./IOS.o
g++ -c -g -Wall -I/cygdrive/d/myProj/src/face -I/cygdrive/d/myProj/src/sfi -I/cygdrive/d/myProj/src/sfi/base -I/cygdrive/d/myProj/src/sfi/drivers/a429/include -I/cygdrive/d/myProj/src/sfi/ioss message/IOSmsg.cpp -o /cygdrive/d/myProj/obj/ioss/./message/IOSmsg.o
g++ -c -g -Wall -I/cygdrive/d/myProj/src/face -I/cygdrive/d/myProj/src/sfi -I/cygdrive/d/myProj/src/sfi/base -I/cygdrive/d/myProj/src/sfi/drivers/a429/include -I/cygdrive/d/myProj/src/sfi/ioss message/MsgId.cpp -o /cygdrive/d/myProj/obj/ioss/./message/MsgId.o
g++ -c -g -Wall -I/cygdrive/d/myProj/src/face -I/cygdrive/d/myProj/src/sfi -I/cygdrive/d/myProj/src/sfi/base -I/cygdrive/d/myProj/src/sfi/drivers/a429/include -I/cygdrive/d/myProj/src/sfi/ioss message/IOSmsgA429.cpp -o /cygdrive/d/myProj/obj/ioss/./message/IOSmsgA429.o
g++ -c -g -Wall -I/cygdrive/d/myProj/src/face -I/cygdrive/d/myProj/src/sfi -I/cygdrive/d/myProj/src/sfi/base -I/cygdrive/d/myProj/src/sfi/drivers/a429/include -I/cygdrive/d/myProj/src/sfi/ioss interface/IOSInterfaceHandle.cpp -o /cygdrive/d/myProj/obj/ioss/./interface/IOSInterfaceHandle.o
g++ -c -g -Wall -I/cygdrive/d/myProj/src/face -I/cygdrive/d/myProj/src/sfi -I/cygdrive/d/myProj/src/sfi/base -I/cygdrive/d/myProj/src/sfi/drivers/a429/include -I/cygdrive/d/myProj/src/sfi/ioss interface/IOSInterface.cpp -o /cygdrive/d/myProj/obj/ioss/./interface/IOSInterface.o
g++ -c -g -Wall -I/cygdrive/d/myProj/src/face -I/cygdrive/d/myProj/src/sfi -I/cygdrive/d/myProj/src/sfi/base -I/cygdrive/d/myProj/src/sfi/drivers/a429/include -I/cygdrive/d/myProj/src/sfi/ioss interface/direct/IOSDirect_Interface.cpp -o /cygdrive/d/myProj/obj/ioss/./interface/direct/IOSDirect_Interface.o
g++ -c -g -Wall -I/cygdrive/d/myProj/src/face -I/cygdrive/d/myProj/src/sfi -I/cygdrive/d/myProj/src/sfi/base -I/cygdrive/d/myProj/src/sfi/drivers/a429/include -I/cygdrive/d/myProj/src/sfi/ioss bus/a429/A429MajorFrame.cpp -o /cygdrive/d/myProj/obj/ioss/./bus/a429/A429MajorFrame.o
g++ -c -g -Wall -I/cygdrive/d/myProj/src/face -I/cygdrive/d/myProj/src/sfi -I/cygdrive/d/myProj/src/sfi/base -I/cygdrive/d/myProj/src/sfi/drivers/a429/include -I/cygdrive/d/myProj/src/sfi/ioss bus/a429/A429MsgRxControl.cpp -o /cygdrive/d/myProj/obj/ioss/./bus/a429/A429MsgRxControl.o
g++ -c -g -Wall -I/cygdrive/d/myProj/src/face -I/cygdrive/d/myProj/src/sfi -I/cygdrive/d/myProj/src/sfi/base -I/cygdrive/d/myProj/src/sfi/drivers/a429/include -I/cygdrive/d/myProj/src/sfi/ioss bus/a429/A429BusTx.cpp -o /cygdrive/d/myProj/obj/ioss/./bus/a429/A429BusTx.o
g++ -c -g -Wall -I/cygdrive/d/myProj/src/face -I/cygdrive/d/myProj/src/sfi -I/cygdrive/d/myProj/src/sfi/base -I/cygdrive/d/myProj/src/sfi/drivers/a429/include -I/cygdrive/d/myProj/src/sfi/ioss bus/a429/A429MsgRegistry.cpp -o /cygdrive/d/myProj/obj/ioss/./bus/a429/A429MsgRegistry.o
g++ -c -g -Wall -I/cygdrive/d/myProj/src/face -I/cygdrive/d/myProj/src/sfi -I/cygdrive/d/myProj/src/sfi/base -I/cygdrive/d/myProj/src/sfi/drivers/a429/include -I/cygdrive/d/myProj/src/sfi/ioss bus/a429/A429BusRx.cpp -o /cygdrive/d/myProj/obj/ioss/./bus/a429/A429BusRx.o
g++ -c -g -Wall -I/cygdrive/d/myProj/src/face -I/cygdrive/d/myProj/src/sfi -I/cygdrive/d/myProj/src/sfi/base -I/cygdrive/d/myProj/src/sfi/drivers/a429/include -I/cygdrive/d/myProj/src/sfi/ioss bus/a429/A429Message.cpp -o /cygdrive/d/myProj/obj/ioss/./bus/a429/A429Message.o
g++ -c -g -Wall -I/cygdrive/d/myProj/src/face -I/cygdrive/d/myProj/src/sfi -I/cygdrive/d/myProj/src/sfi/base -I/cygdrive/d/myProj/src/sfi/drivers/a429/include -I/cygdrive/d/myProj/src/sfi/ioss bus/a429/A429MsgBuffer.cpp -o /cygdrive/d/myProj/obj/ioss/./bus/a429/A429MsgBuffer.o
g++ -c -g -Wall -I/cygdrive/d/myProj/src/face -I/cygdrive/d/myProj/src/sfi -I/cygdrive/d/myProj/src/sfi/base -I/cygdrive/d/myProj/src/sfi/drivers/a429/include -I/cygdrive/d/myProj/src/sfi/ioss bus/m1553/M1553Connection.cpp -o /cygdrive/d/myProj/obj/ioss/./bus/m1553/M1553Connection.o
g++ -c -g -Wall -I/cygdrive/d/myProj/src/face -I/cygdrive/d/myProj/src/sfi -I/cygdrive/d/myProj/src/sfi/base -I/cygdrive/d/myProj/src/sfi/drivers/a429/include -I/cygdrive/d/myProj/src/sfi/ioss config/IOSConfig.cpp -o /cygdrive/d/myProj/obj/ioss/./config/IOSConfig.o
g++ -shared -L/cygdrive/d/myProj/lib -lpthread -lrt -lbase -lsimsima429 -o /cygdrive/d/myProj/lib/libioss.so /cygdrive/d/myProj/obj/ioss/./IOS.o /cygdrive/d/myProj/obj/ioss/./message/IOSmsg.o /cygdrive/d/myProj/obj/ioss/./message/MsgId.o /cygdrive/d/myProj/obj/ioss/./message/IOSmsgA429.o /cygdrive/d/myProj/obj/ioss/./interface/IOSInterfaceHandle.o /cygdrive/d/myProj/obj/ioss/./interface/IOSInterface.o /cygdrive/d/myProj/obj/ioss/./interface/direct/IOSDirect_Interface.o /cygdrive/d/myProj/obj/ioss/./bus/a429/A429MajorFrame.o /cygdrive/d/myProj/obj/ioss/./bus/a429/A429MsgRxControl.o /cygdrive/d/myProj/obj/ioss/./bus/a429/A429BusTx.o /cygdrive/d/myProj/obj/ioss/./bus/a429/A429MsgRegistry.o /cygdrive/d/myProj/obj/ioss/./bus/a429/A429BusRx.o /cygdrive/d/myProj/obj/ioss/./bus/a429/A429Message.o /cygdrive/d/myProj/obj/ioss/./bus/a429/A429MsgBuffer.o /cygdrive/d/myProj/obj/ioss/./bus/m1553/M1553Connection.o /cygdrive/d/myProj/obj/ioss/./config/IOSConfig.o
/usr/lib/gcc/x86_64-pc-cygwin/4.8.3/../../../../x86_64-pc-cygwin/bin/ld: cannot find -lbase
/usr/lib/gcc/x86_64-pc-cygwin/4.8.3/../../../../x86_64-pc-cygwin/bin/ld: cannot find -lsimsima429
collect2: error: ld returned 1 exit status
makefile:61: recipe for target '/cygdrive/d/myProj/lib/libioss.so' failed
make: *** [/cygdrive/d/myProj/lib/libioss.so] Error 1
10:09:42 Build Finished (took 13s.205ms)
Cygwin shared libraries are *.dll files, not lib*.so files. I suppose your linker is struggling to find base.dll and simsimA429.dll.