fixed build issues

This commit is contained in:
2025-07-20 17:03:42 -05:00
parent 1c365dd6f9
commit 9b041b95e2
3 changed files with 61 additions and 10 deletions

View File

@@ -0,0 +1,23 @@
{
"name": "Signal Server C/C++ Development",
"dockerFile": "../Dockerfile",
"workspaceFolder": "/workspace",
"customizations": {
"vscode": {
"extensions": [
"ms-vscode.cpptools-extension-pack",
"ms-vscode.cmake-tools",
"xaver.clang-format",
"ms-vscode.makefile-tools"
],
"settings": {
"C_Cpp.default.cppStandard": "c++17",
"C_Cpp.default.cStandard": "c11",
"C_Cpp.default.compilerPath": "/usr/bin/g++",
"C_Cpp.default.intelliSenseMode": "linux-gcc-x64"
}
}
},
"postCreateCommand": "cd src && make clean",
"remoteUser": "root"
}

28
Dockerfile Normal file
View File

@@ -0,0 +1,28 @@
FROM ubuntu:22.04
# Avoid prompts from apt during build
ENV DEBIAN_FRONTEND=noninteractive
# Install required packages for Signal Server
RUN apt-get update && apt-get install -y \
build-essential \
gcc \
g++ \
make \
libbz2-dev \
zlib1g-dev \
libpthread-stubs0-dev \
git \
&& rm -rf /var/lib/apt/lists/*
# Set working directory
WORKDIR /workspace
# Copy the project files
COPY . .
# Set default shell
SHELL ["/bin/bash", "-c"]
# Default command
CMD ["/bin/bash"]

View File

@@ -25,20 +25,20 @@ GCC_VER_OK := $(shell test $(GCC_MAJOR) -ge 4 && \
#endif
%.o : %.cc
@echo -e " CXX\t$@"
@$ $(CXX) $(CXXFLAGS) -c $<
echo -e " CXX\t$@"
$(CXX) $(CXXFLAGS) -c $<
%.o : %.c
@echo -e " CC\t$@"
@$ $(CC) $(CFLAGS) -c $<
echo -e " CC\t$@"
$(CC) $(CFLAGS) -c $<
signalserver: $(objects)
@echo -e " LNK\t$@"
@$(CXX) $(objects) -o $@ ${LIBS}
@echo -e " SYMLNK\tsignalserverHD -> $@"
@ln -sf $@ signalserverHD
@echo -e " SYMLNK\tsignalserverLIDAR -> $@"
@ln -sf $@ signalserverLIDAR
echo -e " LNK\t$@"
$(CXX) $(objects) -o $@ ${LIBS}
echo -e " SYMLNK\tsignalserverHD -> $@"
ln -sf $@ signalserverHD
echo -e " SYMLNK\tsignalserverLIDAR -> $@"
ln -sf $@ signalserverLIDAR
main.o: main.cc common.h inputs.hh outputs.hh itwom3.0.hh los.hh pel.hh \
image.hh